Unable to download js bundle
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.
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-nativeor 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!
@Hiramxu http://stackoverflow.com/questions/32572399/react-native-android-failed-to-load-js-bundle had a lot of answers here.
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
#5618 maybe useful to you.
@Hiramxu Did you ever get it up and running?
@facebook-github-bot stack-overflow
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.
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
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