5

I am creating an Android React Native application and everything seems to be working fine except when I attempt to debug the program. When I attempt to do this, the app just becomes a blank white screen and the Chrome console has this error:

Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:8081/index.android.bundle?platform=android&dev=true' failed to load.

A few seconds later the app crashes. Does anyone have any idea how to solve this? I just started the project and I haven't really done that much yet so I don't know why this would be breaking

2
  • what version of react native are you running? Commented Oct 26, 2015 at 9:16
  • I'm getting this now with RN 0.17.0 while trying to debug a packaged app. Is this possible? Commented Jan 23, 2016 at 23:34

2 Answers 2

3

The reason I've come across that error, is because I was running with chrome debugging enabled. Turning that off solved the error for me.

Sign up to request clarification or add additional context in comments.

Comments

1

I had the same error. This is how I solved it.

In AppDelegate.m I had commented -

jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];

and uncommented -

jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

Did this to run on device. Switched it back. Works now.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.