React Native Mobile Application Crashing in TestFlight but works properly in Expo Go

44 views Asked by At

Our mobile application developed in React Native was tested using Expo Go and works as expected. However, when we transitioned to deployment and testing with TestFlight, we discovered that a specific button was causing the app to crash in testflight. Has anyone else experienced something like this before? Below is the crash log we get. (Inserted [redacted] for privacy)

Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: [redacted] [5827]
Triggered by Thread:  2
Application Specific Information:
abort() called
Last Exception Backtrace:
0   CoreFoundation                         0x198ee269c __exceptionPreprocess + 164
1   libobjc.A.dylib                        0x191177c80 objc_exception_throw + 60
2   [redacted]                             0x100a34fd4 0x1008e8000 + 1363924
3   [redacted]                             0x100aa32b0 0x1008e8000 + 1815216
4   [redacted]                             0x100aa3ae4 0x1008e8000 + 1817316
5   CoreFoundation                         0x198e27794 __invoking___ + 148
6   CoreFoundation                         0x198e2722c -[NSInvocation invoke] + 428
7   CoreFoundation                         0x198e27054 -[NSInvocation invokeWithTarget:] + 64
8   [redacted]                             0x100a644c4 0x1008e8000 + 1557700
9   [redacted]                             0x100a66514 0x1008e8000 + 1565972
10  [redacted]                             0x100a66164 0x1008e8000 + 1565028
11  libdispatch.dylib                      0x1a0deb6a8 _dispatch_call_block_and_release + 32
12  libdispatch.dylib                      0x1a0ded300 _dispatch_client_callout + 20
13  libdispatch.dylib                      0x1a0df4894 _dispatch_lane_serial_drain + 748
14  libdispatch.dylib                      0x1a0df53c4 _dispatch_lane_invoke + 380
15  libdispatch.dylib                      0x1a0e00004 _dispatch_root_queue_drain_deferred_wlh + 288
16  libdispatch.dylib                      0x1a0dff878 _dispatch_workloop_worker_thread + 404
17  libsystem_pthread.dylib                0x202e1b964 _pthread_wqthread + 288
18  libsystem_pthread.dylib                0x202e1ba04 start_wqthread + 8
Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib                 0x1e0555178 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1e0554f10 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1e0554e28 mach_msg_overwrite + 436
3   libsystem_kernel.dylib                 0x1e0554c68 mach_msg + 24
4   CoreFoundation                         0x198e2bb1c __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x198e29a14 __CFRunLoopRun + 1208
6   CoreFoundation                         0x198e29478 CFRunLoopRunSpecific + 608
7   GraphicsServices                       0x1dc3aa4f8 GSEventRunModal + 164
8   UIKitCore                              0x19b24d62c -[UIApplication _run] + 888
9   UIKitCore                              0x19b24cc68 UIApplicationMain + 340
10  [redacted]                             0x1008efa3c 0x1008e8000 + 31292
11  dyld                                   0x1bbb62dcc start + 2240
Thread 1:
0   libsystem_pthread.dylib                0x202e1b9fc start_wqthread + 0
Thread 2 name:   Dispatch queue: com.facebook.react.ExceptionsManagerQueue
Thread 2 Crashed:
0   libsystem_kernel.dylib                 0x1e055dfbc __pthread_kill + 8
1   libsystem_pthread.dylib                0x202e1f680 pthread_kill + 268
2   libsystem_c.dylib                      0x1a0ea5b90 abort + 180
3   libc++abi.dylib                        0x202d49ff8 abort_message + 132
4   libc++abi.dylib                        0x202d39f90 demangling_terminate_handler() + 348
5   libobjc.A.dylib                        0x19117ada4 _objc_terminate() + 144
6   libc++abi.dylib                        0x202d493bc std::__terminate(void (*)()) + 16
7   libc++abi.dylib                        0x202d49360 std::terminate() + 108
8   libdispatch.dylib                      0x1a0ded314 _dispatch_client_callout + 40
9   libdispatch.dylib                      0x1a0df4894 _dispatch_lane_serial_drain + 748
10  libdispatch.dylib                      0x1a0df53c4 _dispatch_lane_invoke + 380
11  libdispatch.dylib                      0x1a0e00004 _dispatch_root_queue_drain_deferred_wlh + 288
12  libdispatch.dylib                      0x1a0dff878 _dispatch_workloop_worker_thread + 404
13  libsystem_pthread.dylib                0x202e1b964 _pthread_wqthread + 288
14  libsystem_pthread.dylib                0x202e1ba04 start_wqthread + 8

Not really sure where to start/what to expect here and how to resolve our issue.

1

There are 1 answers

0
ko100v.d On

It seems the issue is only reproducible when the app is running with a release flag. I'm not familiar with Expo that much but using react-native-cli you can do two things.

  1. react-native run-ios --mode Release (This way you can run the application in release mode and check the logs in XCode directly)
  2. This is a bit more complex but you can bundle you're current js code with react-native bundle --dev false --platform ios --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios then you can start your metro server run the application and kill the metro server, the idea is that the application now will load the bundle created from the first command and you will probably be able to reproduce the issue.

This might be helpful - How to run expo start with release-channels