React native application crashing at launch time on iOS

Viewed 95

My app is currently quite simple, the most complex part is App.js and here it

import 'react-native-gesture-handler'; // Let me first otherwise I'll break your app in prod 
import 'expo-dev-client';
import * as Sentry from 'sentry-expo';

import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import MenuDrawer from './src/menu/drawer';
import './src/internationalization/i18n';

Sentry.init({
  dsn: 'DSN',
  enableInExpoDevelopment: process.env.NODE_ENV !== 'test',
  // If `true`, Sentry will try to print out useful debugging information
  // if something goes wrong with sending the event. Set it to `false` in production
  debug: true,
});

export default function App() {
  return (
    <NavigationContainer>
      <MenuDrawer />
    </NavigationContainer>
  );
}

Here is the stacktrace after crash

Incident Identifier: 94C73A96-CE6C-46DB-B478-404A657FF429
Hardware Model:      iPhone11,8
Process:             TheVillage [55456]
Path:                /private/var/containers/Bundle/Application/51B553E0-7D46-489E-86F1-A5927E974C53/TheVillage.app/TheVillage
Identifier:          com.thevilage.thevilage
Version:             2.0.0 (61)
AppStoreTools:       13F100
AppVariant:          1:iPhone11,8:15
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.thevilage.thevilage [2490]

Date/Time:           2022-08-24 17:18:57.9504 +0200
Launch Time:         2022-08-24 17:18:57.0965 +0200
OS Version:          iPhone OS 15.6.1 (19G82)
Release Type:        User
Baseband Version:    4.04.02
Report Version:      104

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

Last Exception Backtrace:
0   CoreFoundation                  0x18b13d288 __exceptionPreprocess + 220 (NSException.m:200)
1   libobjc.A.dylib                 0x1a3e6d744 objc_exception_throw + 60 (objc-exception.mm:565)
2   TheVillage          0x1009150b0 RCTFatal + 668 (RCTAssert.m:147)
3   TheVillage          0x100995380 -[RCTExceptionsManager reportFatal:stack:exceptionId:extraDataAsJSON:] + 532 (RCTExceptionsManager.mm:77)
4   TheVillage          0x100995cc0 0x10081c000 + 1547456 (RCTExceptionsManager.mm:147)
5   CoreFoundation                  0x18b0c5b24 __invoking___ + 148 (:-1)
6   CoreFoundation                  0x18b0e3610 -[NSInvocation invoke] + 468 (NSForwarding.m:3378)
7   CoreFoundation                  0x18b11a5fc -[NSInvocation invokeWithTarget:] + 80 (NSForwarding.m:3475)
8   TheVillage          0x1009478fc -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:584)
9   TheVillage          0x100949ef0 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext) + 540 (RCTNativeModule.mm:183)
10  TheVillage          0x100949b20 0x10081c000 + 1235744
11  libdispatch.dylib               0x18ada2e6c _dispatch_call_block_and_release + 32 (init.c:1517)
12  libdispatch.dylib               0x18ada4a30 _dispatch_client_callout + 20 (object.m:560)
13  libdispatch.dylib               0x18adac124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
14  libdispatch.dylib               0x18adacc80 _dispatch_lane_invoke + 392 (queue.c:3944)
15  libdispatch.dylib               0x18adb7500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
16  libsystem_pthread.dylib         0x1fc2fd0bc _pthread_wqthread + 288 (pthread.c:2599)
17  libsystem_pthread.dylib         0x1fc2fce5c start_wqthread + 8 (:-1)

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib          0x00000001c2bda4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001c2bdaae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x000000018b0aad30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x000000018b0af1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x000000018b0c2bc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   GraphicsServices                0x00000001a722e374 GSEventRunModal + 164 (GSEvent.c:2200)
6   UIKitCore                       0x000000018da36b58 -[UIApplication _run] + 1100 (UIApplication.m:3511)
7   UIKitCore                       0x000000018d7b8090 UIApplicationMain + 364 (UIApplication.m:5064)
8   TheVillage          0x0000000100822bd0 main + 88 (main.m:7)
9   dyld                            0x0000000100e01da4 start + 520 (dyldMain.cpp:879)

Thread 1:
0   libsystem_pthread.dylib         0x00000001fc2fce54 start_wqthread + 0 (:-1)

Thread 2 name:
Thread 2 Crashed:
0   libsystem_kernel.dylib          0x00000001c2be0b38 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc3033bc pthread_kill + 268 (pthread.c:1668)
2   libsystem_c.dylib               0x000000019624f524 abort + 168 (abort.c:118)
3   libc++abi.dylib                 0x00000001a3f78b7c abort_message + 132 (abort_message.cpp:78)
4   libc++abi.dylib                 0x00000001a3f689c4 demangling_terminate_handler() + 336 (cxa_default_handlers.cpp:71)
5   libobjc.A.dylib                 0x00000001a3e73c68 _objc_terminate() + 144 (objc-exception.mm:701)
6   libc++abi.dylib                 0x00000001a3f77f18 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7   libc++abi.dylib                 0x00000001a3f77eb4 std::terminate() + 64 (cxa_handlers.cpp:88)
8   libdispatch.dylib               0x000000018ada4a44 _dispatch_client_callout + 40 (object.m:563)
9   libdispatch.dylib               0x000000018adac124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
10  libdispatch.dylib               0x000000018adacc80 _dispatch_lane_invoke + 392 (queue.c:3944)
11  libdispatch.dylib               0x000000018adb7500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
12  libsystem_pthread.dylib         0x00000001fc2fd0bc _pthread_wqthread + 288 (pthread.c:2599)
13  libsystem_pthread.dylib         0x00000001fc2fce5c start_wqthread + 8 (:-1)

Thread 3:
0   libsystem_pthread.dylib         0x00000001fc2fce54 start_wqthread + 0 (:-1)

Thread 4:
0   libsystem_pthread.dylib         0x00000001fc2fce54 start_wqthread + 0 (:-1)

Thread 5:
0   libsystem_pthread.dylib         0x00000001fc2fce54 start_wqthread + 0 (:-1)

Thread 6:
0   libsystem_pthread.dylib         0x00000001fc2fce54 start_wqthread + 0 (:-1)

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib          0x00000001c2bda4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001c2bdaae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x000000018b0aad30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x000000018b0af1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x000000018b0c2bc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Foundation                      0x000000018c8b5444 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6   Foundation                      0x000000018c8f6e0c -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7   UIKitCore                       0x000000018d9b0cc4 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8   Foundation                      0x000000018c90541c __NSThread__start__ + 808 (NSThread.m:972)
9   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x00000001c2bda4a0 mach_msg_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001c2bdaae4 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x000000018b0aad30 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x000000018b0af1bc __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x000000018b0c2bc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   TheVillage          0x0000000100928c04 +[RCTCxxBridge runRunLoop] + 264 (RCTCxxBridge.mm:335)
6   Foundation                      0x000000018c90541c __NSThread__start__ + 808 (NSThread.m:972)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x00000001963f2148 scavenger_thread_main + 1232 (pas_scavenger.c:135)
3   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
4   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x0000000196350c20 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1844 (ThreadingPOSIX.cpp:622)
3   JavaScriptCore                  0x0000000196315c18 bool WTF::Condition::waitUntilUnchecked<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 308 (ParkingLot.h:82)
4   JavaScriptCore                  0x00000001963160a0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 260 (Condition.h:77)
5   JavaScriptCore                  0x0000000196371dc4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Function.h:82)
6   JavaScriptCore                  0x00000001963740d0 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:242)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x0000000196350c20 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1844 (ThreadingPOSIX.cpp:622)
3   JavaScriptCore                  0x0000000196315c18 bool WTF::Condition::waitUntilUnchecked<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 308 (ParkingLot.h:82)
4   JavaScriptCore                  0x00000001963160a0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 260 (Condition.h:77)
5   JavaScriptCore                  0x0000000196371dc4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Function.h:82)
6   JavaScriptCore                  0x00000001963740d0 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:242)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x0000000196350c20 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1844 (ThreadingPOSIX.cpp:622)
3   JavaScriptCore                  0x0000000196315c18 bool WTF::Condition::waitUntilUnchecked<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 308 (ParkingLot.h:82)
4   JavaScriptCore                  0x00000001963160a0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 260 (Condition.h:77)
5   JavaScriptCore                  0x0000000196371dc4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Function.h:82)
6   JavaScriptCore                  0x00000001963740d0 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:242)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 13 name:
Thread 13:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x0000000196350c20 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1844 (ThreadingPOSIX.cpp:622)
3   JavaScriptCore                  0x0000000196315c18 bool WTF::Condition::waitUntilUnchecked<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 308 (ParkingLot.h:82)
4   JavaScriptCore                  0x00000001963160a0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 260 (Condition.h:77)
5   JavaScriptCore                  0x0000000196371dc4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Function.h:82)
6   JavaScriptCore                  0x00000001963740d0 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:242)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 14 name:
Thread 14:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x0000000196350c20 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1844 (ThreadingPOSIX.cpp:622)
3   JavaScriptCore                  0x0000000196315c18 bool WTF::Condition::waitUntilUnchecked<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 308 (ParkingLot.h:82)
4   JavaScriptCore                  0x00000001963160a0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 260 (Condition.h:77)
5   JavaScriptCore                  0x0000000196371dc4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Function.h:82)
6   JavaScriptCore                  0x00000001963740d0 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:242)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)

Thread 15 name:
Thread 15:
0   libsystem_kernel.dylib          0x00000001c2bdaf24 __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fc304298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   JavaScriptCore                  0x0000000196350c20 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 1844 (ThreadingPOSIX.cpp:622)
3   JavaScriptCore                  0x0000000196315c18 bool WTF::Condition::waitUntilUnchecked<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 308 (ParkingLot.h:82)
4   JavaScriptCore                  0x00000001963160a0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 260 (Condition.h:77)
5   JavaScriptCore                  0x0000000196371dc4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 352 (Function.h:82)
6   JavaScriptCore                  0x00000001963740d0 WTF::wtfThreadEntryPoint(void*) + 16 (ThreadingPOSIX.cpp:242)
7   libsystem_pthread.dylib         0x00000001fc2fd9ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000001fc2fce68 thread_start + 8 (:-1)


Thread 2 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000001a3f7c0f5   x5: 0x000000016f6f6430   x6: 0x000000000000006e   x7: 0x0000000000000600
    x8: 0x1bb77aba962a849d   x9: 0x1bb77abbf945f49d  x10: 0x0000000000000200  x11: 0x000000000000000b
   x12: 0x000000000000000b  x13: 0x000000018b47aa9f  x14: 0x00000001a3f7c11b  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x000000016f6f7000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000002803  x21: 0x000000016f6f70e0  x22: 0x0000000000000000  x23: 0x000000016f6f70e0
   x24: 0x0000000000000000  x25: 0x0000000282347b68  x26: 0x0000000000000114  x27: 0x0000000000000000
   x28: 0x0000000281874440   fp: 0x000000016f6f63a0   lr: 0x00000001fc3033bc
    sp: 0x000000016f6f6380   pc: 0x00000001c2be0b38 cpsr: 0x40000000
   esr: 0x56000080  Address size fault


Binary Images:
0x10081c000 - 0x100adffff TheVillage arm64  <e134bf77b2ad34eb9d5de9ef12b0a84d> /private/var/containers/Bundle/Application/51B553E0-7D46-489E-86F1-A5927E974C53/TheVillage.app/TheVillage
0x100de8000 - 0x100e3ffff dyld arm64e  <66e1fb2668f8379ba052eb8b8291b5e1> /usr/lib/dyld
0x18ada1000 - 0x18ade6fff libdispatch.dylib arm64e  <e3ea4f635d11342aaf199f58dbc8e259> /usr/lib/system/libdispatch.dylib
0x18b0a4000 - 0x18b4f9fff CoreFoundation arm64e  <6b22dd8135853be6bc77ba19810ec0f2> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x18c89c000 - 0x18cba6fff Foundation arm64e  <ee1abaf23d7137fb906715aa79528619> /System/Library/Frameworks/Foundation.framework/Foundation
0x18d522000 - 0x18edbffff UIKitCore arm64e  <137a95aada6d332cbc01e13bb9b6e317> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x19622f000 - 0x1962aefff libsystem_c.dylib arm64e  <86a1a24ace353769ba6960f28353281e> /usr/lib/system/libsystem_c.dylib
0x196307000 - 0x19778bfff JavaScriptCore arm64e  <e76b377fc862395a9439d12b09a59e07> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
0x1a3e57000 - 0x1a3e93fff libobjc.A.dylib arm64e  <f6368be9109b3405b282624040529afd> /usr/lib/libobjc.A.dylib
0x1a3f67000 - 0x1a3f7efff libc++abi.dylib arm64e  <d00067b20a7a3cb9b4d407b160da261b> /usr/lib/libc++abi.dylib
0x1a722d000 - 0x1a7235fff GraphicsServices arm64e  <a094e7b51d4037c5902756d86988ec4b> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1c2bd9000 - 0x1c2c0efff libsystem_kernel.dylib arm64e  <1fb39303587b320eaeb8e51a54c8a4a9> /usr/lib/system/libsystem_kernel.dylib
0x1fc2fc000 - 0x1fc307fff libsystem_pthread.dylib arm64e  <adc41700002e3a2bb4a1eb5fbf575770> /usr/lib/system/libsystem_pthread.dylib

EOF

I already tried to add sentry to my app; it's not sending any error.

Side information:

  • It's working on the android build
  • The app is built on EAS
  • The app is submit to Testflight (working in dev env with no error or warning)
  • I'm using expo standard setup
  • The tests suite is green, the code is eslinted

Here are all dependencies:

{
  "name": "mobishop",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "dependencies": {
    "@babel/preset-env": "^7.18.9",
    "@expo/vector-icons": "^13.0.0",
    "@react-navigation/drawer": "^6.4.3",
    "@react-navigation/native": "^6.0.11",
    "@rneui/base": "^4.0.0-rc.6",
    "@rneui/themed": "^4.0.0-rc.6",
    "@sentry/react-native": "^4.1.3",
    "@testing-library/react-native": "^11.0.0",
    "axios": "^0.27.2",
    "core-js": "^3.24.0",
    "deepmerge": "^4.2.2",
    "dotenv": "^16.0.1",
    "expo": "^46.0.0",
    "expo-application": "~4.2.2",
    "expo-constants": "~13.2.3",
    "expo-dev-client": "~1.2.1",
    "expo-device": "~4.3.0",
    "expo-localization": "~13.1.0",
    "expo-status-bar": "~1.4.0",
    "expo-updates": "~0.14.4",
    "i18next": "^21.8.14",
    "jest-expo": "^46.0.0",
    "prop-types": "^15.8.1",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-i18next": "^11.18.3",
    "react-native": "0.69.4",
    "react-native-dotenv": "^3.3.1",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-reanimated": "~2.9.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "~0.18.7",
    "react-shallow-renderer": "^16.15.0",
    "sentry-expo": "~5.0.0"
  },
  "devDependencies": {
    "@babel/cli": "^7.18.10",
    "@babel/core": "^7.18.6",
    "@expo/webpack-config": "^0.17.0",
    "@jest/globals": "^28.1.3",
    "babel-plugin-i18next-extract": "^0.9.0-rc",
    "eslint": "^8.20.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-react": "^7.28.0",
    "eslint-plugin-react-hooks": "^4.3.0",
    "eslint-plugin-react-native": "^4.0.0",
    "husky": "^8.0.1",
    "jest": "^26.6.3",
    "react-native-clean-project": "^4.0.1",
    "react-test-renderer": "18.0.0"
  },
  "private": true,
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "jsx",
      "ts",
      "tsx",
      "node",
      "mjs"
    ],
    "preset": "jest-expo",
    "setupFiles": [
      "<rootDir>/jest/setup.js"
    ],
    "transformIgnorePatterns": [
      "node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|@sentry/.*|@rneui/.*)"
    ],
    "transform": {
      "^.+\\.(js|jsx|mjs)$": "babel-jest"
    },
    "collectCoverage": true,
    "collectCoverageFrom": [
      "**/*.{js,jsx}",
      "!**/coverage/**",
      "!**/node_modules/**",
      "!**/babel.config.js",
      "!**/jest.setup.js"
    ]
  }
}
1 Answers

Little late now but I had the exact same error in my managed Expo project and was able to fix it thanks to this blog (in Japanese), maybe you have the same problem.

Essentially I hadn't properly followed the installation instructions (see docs) for React Navigation. The two steps I had missed were:

  1. Installing and importing react-native-gesture-handler

Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms.

  1. Running npx expo install react-native-screens react-native-safe-area-context

After executing these two commands the app works fine in TestFlight as well, I'm not sure if both of these commands are necessary but might as well follow the docs completely.

Related