expo: [ SDK 44 ] Can't open app in expo go when update to sdk 44

Summary

I was using expo sdk 43 before, and always use expo start to create a local host and work on my android phone.

Now I want to use eas update in the future, so I’ve read this article and followed the Managed workflow to upgrade to sdk44. And then followed the docs here to install expo-updates@0.11.2.

And after I successfully upgrade to sdk44. When I type expo start and want to open on my phone, it says “Something went wrong, Could not load exp://192.168.2.52:19000”.

And when I click the view error log, it says “Uncaught Error: java.lang.Exception: Incompatible SDK version”. I test it on a iOS simulator still can’t open.

I’ve use eas build -p android to build an apk, and install it in my phone. Then everything works fine. So does I miss any extra installation? or it really has a bug when upgrade from sdk43 to sdk44?

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

managed

What platform(s) does this occur on?

Android, iOS

SDK Version (managed workflow only)

44.0.0

Environment

expo diagnostics:

  Expo CLI 5.1.2 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.0 - /usr/local/bin/node
      Yarn: 1.22.17 - /usr/local/bin/yarn
      npm: 6.14.13 - /usr/local/bin/npm
      Watchman: 2021.09.06.00 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.6953283
      Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^44.0.0 => 44.0.6 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
      react-navigation: ^4.4.4 => 4.4.4 
    npmGlobalPackages:
      eas-cli: 0.47.0
      expo-cli: 5.1.2
    Expo Workflow: managed

expo go:

android client version: 2.23.2
iOS client version: 2.23.2.101

Reproducible demo

I create a new project by expo init. And it can run on my device.

So I think this can’t be reproduce, because this is an issue about upgrading from sdk43 to sdk44.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

I was configuring eas update and ran into the same behaviour and error, i.e. Uncaught Error: java.lang.Exception: Incompatible SDK version and am unable to use Expo Go or the iOS simulator.`

I can resolve if I set runtimeVersion to "policy": "sdkVersion". Any other value of runtimeVersion leads to the issue.

how do you configure this? I show in app.json

"runtimeVersion": "1.0.0",

instead should it be

"runtimeVersion": {
    "policy": "sdkVersion"
}

then on publish i see

before:

Branch           main
Runtime version  1.0.0
Platform         ios

after:

Branch           main
Runtime version  exposdk:45.0.0
Platform         ios

It appears this issue should not be closed. Per https://github.com/expo/expo/issues/16293#issuecomment-1111168392, the runtimeVersion configuration options for eas update are incompatible with Expo Go, and that should be considered a bug.

I was configuring eas update and ran into the same behaviour and error, i.e. Uncaught Error: java.lang.Exception: Incompatible SDK version and am unable to use Expo Go or the iOS simulator.`

I can resolve if I set runtimeVersion to "policy": "sdkVersion". Any other value of runtimeVersion leads to the issue.

I can’t upvote this answer enough! I had done the same thing, I configured EAS build and update per the expo 44 documentation and it wrote a value into the runtimeVersion property in app.json. I took me 2 days to figure this one out, and the resolution was just to remove the runtimeVersion property altogether.

thanks! to my surprise these two are interchangable and now we’re happy buildin’ again

"runtimeVersion": "1.0.0",

"runtimeVersion": {
    "policy": "sdkVersion"
}

same issue here. SDK 46, did east configure and now I can’t open the Expo Go on my phone or the simulator. So frustrating …

Agreed with @kendallroth. This is incredibly confusing. I’d recommend:

  • explicitly stating on the runtime versions page that using the appVersion flag will immediately prevent you from running Expo Go. The information is buried in this page that I didn’t need to read at any step in setting up EAS Updates.
  • adding a more helpful error message than “Incompatible SDK version or no SDK version specified” in Expo Go. Even just saying “Incompatible SDK version, no SDK version specified, or using runtime policy that is not ‘sdkVersion’” would have immediately helped me know what was going on.
  • but even better: why couldn’t Expo Go support this? The appVersion flag is super useful, and it’s really a shame that Expo Go can’t be used if I choose to use the falg. I suppose I’ll switch back to using sdkVersion, but that’s not nearly as useful to me, since expo dev client adds quite a bit more overhead to my dev process than Expo Go.

Here’s a quick hack that allows you to use appVersion and Expo go.

In package.json:

"start": "USING_EXPO_GO=true expo start",

In app.config.ts:

policy: process.env.USING_EXPO_GO ? 'sdkVersion' : 'appVersion',

Hat tip to @zetter for the inspiration here: https://github.com/expo/expo/issues/18631#issuecomment-1256449111

Thanks… runtimeVersion was the issue here