* [eas-cli] Add experimentation client
* [eas-cli] Document experimentation context order and override semantics
* [eas-cli] Take the account unit from the command instead of the app config
* [eas-cli] Skip experiments in CI
* [eas-cli] Make the GraphQL request timeout take effect
* [eas-cli] Document which experiment units are shared across surfaces
* [eas-cli] Test that non-timeout fetch errors pass through the timeout wrapper
* [eas-cli] Fetch the experimentation config lazily on first variant read
* [eas-cli] Cap the actor lookup in the experimentation context field
* [eas-cli] add --frame-ancestor to simulator:start and print the embed URL
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* [eas-cli] cover the embed output fallbacks
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* [eas-cli] format the embed output tests
Co-Authored-By: Claude Fable 5.1 <[email protected]>
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>
# Why
Google Play submissions sometimes fail with generic errors like `Precondition check failed.` (HTTP 400, `FAILED_PRECONDITION`). We currently drop everything except `error.message` and `errors[].reason`, so neither the user nor we can tell what Google actually objected to.
This replaces #4650, which also put Google's details into user-facing messages and structured logs, and added a redacting sanitizer. That made the code a lot more complex. This PR keeps build logs unchanged and only makes the raw response available in Sentry. Once real payloads show up there, we can add targeted classifiers to `mapGooglePlayError` with clear user-facing messages.
# How
- `GooglePlayApiError` now keeps:
- the JSON error response body, as a string capped at 8 KB
- the request URL path, without the query (the upload session query contains a secret)
Non-JSON bodies are still dropped, as before.
- `GooglePlayApiError.getErrorMetadata()` finds the API error in the cause chain, through retry `AggregateError`s and commit-outcome-unknown wrappers. It returns `googlePlayRequestPath` and `googlePlayErrorResponse`.
- `mapGooglePlayError` and `GooglePlayCommitOutcomeUnknownError` attach that as `ExpoError.metadata`. The worker already sends it to Sentry as `extras.errorMetadata`, and it is not part of the external build error.
- The body is stored as a string because `@sentry/node` 7 normalizes extras to depth 3, so nested `details` would otherwise show up as `[Object]`.
User-facing messages are unchanged.
# Test Plan
- New tests in `GooglePlaySubmission.test.ts`:
- a `FAILED_PRECONDITION` commit with `details` ends up in metadata but not in the message
- metadata survives retries when the commit outcome is unknown
- the upload-session query and non-JSON bodies are not stored
- `yarn test src/steps/utils/android src/steps/functions/__tests__/submitToGooglePlay.test.ts` (153 passed), plus `yarn typecheck`, `yarn lint`, `yarn fmt:check`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
# Why
While testing submissions on staging I found Google APIs flake sometimes.
# How
Wrapped requests with auto-retry when we can be sure we can retry.
# Test Plan
CI should pass.
* [eas-cli] Show EAS Simulator minutes in eas account:usage
* [eas-cli] report unavailable Simulator usage estimates
* [eas-cli] Replace Simulator usage changelog entry with changeset
<!-- Add a changeset with `yarn changeset`, or skip the check by labeling the PR with "no changelog". -->
# Why
Now that we're testing out permission scoping for tokens, EAS CLI needs to handle these cases more gracefully. First step is this error message, which previously assumed scoped tokens would only be used within build jobs.
# How
Update it to have a separate error message for scoped tokens outside of a build job. Also correct "user"/"account" terminology discrepancy.
# Test Plan
`yarn start`
`export EXPO_STAGING=1`
`neas login`, select viewer scope
run `neas update`
see
```
You don't have the required permissions to perform this operation.
This can sometimes happen if you are logged in as incorrect user or if the permissions granted during authentication are insufficient to perform the operation.
Run eas whoami to check the user you are logged in as and your permission grant.
Run eas login to change the user or permission grant.
Original error message: Entity Not Authorized: Entity not authorized: AppFingerprintEntity[00000000-0000-0000-0000-000000000000] (viewer = ScopedAccountActorViewerContext[RegularUserViewerContext[b99c08be-7584-4358-b8e4-aef050972708], scopes=expo_account:c344bcd9-c79d-4c0b-96fb-940d947cac42(RUN,VIEW);expo_account:55ebf7e2-f986-4b54-950d-55d38f355e29(RUN,VIEW)], action = CREATE, ruleIndex = -1)
Request ID: 410d2f30-c4fa-4575-b21a-6012f6c1e93f
```
* [build-tools] Call the device run session worker API with the session token
When a device run session job has the EAS_DEVICE_RUN_SESSION_TOKEN environment
secret, send every session-related www call to /v2/device-run-session-worker/*
with the expo-device-run-session-token header instead of GraphQL or the
account-wide REST routes. Without the token, keep the current calls.
The worker also reports Datadog metrics for these jobs through
/v2/device-run-session-worker/metrics.
* [build-tools] Download session builds without the robot token
In a device run session job with a session token, the build archive URL comes
from the device run session worker API and points to an artifact route that
needs no auth. After www stops minting EXPO_TOKEN for session jobs,
robotAccessToken is the session token, and www rejects it as a bearer
credential on every route. Send no Authorization header in that case.
* [build-tools] Match the device run session worker API response contract
www returns entity values from the worker API: session statuses are
lowercase and hyphenated, and GET /application returns
{ platform: 'ios' | 'android', build: { id, gitCommitHash,
applicationArchiveUrl } | null } without app slugs. Map the statuses to the
GraphQL values that callers compare, and name screenshots without an app
slug in worker API mode.
The worker now resolves duplicate EAS_DEVICE_RUN_SESSION_TOKEN secrets like
the build env does (the last one wins), so metrics and steps use the same
token. Add tests for the token propagation from job secrets to the worker API
client and for the download_build and start_agent_device_session call sites.
* [build-tools] Take the device run session platform from the worker runtime
* [build-tools] Report device run session build lookups as system errors and time out hung session requests
The worker's secrets filter takes secrets added while the job runs through
addBuildLogMask, which reaches steps via the build context's runtimeApi.
eas/run_agent passes each leased token to it and drops its own masking.
Masking marks every occurrence of every secret on the original message and
masks once, so a secret that is a substring of another no longer breaks the
longer match. The log buffer that feeds error detection masks with the same
patterns.
<!-- You can skip the changelog check by labeling the PR with "no changelog". -->
# Why
I want to polish Google Play submission messages a bit.
# How
Tested the code with a few more edge cases and handled them a bit better.
# Test Plan
CI should pass.
* [build-tools] Disable Argent video watermark in remote sessions
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* [build-tools] Add changelog entry for Argent watermark change
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* [build-tools] Continue the Argent session when disabling the video watermark fails
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
# Why
To remove submission service altogether we also need to support Google Play uploads here.
# How
Adds `eas/submit_to_google_play`: load the service account, create an edit, upload the APK/AAB, update the track, and commit. Returns `version_code` after the commit succeeds.
The binary, its type, and package name come from the caller. We'll use `eas/download_build` and `eas/read_android_app_info` for that.
# Test Plan
- CI should pass.
- Full live submission passed on October 8 with current source `5915d062d`: uploaded an AAB for `com.exposervices.workflowstesting` to `internal` as draft version `146`. The default review setting worked without a retry. A fresh edit confirmed the draft and release notes. Temporary credentials and binaries were removed.
# Why
When uploading files to Google Play it's best we do this thing called "resumable uploads".
# How
Added more utils and a separate namespace that handles:
- creating the upload session
- uploading to the upload session in chunks.
It tries to be smart about errors and retries. Mostly AI-driven code.
# Test Plan
CI should pass. Also tested live with staging key.
* [build-tools] Add a sandbox uploadArtifact command
* [build-tools] Add changelog entry for sandbox uploadArtifact
* [build-tools] Return BAD_REQUEST for refused sandbox artifact uploads
* [build-tools] Let sandbox uploadArtifact wait for the upload and report its status and download URL
* [build-tools] Wait up to 20 seconds for sandbox artifact uploads by default
* [build-tools] Count upload session creation toward the sandbox upload yield time
* [build-tools] Replace the shared withTimeoutAsync with abort signal timeouts for sandbox artifact uploads
* [eas-build-job] Add uploadArtifact to the sandbox daemon protocol
* [eas-build-job] Add changelog entry for sandbox uploadArtifact
* [build-tools] Reject sandbox uploadArtifact calls until uploads are implemented
* [eas-build-job] Add yieldTimeMs, status and downloadUrl to sandbox uploadArtifact
* [eas-cli] Remove EAS_ENABLE_INDIVIDUAL_ASC_API_KEYS and enable individual ASC API keys for submissions
* [eas-cli] changelog entry about enabling individual ASC API keys for submissions
* [eas-cli] Point changelog entry to #4589
* [eas-cli] Don't check for ASC API key validity on Apple servers for individual keys
* [eas-cli] changelog entry about not checking for individual asc api keys validity on apple servers