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.

Metro Bundler has encountered an internal error, app fails to load

See original GitHub issue

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment: OS: macOS Sierra 10.12.6 Node: 9.4.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 2.3 AI-162.3871768

Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.52.0 => 0.52.0

Steps to Reproduce

  1. react-native init AwesomeProject
  2. cd AwesomeProject/
  3. react-native run-ios

Expected Behavior

App should open without errors in the simulator.

Actual Behavior

simulator screen shot - iphone 6 - 2018-01-20 at 06 49 17

2018-01-20 06:56:30.960 [info][tid:main][RCTCxxBridge.mm:210] Initializing <RCTCxxBridge: 0x6040001c9d80> (parent: <RCTBridge: 0x6000000c6740>, executor: (null))
2018-01-20 06:56:30.963580-0800 AwesomeProject[72638:2085234] Initializing <RCTCxxBridge: 0x6040001c9d80> (parent: <RCTBridge: 0x6000000c6740>, executor: (null))
2018-01-20 06:56:31.034 [warn][tid:main][RCTBridge.m:120] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-01-20 06:56:31.034678-0800 AwesomeProject[72638:2085234] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-01-20 06:56:31.066 [warn][tid:main][RCTModuleData.mm:69] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-01-20 06:56:31.065913-0800 AwesomeProject[72638:2085234] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-01-20 06:56:31.095 [info][tid:main][RCTRootView.m:302] Running application AwesomeProject ({
    initialProps =     {
    };
    rootTag = 1;
})
2018-01-20 06:56:31.095703-0800 AwesomeProject[72638:2085234] Running application AwesomeProject ({
    initialProps =     {
    };
    rootTag = 1;
})
2018-01-20 06:56:31.250 [error][tid:NSOperationQueue 0x6040000399e0 (QOS: UNSPECIFIED)][RCTCxxBridge.mm:419] Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Metro Bundler has encountered an internal error, please check your terminal error output for more details (null))
2018-01-20 06:56:31.250740-0800 AwesomeProject[72638:2085588] Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Metro Bundler has encountered an internal error, please check your terminal error output for more details (null))

Reproducible Demo

Default app created using react-native init exhibits the issue. I also tried to downgrade to 0.51 but I’m seeing the same issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
marlosirapuancommented, Oct 26, 2018

same here. In my case I solved with this:

kill $(lsof -t -i:8081)

and build again on device

9reactions
arapocketcommented, Jan 29, 2018

I have this same issue and I’m on node 8.9.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

metro bundler has encountered an internal error and hangs in ...
To fix both issues I just ran 'npm install --save [missing package name] and it seemed to work and both times it brought...
Read more >
Metro Bundler has encountered an internal error, please ...
I`ve faced the same issue. In my case basically, it is because of some broken/wrong paths in imports statements. The issue gets solved...
Read more >
metro bundler has encountered an error: while trying to ...
failed to load bundle metro bundler has encountered an internal error ... Failed to load Info.plist, when they ran their app on simulator...
Read more >
metro waiting on exp | The Search Engine You Control
deleting the metro modules from node_modules , and running npm install worked for me . Open side panel. expo doesnt start properly. Asked...
Read more >
Troubleshooting build errors and crashes - Expo Documentation
When you get the Metro encountered an error during a native iOS build, it means Metro bundler failed to bundle the app. This...
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