Version 2.11.1#72
Merged
Merged
Conversation
Collaborator
hynek-urban
commented
May 14, 2026
- Don't crash the prepare flow when the browser closes during Google login detection.
- Increase timeouts.
The login detector for `auth browser-prepare google-*` listens for console.cloud.google.com responses and asynchronously reads each response body to decide whether the user is past the sign-in page. That `response.text()` promise has no `.catch()` handler, so when the page or context closes while a body is still being read (e.g. the automation navigates onward, or the user closes the browser window), Node sees an unhandled rejection and terminates the entire prepare process — at which point any GCP project / OAuth client already created by the flow is orphaned in the user's account because latchkey never reaches the point where it persists the credentials. Add a `.catch()` that swallows the closed-page rejection. The login detector treats a response we couldn't read as inconclusive (same as not seeing it at all), so this is behaviour-preserving for the happy path and only changes the failure mode for the closed-page race from "crash the process" to "keep polling until login is detected or the flow times out". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ed-rejection Don't crash the prepare flow when the browser closes during Google login detection
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.