question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope' when using main.jsbundle on iOS simulator

See original GitHub issue

Hi, I’d like to bundle my app using the command

react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output iOS/main.jsbundle

from my project’s root directory. Bundling itself works just fine and the main.jsbundle file is created/updated. I’ve uncommented the line in AppDelegate.m that sets jsCodeLocation to my main bundle’s URL. As soon as I run my app in the simulator, chrome spits out the error

Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'file:///Users/steff/Library/Developer/CoreSimulator/Devices/9B63E242-5394-4781-9041-4408455B36B3/data/Containers/Bundle/Application/327E4FD3-77F7-4834-8CE7-44D68CE37B24/iazzu.app/main.jsbundle' failed to load.

When checking in Finder, the file exists and seems to have the same content than the .jsbundle file created by the bundle script.

Any ideas how I could solve this?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

85reactions
hirmescommented, Jul 18, 2016

I came across this error message when trying to run via the Android emulator. Turning off the debugger and reloading the app revealed there was a syntax error in my JSX. Once that was fixed, the error went away and the app ran properly with the debugger.

47reactions
franticcommented, Mar 5, 2016

Looks like you are trying to debug offline bundle in Chrome, which doesn’t work because of browser’s offline content policy. Press Cmd+D, “Disable Chrome Debugging”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught NetworkError: Failed to execute 'importScripts' on ...
I am trying to import json data from web worker using importScripts , the following error occurs.
Read more >
Failed To Execute 'Importscripts' On 'Workerglobalscope ...
6 thoughts on Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope' when using main.jsbundle on iOS simulator.
Read more >
Failed to execute 'importScripts' on 'WorkerGlobalScope' Error ...
I want use debug but i can't use it because of above issue. Please help me.
Read more >
importscripts is not defined react - You.com | The AI Search ...
facebook/react-nativeUncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope' when using main.jsbundle on iOS simulator#6035.
Read more >
main.jsbundle does not exist [fixed] | by Onexlab - Medium
No bundle URL present. Make sure you're running a packager server or have include a .jsbundle file in your application bundle. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found