Repository navigation
fix(release): validate the env the BUILD sees, not the file on your laptop - #687
Merged
Merged
Conversation
…aptop
The 1.17.0 / 11700 build now on TestFlight has no Mapbox token in it.
I found it by pulling the shipped .ipa apart rather than by reading config:
mapbox token pk.* ABSENT everywhere
google client id ABSENT everywhere
MBXAccessToken ABSENT (Info.plist)
supabase url PRESENT <- declared in eas.json
posthog host PRESENT <- declared in eas.json
Everything eas.json declares arrived. Nothing else did. `.env.production` is
gitignored, so it never reaches the EAS worker, and the `dotenv.config()` in
app.config.ts finds nothing there. The map is a headline feature of this app
and it is dead in that build.
The reason it went unnoticed is this script. Its own comment claimed the rest
of the vars "come from .env.production at build time" — so it read that file,
confirmed four variables, live-pinged the Mapbox token, printed ticks, and
then shipped a binary containing none of them. A check that is confident and
wrong is worse than no check: I ran it before shipping, believed it, and said
so.
The required-var check now asks EAS what the build will actually see — the
profile's `env` block in eas.json, plus registered EAS environment variables —
and fails with the exact `eas env:create` command per missing variable. On the
current project it correctly refuses:
✗ These vars will NOT reach the build — the binary ships without them:
- EXPO_PUBLIC_MAPBOX_TOKEN
- EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID
- EXPO_PUBLIC_GOOGLE_IOS_SCHEME
- EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID
The Mapbox ping is kept but relabelled: it proves the token in your local file
is alive, which is not the same claim as the build carrying it. That conflation
is the whole bug.
Registering the values is deliberately left to a human — they are API tokens,
and this script now prints the commands rather than trying to move secrets
around itself. See the issue for the full binary evidence.
5 tasks
3 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #686.
The
1.17.0 / 11700build now on TestFlight has no Mapbox token in it. I found it by pulling the shipped.ipaapart, not by reading config.Everything
eas.jsondeclares arrived. Nothing else did..env.productionis gitignored, so it never reaches the EAS worker and thedotenv.config()inapp.config.tsfinds nothing there.This script is why it went unnoticed
Its own comment claimed the rest of the vars "come from .env.production at build time". So it read that file, confirmed four variables, live-pinged the Mapbox token and got a 200, printed a row of ticks — and then shipped a binary containing none of them.
I ran it before shipping, believed it, and reported the build as verified. A check that is confident and wrong is worse than no check.
What changes
The required-var check now asks EAS what the build will see — the profile's
envblock plus registered EAS environment variables — and fails with the exact remediation command per variable. On the project as it stands today it correctly refuses:The Mapbox live-ping is kept but relabelled: it proves the token in your local file is alive, which is not the same claim as the build carrying it. Conflating those two is the entire bug.
What this deliberately does not do
Register the values. They are API tokens; the script prints the commands rather than moving secrets around as a side effect. #686 has the list.
🤖 Generated with Claude Code