-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Description
Description
I have a working React Native app locally. When I archive it to distribute it (either through TestFlight or as IPA. tried both) my app immediately "crashes" (app stays open but React Native is unmounted, stuck in black screen). When I examine logs through Console.app I see the following cryptic error message:
8.15.0 - [Firebase/Crashlytics][I-CLS000000] Warning: NSUncaughtExceptionHandler is '_ZN10TypedArrayIL14TypedArrayKind3EE6updateERN8facebook3jsi7RuntimeERKNSt3__16vectorIhNS6_9allocatorIhEEEE' in '/private/var/containers/Bundle/Application/28A502B6-6B51-4AE9-84CD-70D88D0DFE41/MyApp.app/MyApp'
While I don't have proof, I strongly think it is the cause of the crash as it's a NSUncaughtExceptionHandler reported by Crashlytics (which I have in the app as the crash reporter).
When examined closely, the cryptic class/method has some words TypedArray, TypedArrayKind, update, facebook, JSI, Runtime, vector, and allocator.
I don't have Facebook SDK anywhere in the app so I suspect that "Facebook" is referring to an internal package name in React Native.
I'm stuck. I suspect it's got to do with the JSI runtime but I have no idea how to solve it.
I've tried falling back to JSC by using changing :hermes_enabled => false in use_react_native! (and reinstalling pods after that), yet still the same error.
I've also tried exporting AdHoc and Development export (and installing by AirDropping the IPA) in addition to App Store Connect export: they all yield the same error regardless.
I have app thinning off.
I've tried toggling both "Rebuild from Bitcode" and "Strip Swift symbols" on an off: they all yield the same error regardless.
Please note that this problem is occuring only on archived app: there isn't a problem locally when developing.
What might be the cause?
(also cross-posted at https://stackoverflow.com/questions/76361424/react-native-app-crashes-with-cryptic-error-when-archived-zn10typedarrayil14ty)
React Native Version
0.71.6
Output of npx react-native info
System:
OS: macOS 13.3.1
CPU: (10) arm64 Apple M1 Max
Memory: 937.75 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
Watchman: 2023.05.15.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK:
Android NDK: 17.2.4988734
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 18.0.1.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.6 => 0.71.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
- Try to run an archived app. Though this is a complex project and this is the first time I'm archiving this project so I don't know where it stems from.
Snack, code example, screenshot, or link to a repository
N/A