react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Unable to download js bundle

Open Hiramxu opened this issue 10 years ago • 8 comments

react-nativeerror when running react-native run-android, I am getting a red screen on the android emulator, with the following text: Unable to download JS bundle. Did you forget to start the development server or connect your device?

onResponse DevServerHelper.java:191

execute Call.java:168

run NamedRunnable.java:33

runWorker ThreadPoolExecutor.java:1076

run ThreadPoolExecutor.java:569

run Thread.java:856

I've changed the Debug server host for device set the ipaddress with port my machine's IP,but still not fixed.

Hiramxu avatar Jan 28 '16 06:01 Hiramxu

Hey Hiramxu, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

facebook-github-bot avatar Jan 28 '16 06:01 facebook-github-bot

@Hiramxu http://stackoverflow.com/questions/32572399/react-native-android-failed-to-load-js-bundle had a lot of answers here.

qbig avatar Jan 28 '16 08:01 qbig

Now you really machine debugging, using computers to keep the same wifi network。 1.you should delete node_modules/react-deep-force-update/.babelrc 2.if your version is v0.18.1,This path has changed。now you should delete /node_modules/react-native/node_modules/react-transform-hmr/node_modules/react-proxy/node_modules/react-deep-force-update/.babelrc plesase see the details

jiangqqlmj avatar Jan 30 '16 00:01 jiangqqlmj

#5618 maybe useful to you.

TangSirOnGit avatar Feb 01 '16 02:02 TangSirOnGit

@Hiramxu Did you ever get it up and running?

christopherdro avatar Feb 07 '16 20:02 christopherdro

@facebook-github-bot stack-overflow

janicduplessis avatar Mar 20 '16 22:03 janicduplessis

Hey @Hiramxu and thanks for posting this! @janicduplessis tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.

facebook-github-bot avatar Mar 20 '16 22:03 facebook-github-bot

Hello there,

I have fixed this issue by the step below:

if your machine do not install McAfee antivirus, please go to step 2

if you installed McAfee antivirus, the default port of McAfee log is 8081. You should manual change the port of your react native server

Step 1: go to \node_modules\react-native\local-cli\server\server.js and change the port 8081 to 8088

const args = parseCommandLine([{

command: 'port',

default: 8088,

type: 'string',

}

Step 2: Create an "assets" folder under "android/app/src/main"

Step 3: in node.js run "react-native start" and navigate to the url p/s: do not install McAfee antivirus please go with port 8081

"http://localhost:8088/index.android.bundle?platform=android"

Step 4: save the bundle to assets folder and you are all set. in node.js run "react-native run-android" to view the result

Regards,

Hai Tang

haitang3009 avatar Apr 24 '16 06:04 haitang3009