fingerprint:generate --environment --json prints the env-variables notice to stdout, so the JSON can't be parsed
Build/Submit details page URL
N/A (local command; also reproduced on GitHub Actions)
Summary
eas fingerprint:generate --environment <env> --json prints the "Environment variables with visibility … loaded from the "jq (or JSON.parse) fails. The other progress lines ("🔧 Using environment", "Computing project fingerprint") correctly go to stderr.
Managed or bare?
Managed (CNG, no native directories in the repo)
Environment
- eas-cli 24.11.0 on GitHub Actions (ubuntu-latest, Node 24), and eas-cli 20.1.0 on macOS (Node 24.14.0).
- The relevant code is unchanged on
main(eas-cli 25.3.0), so I expect it still reproduces there.
Error output
stdout of eas fingerprint:generate --environment preview --platform ios --json --non-interactive 2>/dev/null (variable names elided):
Environment variables with visibility "Plain text" and "Sensitive" loaded from the "preview" environment on EAS: …
{
"sources": [
…
"hash": "…"
}
jq .hash on it:
jq: parse error: Invalid numeric literal at line 1, column 12
Reproducible demo or steps to reproduce from a blank project
npx create-expo-app repro && cd repro && eas init- Create any plain-text variable in the
previewenvironment:eas env:create --environment preview --name FOO --value bar --visibility plaintext eas fingerprint:generate --environment preview --platform ios --json --non-interactive 2>/dev/null | jq .hash
Expected: the hash. Actual: the notice is on stdout and jq fails to parse it.
Cause, as far as I can tell: fingerprint/generate.ts passes withServerSideEnvironment: environment to getContextAsync(), and PrivateProjectConfigContextField then calls loadServerSideEnvironmentVariablesAsync(), which Log.logs the notice. That runs inside getContextAsync(), before enableJsonOutput() redirects stdout to stderr (generate.ts, the if (json) { enableJsonOutput(); } right after getContextAsync). Calling enableJsonOutput() before getContextAsync() when --json is set would fix it. Other commands that pass withServerSideEnvironment and support --json may have the same ordering.
Workaround: keep only the JSON from stdout, e.g. sed -n '/^{/,/^}/p' | jq .hash.