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
OTA updates cause Android (only) to crash on startup; requires new published release to resolve #11814
Comments
Hi! We require a minimal reproducible demo to be provided in each bug report so that we can quickly and efficiently investigate issues. It looks like you've left out the repro , so this is unlikely to get very much attention |
@cruzach Will see what I can do to reproduce, but as it seems to only occur on an app-store released app I wasn't sure if it would be possible to demo sufficiently. I'll have another look. |
I have the same issue on iOS. Can't figure out what the issue is here, its very frustrating. |
@kfernandes29 - this is not a problem that is occurring on expo's end. run @alexhouse - you can do expo/packages/expo/src/environment/validate.fx.ts Lines 12 to 16 in b390dd6
|
Expo CLI 4.2.1 environment info: |
@kfernandes29 - are you building your app with |
I'm using Xcode to build it with my Staging schema. |
can you share the details of the crash report that you are seeing? |
Unhandled JS Exception: Error: Cannot use t "__Schema" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different |
I think the issue is that my Xcode build is being created as Production, where as my OTA update with expo publish is being built as development? |
it looks like it's caused by graphql-js expecting to be run on a server environment where |
Yea, I'm looking into this response here. I'll give it a shot and let you know the result. |
So I have great news! I installed these 2 packages in my project: yarn add babel-plugin-transform-inline-environment-variables react-native-dotenv I was then able to set NODE_ENV=production in my .env file and do an 'expo publish' OTA Updates are working perfectly now! |
Hi! We are having the same issue as originally described by @alexhouse. It happens only on Android and as soon as the app tries to fetch new OTA updates. Our setup is exactly the same. OTA Updates were working before SDK 40. We tried setting Providing a reproducible demo here is almost impossible, as this happens only in the production app, once released. Building an apk and sharing it is also something we would like to avoid. @bradvatne @cruzach Are there any news on this issue or any hints on how to approach it? Thanks in advance |
I believe this is almost resolved in EAS now by using I imagine this broke as a result of the work on EAS update |
ah yes - when we officially release managed app preview support on eas build this will be resolved. it's fixed for sdk 41 already - we removed the concept of publish targets entirely. we documented this here |
@alexhouse @brentvatne Thank you for the quick responses. Actually, we aren't using EAS at all. To build the Android binary (apk file), we do For OTA updates, we simply use Might the issue be related to the fact that the Android build receiving the OTA update was created from a bare workflow? |
right, if you eject and build the app then you will need to publish with the the process you're using right now (eject, do some modifications, build apk) is similar to how EAS Build works for managed apps, which is why a similar approach to ota updates is required there |
I can confirm, that running |
Summary
I've set up and have had OTA updates running perfectly fine on previous SDK versions, but it seems to be around SDK 40 that OTA updates on Android just crash on every startup. In order to resolve this I have to publish a full new version on the Android store, which somewhat defeats the purpose of OTA updates.
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
40.0.1
Environment
Reproducible demo or steps to reproduce from a blank project
Actual error provided via
adb logcat
on a device with the published app installed following an update & restart:Immediately following update:
iOS appears unaffected - published updates download & restart with no problem.
Update triggered in code by a button press:
Last Android build using EAS
Jan 31, 2021 7:57 PM
The text was updated successfully, but these errors were encountered: