React-native: The development server returned response error code:404

Created on 2 Feb 2018  Â·  20Comments  Â·  Source: facebook/react-native

Is this a bug report?

(Yes)

Have you read the Contributing Guidelines?

(Yes)

Environment

Steps to Reproduce

(Write your steps here:)

  1. Run the command react-native run-android in the terminal.
  2. Shows the result BUILD SUCCESSFUL.
  3. Last line before exist was: Starting: Intent { cmp=com.projectfirst/.MainActivity }.

Expected Behavior

(Should have seen the result for the project rather than this error.)

Actual Behavior

(There was no code change but emulation didn't happen.)

-->
capture

Ran Commands Locked

Most helpful comment

I see the same red screen. Is some new update the cause of this error? In the terminal i get

::ffff:127.0.0.1 - - [15/May/2018:12:50:43 +0000] "GET /index.android.delta?platform=android&dev=true&minify=false HTTP/1.1" 404 79 "-" "okhttp/3.6.0"

All 20 comments

I had same error. In my case I did:
run in cmd :
react-native start
if it's complain that can't listen on some port (in my case it was 8081), kill all processes on this port:
on linux:
fuser -k 8081/tcp
then run
react-native start

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to Contribute • What to Expect from Maintainers

image
Run the command react-native run-android in the terminal.
Shows the result BUILD SUCCESSFUL.
Last line before exist was: Starting: Intent { cmp=com.projectfirst/.MainActivity }.
Please error solve

Did you solve this?

@asnad have you found any solution? I am facing this issue from morning onwards.

I see the same red screen. Is some new update the cause of this error? In the terminal i get

::ffff:127.0.0.1 - - [15/May/2018:12:50:43 +0000] "GET /index.android.delta?platform=android&dev=true&minify=false HTTP/1.1" 404 79 "-" "okhttp/3.6.0"

@Mislavoo7 I faced this issue in Android only. I created index.bundle file using following command and run the app again solved my problem. Let me know if this helps you. I believe there will other solutions too.

curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

Hi @sujitpk-perennial, I followed your way but it does not solve the problem. Is there anyone know what's the problem?

version running with my application
react-native: 0.44.3
react: 16.0.0-alpha.6

Thanks

@sujitpk-perennial thank you for your response. I also followed your way but it does not solve the problem. I also tried to update react-native and than android-studio asked for some updates but the red screen remains. There is no error in android-studio logs...

@Mislavoo7 check this to solve https://github.com/callstack/haul/issues/334, but now another issue appear.

I have same problem

Have the same problem too

Can you try by stopping Debug JS remote?

It looks like the problem is faced by lot of now from yesterday onwards. I can see this error says server is trying to connect to 10.0.2.2:8081 Not sure why server is trying to connect to this address instead of localhost.

we met this issue too. Yesterday the project run successfully. but today can not run . Pls help!! thanks.
2018-05-16 02 38 22 pm
2018-05-16 02 38 38 pm

Seems like something changed on FB's side.

I changed the following to make my project work again.
This forces the correct version:

  1. build.gradle (note that resolutionStrategy is only available from a certain gradle version onwards. I'm on 3.1.0)
allprojects {
    ...
    repositories {
        configurations.all {
            resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                def requested = details.requested
                if (requested.group == 'com.facebook.react' && requested.name == 'react-native') {
                  details.useVersion '0.44.3'
                }
            }
        }
    }
}
  1. app/build.gradle
    Change this
compile "com.facebook.react:react-native:+"

to

compile ("com.facebook.react:react-native:0.44.3") {
    force = true;
}

Thank you all for the help! I added
compile ("com.facebook.react:react-native:0.55.4") { force = true } to app app/build.gradle and I had to update react-native: yarn add react-native

Now I get a new error from RNFS that is probably not properly linked but that's another story :)

@sujitpk-perennial please have a look I was able to fix with following solution at stackoverflow here

Was this page helpful?
0 / 5 - 0 ratings