Closed
Description
Description
I created a new app with react-native init
and tried to run it in release mode by changing the scheme.
The problem is that the app crashes immediately after opening it.
Xcode throws an error "No script URL provided"
I I've already checked the contents of the generated .app as described in this answer http://stackoverflow.com/a/41986215/1978520 and I found that the main.jsbundle
file is not in there. I tried generating and adding it manually as described in this answer http://stackoverflow.com/a/41803596/1978520 but that didn't work
Reproduction Steps and Sample Code
Just making an empty project, but this only happens in my MacBook.
Additional Information
- React Native version: 0.42.3
- Platform: iOS
- Development Operating System: MacOS
- Xcode version: 8.2.1
Here is the full error displayed by Xcode:
2017-03-24 15:58:32.157 mobile2[34596:18071781] * Terminating app due to uncaught exception 'RCTFatalException: No script URL provided. Make sure the packager is running or you have embedded a JS bundle in your application bundle.unsanitizedScriptURLString:((null))', reason: 'No script URL provided. Make sure the packager is running or you have embed...'
* First throw call stack:
(
0 CoreFoundation 0x000000010ee86d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d49921e objc_exception_throw + 48
2 CoreFoundation 0x000000010eef02b5 +[NSException raise:format:] + 197
3 mobile2 0x000000010cbb92fc RCTFatal + 393
4 mobile2 0x000000010cbdb724 -[RCTBatchedBridge stopLoadingWithError:] + 603
5 mobile2 0x000000010cbd87cf __25-[RCTBatchedBridge start]_block_invoke_2 + 42
6 libdispatch.dylib 0x0000000112e88978 _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x0000000112eb20cd _dispatch_client_callout + 8
8 libdispatch.dylib 0x0000000112e928a4 _dispatch_main_queue_callback_4CF + 406
9 CoreFoundation 0x000000010ee4ae49 _CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE_ + 9
10 CoreFoundation 0x000000010ee1037d __CFRunLoopRun + 2205
11 CoreFoundation 0x000000010ee0f884 CFRunLoopRunSpecific + 420
12 GraphicsServices 0x00000001147b8a6f GSEventRunModal + 161
13 UIKit 0x000000011154cc68 UIApplicationMain + 159
14 mobile2 0x000000010cb9b861 main + 80
15 libdyld.dylib 0x0000000112efe68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException