fix: retain the browser ID when a Cloud stop fails - #3
Open
MagMueller wants to merge 1 commit into
Open
Conversation
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.
What changes
Only treat an SDK
BrowserUseErrorwith HTTP 404 as an already-gone browser. Propagate other stop failures.The stop tool already waits for this helper before removing
.bu-browser-id. Propagating an error keeps the ID available for another stop attempt and avoids returning{ok:true, stopped:id}when the request failed. The tool implementation does not change.Reproduction
The published
@browser_use/eve@0.0.4stop export and shared Cloud chunk are byte-identical to the current main build. With the published package installed, a local HTTP 503 response produces{ok:true, stopped:id}and deletes the ID. Calling the same tool again, without restoring the file, returnsNo cloud browser was open.and sends no request.With this patch, the same 503 raises
BrowserUseErrorand keeps the ID. A second call uses that same ID, receives the local HTTP 200 response and clears the file.Validation
eve.defineTool, and realbrowser-use-sdkHTTP parsing and retries. Requests were redirected to a loopback HTTP server; the sandbox adapter ran the tool's exact cat/rm commands against owned temporary files.unauthorized401 must reject.Scope and limits
No live Cloud browser or hosted Eve sandbox was used. This proves local tool behavior, not a remote stop or billing outcome. The 404 exception uses the SDK error type and status, not exact response-body text.
No new retry policy, dependency change, package version, provisioning, release default, scaffold change or sandbox file-I/O error handling is included.
Summary by cubic
Fixes the Cloud stop flow so a failed stop request no longer deletes the browser ID. Previously any stop error was swallowed and the ID was removed, so a retry returned
No cloud browser was open.without making a request. Now only an SDKBrowserUseErrorwith HTTP 404 is treated as already gone; other failures propagate and keep the ID for another attempt.Bug Fixes
Written for commit 78b69a2. Summary will update on new commits.