React-Native App terminated due to NSInternalInconsistencyException - 'This method must not be called before the JS thread is created'

Viewed 1635

I want to run my React-Native app in debug mode on my iPhone. If run it in release there are no Problems, it runs just fine.

When I try to run it in debug it first seems fine and build the app. As expected it then installs to my iPhone and launches it. I can see the loading screen but the app won't finish loading. It just shows the loading screen and not the typical "connecting to metro server" or something like that

After a minute or two the app stops running in Expo and the error in the console says:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 
'This method must not be called before the JS thread is created'

references to main.m from the root project

Above the error are multiple connection attempts which all result in timeouts

Thank in advance!

1 Answers

Encountered the same issue while trying to achieve the same, could you please try following steps.

For your Xcode project > Product > Scheme > Edit scheme > Uncheck "Debug executable" checkbox and finally try running on debug mode on physical iPhone.

Related