[eas-cli] Stop looping forever when device registration adds no devices - #4254
Open
dennytosp wants to merge 1 commit into
Open
[eas-cli] Stop looping forever when device registration adds no devices#4254dennytosp wants to merge 1 commit into
dennytosp wants to merge 1 commit into
Conversation
dennytosp
force-pushed
the
fix/device-registration-infinite-loop
branch
from
August 22, 2026 08:50
5808bf2 to
4c23fef
Compare
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
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.
Why
Fixes #2059.
SetUpAdhocProvisioningProfileruns the device registration action once and then loops until at least one device shows up. The loop only ever pauses for the Website method, where the CLI waits for a key press between reads. Every other method registers whatever it can before returning, so when it registers nothing the loop just rereads the same empty list as fast as the network allows:In all three the CLI prints "There are still no registered devices." forever and hammers
getDevicesForAppleTeamAsync(which is called withuseCache: false) until the user kills the process. That is exactly what the issue reports for the Developer Portal case.How
Only the Website method keeps looping, since it is the only one where devices are registered out of band and waiting can actually change the answer. When any other method leaves the list empty, the command now fails with a message pointing at
eas device:createinstead of spinning. The Input method keeps its existing, more specific error.Test Plan
yarn test,yarn typecheck,yarn lintandyarn fmt:checkall pass.Four unit tests were added around
registerDevicesAsync. Without the fix,gives up when the developer portal method registers nothingnever resolves and the suite times out; with it, the call rejects after a single read of the device list. The website test still loops and returns the devices once they appear, so the wait-and-retry behaviour is unchanged.