React Native / iOS TestFlight: instant crash on start

Viewed 2016

Thats my first app I'm trying to deploy. When I test it with TestFlight it crashed immediately. The app works fine for android and iOS on simulator. I also tested the release apk for android successfully.

Does someone understands what the following crash log means?

The App was built with React-Native.

Incident Identifier: 1144C002-DE4C-41AD-A6AF-8F7C8A760A7E
Beta Identifier:     839379BA-3B5B-4047-9CA8-A231CCD36128
Hardware Model:      iPhone11,2
Process:             bartenderrai [880]
Path:                /private/var/containers/Bundle/Application/E1BE6D04-1553-4EB8-A171-67B6D1181D2A/bartenderrai.app/bartenderrai
Identifier:          *****
Version:             1.2 (1.0)
AppStoreTools:       10B61
AppVariant:          1:iPhone11,2:12
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           ***** [689]


Date/Time:           2018-11-10 21:09:41.1513 +0100
Launch Time:         2018-11-10 21:09:40.8645 +0100
OS Version:          iPhone OS 12.1 (16B92)
Baseband Version:    1.01.30
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  3

Last Exception Backtrace:
0   CoreFoundation                  0x22f836f2c __exceptionPreprocess + 232 (NSException.m:172)
1   libobjc.A.dylib                 0x22ea34284 objc_exception_throw + 60 (objc-exception.mm:557)
2   bartenderrai                    0x102c8d40c RCTFatal + 448 (RCTAssert.m:132)
3   bartenderrai                    0x102c8aed4 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 492 (RCTExceptionsManager.m:58)
4   CoreFoundation                  0x22f83e8b4 __invoking___ + 148
5   CoreFoundation                  0x22f717538 -[NSInvocation invoke] + 308 (NSForwarding.m:3052)
6   CoreFoundation                  0x22f71816c -[NSInvocation invokeWithTarget:] + 64 (NSForwarding.m:3123)
7   bartenderrai                    0x102ca17d0 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 492 (RCTModuleMethod.mm:544)
8   bartenderrai                    0x102ce5c90 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 248 (RCTNativeModule.mm:99)
9   bartenderrai                    0x102ce59f0 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 88 (RCTNativeModule.mm:71)
10  libdispatch.dylib               0x22f23bd58 _dispatch_call_block_and_release + 32 (init.c:1372)
11  libdispatch.dylib               0x22f23d2f0 _dispatch_client_callout + 20 (object.m:511)
12  libdispatch.dylib               0x22f2446e0 _dispatch_lane_serial_drain + 552 (inline_internal.h:2441)
13  libdispatch.dylib               0x22f245228 _dispatch_lane_invoke + 368 (inline_internal.h:1808)
14  libdispatch.dylib               0x22f24d508 _dispatch_workloop_worker_thread + 588 (queue.c:5889)
15  libsystem_pthread.dylib         0x22f43cb20 _pthread_wqthread + 316 (pthread.c:2363)
16  libsystem_pthread.dylib         0x22f442dd4 start_wqthread + 4

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib          0x000000022f3b8a68 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x000000022f3b7f24 mach_msg + 76 (mach_msg.c:103)
2   CoreFoundation                  0x000000022f7c506c __CFRunLoopServiceMachPort + 240 (CFRunLoop.c:2615)
3   CoreFoundation                  0x000000022f7bfd08 __CFRunLoopRun + 1372 (CFRunLoop.c:2971)
4   CoreFoundation                  0x000000022f7bf494 CFRunLoopRunSpecific + 452 (CFRunLoop.c:3247)
5   GraphicsServices                0x0000000231a72be8 GSEventRunModal + 104 (GSEvent.c:2245)
6   UIKitCore                       0x000000025d3ce68c UIApplicationMain + 216 (UIApplication.m:4347)
7   bartenderrai                    0x0000000102c321c8 main + 88 (main.m:14)
8   libdyld.dylib                   0x000000022f275050 start + 4

Thread 1:
0   libsystem_pthread.dylib         0x000000022f442dd0 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib         0x000000022f442dd0 start_wqthread + 0

Thread 3 Crashed:
0   libsystem_kernel.dylib          0x000000022f3c40e4 __pthread_kill + 8
1   libsystem_pthread.dylib         0x000000022f43bb50 pthread_kill + 300 (pthread.c:1492)
2   libsystem_c.dylib               0x000000022f31bfcc abort + 144 (abort.c:94)
3   libc++abi.dylib                 0x000000022ea1b818 abort_message + 136 (abort_message.cpp:75)
4   libc++abi.dylib                 0x000000022ea1b9d8 default_terminate_handler() + 316 (cxa_default_handlers.cpp:68)
5   libobjc.A.dylib                 0x000000022ea346c8 _objc_terminate() + 124 (objc-exception.mm:693)
6   libc++abi.dylib                 0x000000022ea282d0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:66)
7   libc++abi.dylib                 0x000000022ea28344 std::terminate() + 60 (cxa_handlers.cpp:97)
8   libdispatch.dylib               0x000000022f23d304 _dispatch_client_callout + 40 (object.m:514)
9   libdispatch.dylib               0x000000022f2446e0 _dispatch_lane_serial_drain + 552 (inline_internal.h:2441)
10  libdispatch.dylib               0x000000022f245228 _dispatch_lane_invoke + 368 (inline_internal.h:1808)
11  libdispatch.dylib               0x000000022f24d508 _dispatch_workloop_worker_thread + 588 (queue.c:5889)
12  libsystem_pthread.dylib         0x000000022f43cb20 _pthread_wqthread + 316 (pthread.c:2363)
13  libsystem_pthread.dylib         0x000000022f442dd4 start_wqthread + 4
2 Answers

Clean build your project and make sure to select Release in edit scheme menu, if you have not done that then I guess that is the problem

Clean your build folder and restart your Xcode. Also, make sure that you have generated your Provisioning profiles for Distribution and not iOS Development. The development will be for local builds and for Testflight you will need distribution profiles. You can create them here: https://developer.apple.com/account/resources/profiles/list and import them to your project. You can switch from Automatically Sign project to Manual signing and then select your correct provisioning profile.

Related