expo / expo/eas-cli

eas update using the wrong variables

Open
#3,305 5 comments 3 reactions 0 assignees View on GitHub
needs review
Dominant language
TypeScript
Stars
1.4k
Forks
236
Avg merge
3d 1h
Merged PRs (30d)
91

Description

### Build/Submit details page URL

https://expo.dev/accounts/vytal_app/projects/vytal/channels/preview

### Summary

I am having an issue with my environment variables when I use eas update. I have an production, preview and a test app. When I build the apps using eas build everything works correctly. Then when I run eas update --channel preview --environment preview my acceptance app is being updated, however somehow it is updated with development environmentals.

I also get this:
Environment variables with visibility "Plain text" and "Sensitive" loaded from the "preview" environment on EAS:

When I add the preview variables in .env.local and then run eas update using the local env's, somehow it also using the development env variables.

What can cause this?

This is my eas file:

```
{
"build": {
"vytal-dev": {
"environment": "development",
"developmentClient": true,
"autoIncrement": true,
"distribution": "internal",
"android": {
"buildType": "apk"
},
"env": {
"BRAND": "vytal",
"ENV": "dev",
"EAS_PROJECT_ID": "123",
"APS_ENVIRONMENT": "development"
}
},
"vytal-test": {
"channel": "development",
"environment": "development",
"autoIncrement": true,
"android": {
"distribution": "internal"
},
"ios": {
"resourceClass": "m-medium"
},
"env": {
"BRAND": "vytal",
"ENV": "test",
"EAS_PROJECT_ID": "123",
"APS_ENVIRONMENT": "development"
}
},
"vytal-acc": {
"channel": "preview",
"environment": "preview",
"autoIncrement": true,
"android": {
"distribution": "internal"
},
"env": {
"BRAND": "vytal",
"ENV": "acc",
"EAS_PROJECT_ID": "123",
"APS_ENVIRONMENT": "development"
}
},
"vytal-prod": {
"channel": "production",
"environment": "production",
"autoIncrement": true,
"env": {
"BRAND": "vytal",
"ENV": "prod",
"EAS_PROJECT_ID": "123",
"APS_ENVIRONMENT": "production"
}
}
}
}
```

### Managed or bare?

Managed

### Environment

expo-env-info 2.0.8 environment info:
System:
OS: macOS 15.6.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.0.1 - ~/.nvm/versions/node/v24.0.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v24.0.1/bin/yarn
npm: 11.3.0 - ~/.nvm/versions/node/v24.0.1/bin/npm
Watchman: 2025.04.28.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /usr/local/bin/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: 33, 34, 35
Build Tools: 34.0.0, 35.0.0, 35.0.1, 36.0.0
System Images: android-36 | Google Play ARM 64 v8a
IDEs:
Android Studio: 2024.3 AI-243.25659.59.2432.13423653
Xcode: 16.2/16C5032a - /usr/bin/xcodebuild
npmPackages:
expo: ^54.0.29 => 54.0.30
expo-updates: ~29.0.15 => 29.0.15
react: 19.1.0 => 19.1.0
react-native: 0.81.5 => 0.81.5
npmGlobalPackages:
eas-cli: 16.7.0
expo-cli: 6.3.12
Expo Workflow: managed

### Error output

_No response_

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

Sending an update using `eas update --channel preview --environment preview -m "Updating preview app"` won't uses my environment variables.

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.