eas credentials: "Set up your project to use Push Notifications" fails with "A simulator distribution does not require credentials to be configured." when profile has ios.simulator: true
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 236
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 98
Description
### Summary
In the interactive `eas credentials` flow (iOS), after successfully creating build credentials, choosing **Push Notifications: Manage your Apple Push Notifications Key** → **Set up your project to use Push Notifications** fails with:
```
Error: A simulator distribution does not require credentials to be configured.
```
when the build profile selected at the start of the session has `ios.simulator: true` — even though that same profile has `distribution: "internal"` and its build credentials (distribution certificate + ad hoc provisioning profile) were created successfully moments earlier in the same session.
### Managed or bare?
Managed
### Environment
- eas-cli: 21.4.0
- Node: v24.18.0
- OS: macOS (darwin arm64)
### What platform(s) does this occur on?
iOS
### Reproducible demo
`eas.json` profile (the documented pattern for dev-client builds that also target the simulator):
```json
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
}
}
}
}
```
Steps:
1. `eas credentials` → Select platform: iOS → profile: `development`
2. Log in to Apple account, complete 2FA
3. **Build Credentials: Manage everything needed to build your project** → **All: Set up all the required credentials to build your project** → succeeds. Output shows an Ad Hoc configuration with a newly created distribution certificate and provisioning profile ("All credentials are ready to build ...").
4. Go back → **Push Notifications: Manage your Apple Push Notifications Key** → **Set up your project to use Push Notifications**
5. Fails with `Error: A simulator distribution does not require credentials to be configured.`
Trimmed session output:
```
✔ Bundle identifier registered squire.dog
✔ Created Apple distribution certificate
✔ Created new profile: *[expo <...> AdHoc 1785291294466
All credentials are ready to build <...>
...
✔ What do you want to do? › Push Notifications: Manage your Apple Push Notifications Key
✔ What do you want to do? › Set up your project to use Push Notifications
Error: A simulator distribution does not require credentials to be configured.
```
### Expected behavior
Push notification (APNs key) setup proceeds. APNs keys are app-level credentials and do not depend on the build distribution type. Per https://github.com/expo/eas-cli/issues/997, only internal-distribution *build* credentials require Apple portal access — push keys should not be gated by the distribution/simulator check at all.
### Root cause (from source inspection)
- `packages/eas-cli/src/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.ts` (lines ~10-14) throws this error whenever `buildProfile.simulator` is true.
- In `ManageIos.runProjectSpecificActionAsync()` (`packages/eas-cli/src/credentials/manager/ManageIos.ts`, ~lines 254-267), `SetUpBuildCredentials` has an early-return branch that reads only `buildProfile.distribution` — which is why build credential setup works for this profile. Every other project action, including `SetUpPushKey`, first resolves `distributionType` via `SelectIosDistributionTypeGraphqlFromBuildProfile` and dies on the simulator check before the action runs.
- `SetUpPushKey.runAsync()` (`packages/eas-cli/src/credentials/ios/actions/SetUpPushKey.ts`) never references the distribution type, so the gate is unnecessary for this action.
### Suggested fix
Resolve `distributionType` lazily, only for the actions that actually need it (credentials.json / provisioning-profile actions), or add an early-return for `SetUpPushKey` (and other Apple-account-level actions like ASC API keys) similar to the `SetUpBuildCredentials` branch.
### Workarounds
- `eas credentials -p ios --profile ` (e.g. `production`) and set up push notifications there — the APNs key is registered per app, so it covers all build profiles.
- `eas build -p ios --profile development` — the build flow sets up the push key via `IosCredentialsProvider.getPushKeyAsync()`, which does not go through this check.
Related: #987, #1714 (same simulator profile pattern causing credential-flow friction, but neither reports this specific error).
Contributor guide
Research direction
Start by reading packages/eas-cli/src/credentials/manager/ManageIos.ts and SelectIosDistributionTypeGraphqlFromBuildProfile.ts, then inspect SetUpPushKey.ts to trace how the distribution type is resolved. Reproduce the interactive flow with an ios.simulator profile and verify that Push Notifications setup succeeds while build credential setup remains functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, typescript
- Domain
- cli, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100