-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production only crash in expo-constants on samsung devices #25760
Comments
We are also seeing this, also only on Samsung devices. |
We have this issue as well, so far it seems specific to Samsung Android. |
Are you all using EAS Update? Is the app trying to fetch and apply an update on start (i.e. the way Expo's updates work by default)? This might have something to do with network connectivity or a race condition. Here's where the wording in this error message was introduced: #10239 Also, I see the check that throws this error seems to have been removed recently by @tsapeta: #23732 Maybe you can use diff --git packages/expo/build/Expo.fx.js packages/expo/build/Expo.fx.js
index 604e0be6f0..1eb0308c1a 100644
--- packages/expo/build/Expo.fx.js
+++ packages/expo/build/Expo.fx.js
@@ -1,4 +1,3 @@
-import './environment/validate.fx';
// load expo-asset immediately to set a custom `source` transformer in React Native
import 'expo-asset';
import Constants, { ExecutionEnvironment } from 'expo-constants'; I have no idea if the above patch will solve the problem. It might just cause it to crash somewhere else instead. It's just a guess based on seeing that this validation was removed recently. |
is anyone able to provide a full stacktrace with what is reported through sentry? there isn't much to go off of here - this error message could have a multitude of causes. for example - in one case it was reported, the developer who reported it found that their babel config was making changes that broke internals in unexpected ways: #20249 (comment) |
@jbaxleyiii - I looked at your project dependencies and found "@babel/plugin-transform-modules-commonjs" - so this seems potentially related to the comment I mentioned above - #20249 (comment) |
@jbaxleyiii - are you able to tell me which version of the |
@brentvatne I did stumble upon that other issue where the resolution was related to changing babel config, but I suspect it is a different issue, as in that case it seems like the issue was happening in development and was happening 100% of the3 time. To answer your other question, we are in fact using Expo Updates and checking for updates on startup. Maybe related, but we have seen the update check failing with a strange error related to updates being disabled, even though the app is running in production mode. This failure is intermittent as well, however not limited to Samsung devices. Sentry is not catching this error, and the places where I can see it (Google Play and Crashlytics) only show the raw native error which I can get if you think that would help. If that validation logic has since been removed, we can try the patch, but it would be great to know why it was removed. |
@nbonatsakis - are you able to tell me which version of the expo package you started to see this in? (perhaps by tracing crash reports back to app versions, and app versions to git commits). also, would you be able to look at a compare view between the commit prior to starting to see this issue, and the release where the issue started, and see if there is anything that jumps out to you? |
@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. |
@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 it has been happening since 48 but that is also when the project was started! I'm not manually using @babel/plugin-transform-modules-commonjs but I'll trace down my deps to see what is! This is my current babel setup:
Also, I just wanted to say thank you so much for taking a look @brentvatne! |
Any update on this one? We tried deploying an update with the patch suggested earlier in this issue, but the issue persists. |
In our case, the error started to occur when we migrated to expo version 48 |
In our project it also occurs on other devices... Motorola, Redmi and others |
I did the same and it still occurred |
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 |
@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:
|
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
@stevekuznetsov maybe see if you can enable Native Initialization: |
@wodin since we're on Expo, I don't think we have the ability to mess with the native layer for initialization, is that right? |
@stevekuznetsov you can with a config plugin, although I haven't looked into what exactly is required for native init |
I believe this issue is outdated. We no longer need to check if Expo native runtime is available in the same way. If I remember correctly, we rewrote this part in SDK 50. The setup is much simpler now and doesn't involve as many moving parts as it used to. Since we can't reproduce this behavior and we've made a lot of changes in the code related to that crash, I will close this issue for now. However, feel free to open a new one if you encounter similar problems on SDK 50 or 51. |
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 (#11814 (comment)).
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!
Environment
The text was updated successfully, but these errors were encountered: