expo: Production only crash in expo-constants on samsung devices
Summary
Hey Expo team, I’m experiencing a hard-to-debug crash and was hoping you had some pointers or an idea of what to do next. Over the last 3 months, our Android app has been crashing at a rate of around 20% per user but primarily on Samsung devices. I haven’t been able to reproduce it outside of a production build and it is quite rare to be able to make it happen on production as well.
The behavior is that of a delayed then sudden crash that doesn’t seem to be tied to any user behavior. The only insight that we have is from the Google play crash logs (sentry isn’t picking this up). The stack is below but the top line is:
Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.dev.
From what I can tell this only happens in expo-constants (https://github.com/expo/expo/issues/11814#issuecomment-791113060).
I don’t have a reproducible example app since this only happens in production builds but I’ve included a link to a recent EAS build that did have the crash at least once.
Sorry for the cryptic error but at this point I’m pretty lost on what to do next!
Exception com.facebook.react.common.JavascriptException: Error: Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.dev., js engine: hermes, stack:
anonymous@1:703526
loadModuleImplementation@1:94248
guardedLoadModule@1:93803
metroRequire@1:93431
anonymous@1:702325
loadModuleImplementation@1:94248
guardedLoadModule@1:93803
metroRequire@1:93431
anonymous@1:701478
loadModuleImplementation@1:94248
guardedLoadModule@1:93803
metroRequire@1:93431
anonymous@1:700816
loadModuleImplementation@1:94248
guardedLoadModule@1:93803
metroRequire@1:93431
anonymous@1:100685
loadModuleImplementation@1:94248
guardedLoadModule@1:93760
metroRequire@1:93431
global@1:92987
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException (ExceptionsManagerModule.java:65)
at java.lang.reflect.Method.invoke
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188)
at com.facebook.jni.NativeRunnable.run
at android.os.Handler.handleCallback (Handler.java:942)
at android.os.Handler.dispatchMessage (Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
at android.os.Looper.loopOnce (Looper.java:201)
at android.os.Looper.loop (Looper.java:288)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228)
at java.lang.Thread.run (Thread.java:1012)
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 14.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
Yarn: 3.6.0 - ~/.nvm/versions/node/v18.16.0/bin/yarn
npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
Managers:
CocoaPods: 1.13.0 - /usr/local/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
Android SDK:
API Levels: 33, 34
Build Tools: 30.0.3, 33.0.0, 34.0.0
System Images: android-33 | Google APIs ARM 64 v8a, android-34 | Google APIs ARM 64 v8a, android-34 | Google Play ARM 64 v8a
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
npmPackages:
expo: ^49.0.16 => 49.0.16
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.6 => 0.72.6
react-native-web: ~0.19.9 => 0.19.9
npmGlobalPackages:
eas-cli: 5.9.0
Expo Workflow: bare
About this issue
- Original URL
- State: open
- Created 7 months ago
- Reactions: 2
- Comments: 18 (9 by maintainers)
@brentvatne could you please point me to some documentation on how to get better information to you? We’re seeing errors like this and all we have to go off of are issues in the Google Play console, for whatever reason Sentry has not caught any of these. An example:
we have been out of office since dec 22, but it looks like there still isn’t much to go on here. anything folks can share that can help us to understand when/how this happens and especially how we can reproduce it would be much appreciated. a full sentry stack trace would also be great
@nbonatsakis - one way you could improve reporting with sentry is by enabling auto init on the native side in your AndroidManifest - https://docs.sentry.io/platforms/react-native/manual-setup/native-init/
@brentvatne Unfortunately we’ve only released the Android version of our app this past August and I believe we’ve been experiencing this crash since the beginning, however we’ve just started really trying to address crashes. It’s hard to tell however, because it shows up in Play Console as a common JS error with no detail. Firebase has the detail I’ve posted here, but that’s only been in the app for a few weeks.