EAS secret is undefined when building with Expo 47 sdk

With Expo 47 our EAS builds fail because of it cannot get certain Android/iOS dependencies. This happens because one of our npm modules requires an API key to download the library, and the key is undefined when it’s read from the EAS secret. I can see the key listed in the Environment secrets list in the Spin up build environment step, but when checking the error log in Install pods step I see:

[!] Error installing MapboxCommon
[!] /usr/bin/curl -u mapbox:undefined

This Basic Auth curl should read mapbox:<API_KEY>. The key is imported to the build process through app.config.js and is read at process.env.API_KEY.

I am updating Expo from 46.0.19 to 47.0.13, and when building with Expo 46 the secret exists when built locally or by EAS (locally with expo prebuild --platform android / ios).

We are using the managed workflow, locally building with expo-cli 6.1.0.

so the secret is named API_KEY?

The key is imported to the build process through app.config.js and is read at process.env.API_KEY .

can you elaborate on this, perhaps providing a minimal reproducible example?