expo / expo/eas-cli

eas update is using cache env vars

Open
#2,847 8 comments 0 reactions 1 assignee Claimed by @byCedric View on GitHub
eas update needs review
Dominant language
TypeScript
Stars
1.4k
Forks
236
Avg merge
3d 1h
Merged PRs (30d)
91

Description

### Build/Submit details page URL

_No response_

### Summary

I have an expo project that is bare and uses EAS update. We have an env var called EXPO_PUBLIC_UPDATE_VERSION that we use to track the versioning of updates in any bug reports.

When I push an update, it does not always receive this value correctly. After some debugging I found that if I run `npx expo start -c` and then `eas update` the EXPO_PUBLIC_UPDATE_VERSION is updated correctly when the app receives the update.

This shouldn't be the case, the update SHOULD push the current values in .env, not any cached values in the bundler.

### Managed or bare?

Bare

### Environment

expo-env-info 1.2.2 environment info:
System:
OS: macOS 15.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
Yarn: 1.22.22 - ~/.yarn/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.16.1 - /Users/*******/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.2, iOS 18.2, macOS 15.2, tvOS 18.2, visionOS 2.2, watchOS 11.2
Android SDK:
API Levels: 30, 33, 34
Build Tools: 30.0.3, 33.0.0, 34.0.0
System Images: android-30 | Google APIs ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-34 | Google APIs ARM 64 v8a
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.11090377
Xcode: 16.2/16C5032a - /usr/bin/xcodebuild
npmPackages:
expo: ~51.0.39 => 51.0.39
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.75.4 => 0.75.4
npmGlobalPackages:
eas-cli: 12.6.2
expo-cli: 6.3.10
Expo Workflow: bare

### Error output

_No response_

### Reproducible demo or steps to reproduce from a blank project

Create an environment variable with EXPO_PUBLIC prefix that is an int.

Make a build

Send and receive the update on device

Do this a few times and verify the value after receiving the update

This can be fix by running `npx expo start -c` before `eas update`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.