Hello,
I have been successfully using EAS build for many weeks now. I recently had to perform the automated migration of eas.json to the new format using the cli. Ever since I have done this, my application does not seem to be receiving the environment variables it was previously. I used to be able to access environment variables set using the env key in eas.json from process.env but they now all appear to be undefined. It is a little difficult to debug this problem since I need to run a build each time so I can’t rule out another cause but I would be grateful if you could just confirm that there isn’t something wrong with my new eas.json.
Example from original eas.json:
{
"builds": {
"android": {
"development-sandbox": {
"workflow": "managed",
"distribution": "internal",
"releaseChannel": "development-sandbox",
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX"
}
}
},
"ios": {
"staging-testflight": {
"workflow": "managed",
"distribution": "store",
"releaseChannel": "staging",
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
"IOS_BUNDLE_ID": "x.x.x",
"APP_NAME": "XXX (Staging Live)",
"APP_ICON": "./assets/icon_staging.png"
}
},
"staging-sandbox-testflight": {
"workflow": "managed",
"distribution": "store",
"releaseChannel": "staging-sandbox",
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
"IOS_BUNDLE_ID": "x.x.x",
"APP_NAME": "XXX (Staging Sandbox)",
"APP_ICON": "./assets/icon_sandbox.png"
}
},
"development-sandbox": {
"workflow": "managed",
"distribution": "internal",
"releaseChannel": "development-sandbox",
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
}
}
}
}
}
Migrated eas.json
{
"build": {
"development-sandbox": {
"android": {
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
}
},
"ios": {
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
}
},
"releaseChannel": "development-sandbox",
"distribution": "internal"
},
"staging-testflight": {
"ios": {
"releaseChannel": "staging",
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
"IOS_BUNDLE_ID": "x.x.x",
"APP_NAME": "XXX (Staging Live)",
"APP_ICON": "./assets/icon_staging.png"
},
"distribution": "store"
}
},
"staging-sandbox-testflight": {
"ios": {
"releaseChannel": "staging-sandbox",
"env": {
"API_URL": "xxxx",
"XXX": "xxx",
"XXX": "XXX",
"XXX": "XXX",
"IOS_BUNDLE_ID": "x.x.x",
"APP_NAME": "XXX (Staging Sandbox)",
"APP_ICON": "./assets/icon_sandbox.png"
},
"distribution": "store"
},
}
}
}