My Expo app crashes immediately when started in TestFlight. The app is working correctly in --no-dev
mode.
Side note: the application had some uncaught exception originating from SplashScreen
handling but that seems to have disappeared by moving SplashScreen.preventAutoHideAsync();
outside the app entry point class.
I’ve set the ErrorUtils.setGlobalHandler
handler to muting all errors.
How can I come to better understanding of where the problem is to be able to fix it?
Crash report:
Incident Identifier: 27B3A01B-8E32-4564-8ABA-4B833E901F4B
Distributor ID: com.apple.TestFlight
Hardware Model: iPhone13,2
Process: XXX [20508]
Path: /private/var/containers/Bundle/Application/3CE6E33A-1730-4AF2-B773-744CB3184871/XXX.app/XXX
Identifier: com.xxx
Version: 1.0.4 (5)
AppStoreTools: 15F31e
AppVariant: 1:iPhone13,2:17.4
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.xxx [2937]
Date/Time: 2024-07-15 01:46:02.3170 +0200
Launch Time: 2024-07-15 01:46:00.5863 +0200
OS Version: iPhone OS 17.5.1 (21F90)
Release Type: User
Baseband Version: 4.50.06
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: XXX [20508]
Triggered by Thread: 19
Last Exception Backtrace:
0 CoreFoundation 0x1a25ecf20 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x19a49a018 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x1a26eb580 -[NSException raise] + 16 (NSException.m:129)
3 XXX 0x1003cc4ec ErrorRecovery.crash() + 2672 (ErrorRecovery.swift:286)
4 XXX 0x1003cb1f4 ErrorRecovery.runNextTask() + 824 (ErrorRecovery.swift:199)
5 XXX 0x1003cc8c4 closure #1 in closure #1 in ErrorRecovery.tryRelaunchFromCache() + 232 (ErrorRecovery.swift:242)
6 XXX 0x1003b910c thunk for @escaping @callee_guaranteed @Sendable () -> () + 28 (<compiler-generated>:0)
7 libdispatch.dylib 0x1aa49013c _dispatch_call_block_and_release + 32 (init.c:1530)
8 libdispatch.dylib 0x1aa491dd4 _dispatch_client_callout + 20 (object.m:576)
9 libdispatch.dylib 0x1aa499400 _dispatch_lane_serial_drain + 748 (queue.c:3900)
10 libdispatch.dylib 0x1aa499f30 _dispatch_lane_invoke + 380 (queue.c:3991)
11 libdispatch.dylib 0x1aa4a4cb4 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6998)
12 libdispatch.dylib 0x1aa4a4528 _dispatch_workloop_worker_thread + 404 (queue.c:6592)
13 libsystem_pthread.dylib 0x1ff443934 _pthread_wqthread + 288 (pthread.c:2696)
14 libsystem_pthread.dylib 0x1ff4400cc start_wqthread + 8 (:-1)
App entry class:
SplashScreen.preventAutoHideAsync();
export const Index = () => {
useKeepAwake()
const [fontsLoaded] = useFonts({
'regular': require('../assets/fonts/Regular.ttf'),
'bold': require('../assets/fonts/Bold.ttf'),
'monospace': require('../assets/fonts/Regular.ttf'),
});
useEffect(() => {
Appearance.setColorScheme("dark")
const myErrorHandler:ErrorHandlerCallback = (e, isFatal) => {}
ErrorUtils.setGlobalHandler(myErrorHandler)
},[])
const onLayoutRootView = useCallback(async () => {
if (fontsLoaded) {
await SplashScreen.hideAsync();
}
}, [fontsLoaded]);
if (!fontsLoaded) {
return null;
}
return (
<View onLayout={onLayoutRootView} style={{ backgroundColor: "black", flex: 1, width: "100%" }}>
<Bootstrap/>
</View>
);
}
Thank you,
Niclas