Skip to content
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

Error: Runtime version policies are only supported in the managed workflow #1689

Closed
huy-lv opened this issue Dec 10, 2022 · 19 comments · Fixed by #1910
Closed

Error: Runtime version policies are only supported in the managed workflow #1689

huy-lv opened this issue Dec 10, 2022 · 19 comments · Fixed by #1910
Assignees
Labels
eas update needs review Issue is ready to be reviewed by a maintainer

Comments

@huy-lv
Copy link

huy-lv commented Dec 10, 2022

Summary

Hi, I ran command eas update --auto and got this error. Please help :D

Error: Runtime version policies are only supported in the managed 
    workflow. In the bare workflow, runtime version needs to be set manually.

Runtime version policies are only supported
image

What platform(s) does this occur on?

Android

SDK Version

46

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.0
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.19.3 - /usr/local/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v14.19.3/bin/yarn
npm: 6.14.17 - ~/.nvm/versions/node/v14.19.3/bin/npm
Watchman: 2022.11.28.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
npmPackages:
expo: ~46.0.17 => 46.0.17
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-native: 0.69.6 => 0.69.6
react-native-web: ~0.18.7 => 0.18.10
npmGlobalPackages:
eas-cli: 3.0.0
expo-cli: 6.0.5
Expo Workflow: bare

Minimal reproducible example

  1. Build internal apk
  2. update some code
  3. run eas update --auto
@huy-lv huy-lv added the needs review Issue is ready to be reviewed by a maintainer label Dec 10, 2022
@ncailleux
Copy link

Hi,
Got the same error!
I did configure with eas update:configure also, but still got this.

@andrisole92
Copy link

+1

@ishristov
Copy link

+1.

I am using the managed flow but I'm getting Error: Runtime version policies are only supported in the managed workflow. In the bare workflow, runtime version needs to be set manually on eas update.

@ishristov
Copy link

Hm.. today I was trying to run the managed expo project on Android emulator and it seems some of the commands updated the "expo" version in my package.json from ~47.0.3 to ~47.0.9. I reverted all changes (including the expo version) and I was able to execute eas update successfully. Maybe something's wrong with v47.0.9?

@wesvh
Copy link

wesvh commented Dec 24, 2022

Actually i have the same problem, im using 46.0.19 and work fine, but i when update to SDK 47 , i got Error: Runtime version policies are only supported in the managed workflow. In the bare workflow, runtime version needs to be set manually.

@wesvh
Copy link

wesvh commented Dec 24, 2022

I found the solution, the text told so evident, In the bare workflow, runtime version needs to be set manually.
So i try to set manually the version, like how to the doc say it ...

... "expo" : { ... "runtimeVersion": "exposdk:47.0.0" } }

And its works for me
Source : https://docs.expo.dev/eas-update/runtime-versions/

The "sdkVersion" policy will set the runtime version to the current SDK version of a project. For instance, if the project is on Expo SDK 1.0.0, the runtime version with this policy will be "exposdk:1.0.0". This runtime version will update any time we update the project's Expo SDK. So, if we ran expo upgrade and installed Expo SDK 2.0.0, then the runtime version would become "exposdk:2.0.0".

@tai-bui
Copy link

tai-bui commented Dec 31, 2022

version

I still get the error after adding these lines in "expo" in app.json file
"runtimeVersion": { "policy": "exposdk:46.0.0" },

image

@wesvh
Copy link

wesvh commented Dec 31, 2022

version

I still get the error after adding these lines in "expo" in app.json file
"runtimeVersion": { "policy": "exposdk:46.0.0" },

image

Try without "policy"
Justo like that "runtimeVersion": "exposdk:46.0.0",

@ishristov
Copy link

It works for me when I change the version in the "dependencies" array in the package.json file.

@tai-bui
Copy link

tai-bui commented Jan 1, 2023

version

I still get the error after adding these lines in "expo" in app.json file
"runtimeVersion": { "policy": "exposdk:46.0.0" },
image

Try without "policy" Justo like that "runtimeVersion": "exposdk:46.0.0",

It worked! You're really a live saver, bro.

@Overdash
Copy link

Overdash commented Jan 4, 2023

Hmm, I'm using a managed workflow and still getting this. Is there a way to diagnose this?

I have:

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

(Using SDK 47)

In fact, this seems like an Expo bug in SDK 47, as if you set "runtimeVersion": "exposdk:47.0.0" it works, but if you set "runtimeVersion": "47.0.0" (so omit the exposdk:) it does not.

My original configuration with the "policy": "sdkVersion" interpolates in "runtimeVersion": "47.0.0"
Can confirm this as when I check my channels history I see:
image

It is however strange that the failed update appears...

@ayhoung
Copy link

ayhoung commented Jan 24, 2023

has there been an update on this? I'm also using "policy": "sdkVersion" and managed workflow, but getting issue:

 Error: Runtime version policies are only supported in the managed workflow. In the bare 
    workflow, runtime version needs to be set manually.

when I run eas update --channel development

@EvanBacon EvanBacon transferred this issue from expo/expo Feb 10, 2023
@ethanj20
Copy link

We would like to use appVersion as the runtimeVersion in app.config.js per this documentation but the builds won't run on a simulator when this is set (they only run if the runtimeVersion is set to sdkVersion, or if the runtimeVersion is deleted entirely). Is this the expected workflow? I don't want to have to rebuild my app on expo servers every time I want to test a change, but appVersion is the best policy for us as we manage our OTA updates based on the appVersion. Is there a way to use this runtimePolicy without having to delete it from app.config.js before trying to run it on a simulator?

Thanks in advance.

image

@ethanj20
Copy link

created a new issue for the above comment since it is a slightly different issue: #1713

@ishahbaz7
Copy link

I just deleted the dist and ios directory. And it works for me.

@yamak-app
Copy link

im my case this solved my issue

"runtimeVersion": "1.0.0",

@swagatkytics
Copy link

im my case this solved my issue

"runtimeVersion": "exposdk:48.0.0",

@huszzsolt
Copy link

I just deleted the dist and ios directory. And it works for me.

I started to get You're currently using the bare workflow, where runtime version policies are not supported. You must set your runtime version manually. For example, define your runtime version as "1.0.0", not {"policy": "appVersion"} in your app config. for eas update --branch eas-dev, but this worked before.

Relealized from @ishahbaz7 comment, that I did a local build recently which probably confused expo. Deleting android , ios and dist (dist might not have been required) resolved the issue.

@nwazuo
Copy link

nwazuo commented Aug 9, 2024

I just deleted the dist and ios directory. And it works for me.

I started to get You're currently using the bare workflow, where runtime version policies are not supported. You must set your runtime version manually. For example, define your runtime version as "1.0.0", not {"policy": "appVersion"} in your app config. for eas update --branch eas-dev, but this worked before.

Relealized from @ishahbaz7 comment, that I did a local build recently which probably confused expo. Deleting android , ios and dist (dist might not have been required) resolved the issue.

This solved it for me🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eas update needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.