expo: Expo Go on Android fails when EAS Update enabled

Summary

I can’t open projects via Expo Go on Android (2.24.3) if the project has EAS update configured. This affects SDK44 and SDK45.

The behaviour I see in Expo Go is “New update available, downloading…” and it doesn’t progress.

I am highly confident the issue is with Expo Go on Android, because: (1) The problem doesn’t occur on iOS. (2) With a previous version of the Expo app on Android (but the same app checkout from my git repo) I didn’t get the problem.

Managed or bare workflow? If you have made manual changes inside of the ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android

Package versions

"expo": "~45.0.0",
"expo-updates": "~0.13.1",

Environment

expo-env-info 1.0.3 environment info: System: OS: macOS 12.3.1 Shell: 5.8 - /bin/zsh Binaries: Node: 16.15.0 - /opt/homebrew/bin/node Yarn: 1.22.18 - /opt/homebrew/bin/yarn npm: 8.5.5 - /opt/homebrew/bin/npm Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 30, 31, 32 Build Tools: 29.0.3, 30.0.3, 32.0.0 System Images: android-32 | Google APIs ARM 64 v8a IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8092744 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild npmPackages: expo: ~45.0.0 => 45.0.3 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 npmGlobalPackages: expo-cli: 5.4.3 Expo Workflow: managed

Reproducible demo

https://github.com/GregAtFramework/eas-update-breaks-expo-go-on-android/commits/main

Stacktrace (if a crash is involved)

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 20 (6 by maintainers)

Commits related to this issue

Most upvoted comments

In my specific case, I solved this loading failure by removing the runtimeVersion from app.json 😌

@RGDEV2022

  1. You can remove runtimeVersion field first, then run expo start once.
  2. Try to open your app again with Expo GO. Your android app should run now.
  3. After it’s fixed, you can reinsert the runtimeVersion field if you still need it and it will work fine on all future expo start.

Thanks for the report! This should be fixed in the most recent version of Expo Go for Android that was released today.

Thanks for the repro. Looking into it now.

Ah, I was just able to repro this. It seems that having runtimeVersion in the app.json and expo start’ing it as a classic manifest does cause Expo Go to ignore the update since Expo Go only supports the SDK version runtime versions.

Some suggestions:

  • To force this to start as a modern manifest, you can run expo start --force-manifest-type=expo-updates. This will make the runtimeVersion behavior slightly different (it’ll turn runtimeVersion: { policy: 'sdkVersion' } into a runtime version compatible with Expo Go).
  • Alternatively, removing runtimeVersion from app.json will also work.

That being said, I’m curious what your setup is @Charles-Johnson. What is the value of runtimeVersion for you in app.json? Also, is your expo-updates configured to use classic updates (updates.url field in app.json looks like https://exp.host/@username/slug) or EAS update (updates.url field in app.json looks like https://u.expo.dev/<uuid>)?

I am running into this exact same issue as well. Only way I am able to run in Expo Go in Android is by commenting out the updates.url field in my app config file.

Removing updates.url doesn’t work for me. But doing so does give an error: Uncaught Error: java.lang.Exception: No launchable update was found. If this is a bare workflow app, make sure you have configured expo-updates correctly in android/app/build.gradle. I’m using managed workflow. Interestingly, a Google of this error message shows a longer-standing difference in iOS and Android behaviour.

In general, my impression is that Expo Go is designed to work together with the old-school “expo build” and “expo publish” build process, and shouldn’t really be used together with the new school “eas build”, “eas update”, “custom dev client” approach.

If you are using eas update and eas build then you are much better off building a custom dev client (which fortunately is really easy now).

Apart from these launch failures, testing an update with Expo Go won’t reveal whether it would make your production app crash because it relies on new native code.

For reference:

@wschurman I’m still experiencing this error but I’m using expo-updates v0.11.7 and expo SDK44. I will test upgrading expo-updates

Hey @wschurman, Seems I got into the issue now. The new update that you released it not working and expo is giving me the same error. image

  expo-env-info 1.0.3 environment info:
    System:
      OS: Windows 10 10.0.22000
    Binaries:
      Node: 16.13.2 - D:\nodejs\node.EXE
      Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 7.20.6 - ~\AppData\Roaming\npm\npm.CMD
    npmPackages:
      @expo/metro-config: 0.3.16 => 0.3.16
      expo: ^45.0.0 => 45.0.4
      react: 17.0.2 => 17.0.2
      react-dom: 17.0.2 => 17.0.2
      react-native: 0.68.2 => 0.68.2
      react-native-web: 0.17.7 => 0.17.7
    Expo Workflow: managed

Package versions:

"expo": "~45.0.0",
"expo-updates": "~0.13.2",