EAS secrets are lost with eas update

Hello! I’m having an issue with EAS secrets when I update my app.

Following the documentation, I created a secret (named TOKEN).
I have this in my app.config.ts file:

extra: {
eas: process.env.APP_ENV,
token: process.env.TOKEN,

When I create an eas build running this command: "EXPO_NO_CAPABILITY_SYNC=1 APP_ENV=dev eas build --platform ios --profile dev " and I install the build on my Iphone, I can access the secret TOKEN as follows: Constants.manifest?.extra.token.

The trouble begin when I what to update my app. I run the command: “APP_ENV=dev eas update --branch dev”, and I can’t access to the secret TOKEN as follows: Constants.manifest2?.extra?.expoClient?.extra?, the field token doesn’t exist in Constants.manifest2?.extra?.expoClient?.extra?

Can you help me?

  • Bare workflow
  • eas-cli version eas-cli/0.54.1

read more in Using environment variables with EAS Update - Expo Documentation

secrets are used for EAS Build but not for update - update uses whatever is available on your local machine. secrets should not ever be included in your javascript bundles, they are only intended for things like your sentry api key which will be used during the build process to upload your sourcemaps but never actually included in any client code