Fix AttributeError crash from calling nonexistent warning method on StagehandLogger#320
Merged
Fix AttributeError crash from calling nonexistent warning method on StagehandLogger#320
warning method on StagehandLogger#320Conversation
… StagehandLogger
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant S as Stagehand Core
participant C as Browser Context
participant P as Stagehand Page
participant L as StagehandLogger
participant API as Browserbase API
Note over S, L: Initialization & CDP Setup
S->>S: init()
alt CDP Download Setup Fails
S->>L: CHANGED: debug("Failed to set up CDP...")
end
Note over P, L: Page Injection (Navigation/Lifecycle)
P->>P: ensure_injection()
alt TargetClosedError (Page Navigating/Closed)
P->>L: CHANGED: debug("ensure_injection failed...", category="page")
end
Note over C, L: Context & Session Cleanup
C->>C: handle_with_lock() (Cleanup remaining pages)
opt Page Wrapper missing
C->>L: CHANGED: debug("Could not find StagehandPage...", category="context")
end
S->>S: close()
alt HTTP Client unavailable for Session Close
S->>L: CHANGED: debug("Cannot end server session...")
else Success path
S->>API: DELETE /sessions/{id}
end
miguelg719
approved these changes
Mar 17, 2026
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.
Fix AttributeError crash from calling nonexistent
warningmethod on StagehandLoggerSummary by cubic
Fixed a crash caused by calling a nonexistent
warningmethod onStagehandLogger. Replaced those calls withdebugto prevent AttributeError during CDP setup, page injection, and context cleanup.Written for commit fe21ee2. Summary will update on new commits. Review in cubic