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

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

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 20

Most upvoted comments

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"

Did you solve this?

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

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

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

Have the same problem too

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 😃

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;
}

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.

I have same problem