fix: blank tab auto-recovery for web_scan/web_execute_js#580
Open
chen70456-lang wants to merge 1 commit into
Open
fix: blank tab auto-recovery for web_scan/web_execute_js#580chen70456-lang wants to merge 1 commit into
chen70456-lang wants to merge 1 commit into
Conversation
Problem: Chrome opens with about:blank by default, extension's isScriptable filter rejects about: protocol → TMWebDriver gets 0 sessions → web_scan/web_execute_js returns error. Fix: - TMWebDriver: add ensure_tab() which auto-opens Chrome with URL when no active sessions, with race-condition-safe timeout + post-loop check - ga.py: web_scan/web_execute_js/first_init_driver now call ensure_tab() instead of immediately returning error on empty sessions - background.js: isServerAlive() probes HTTP API port (18766) first, with WS port (18765) fallback for faster 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.
Problem
Chrome opens with about:blank by default. The extension's
isScriptablefilter rejectsabout:protocol → TMWebDriver gets 0 sessions →web_scan/web_execute_jsreturn "no tabs available" errorChanges
TMWebDriver.py
ensure_tab()which auto-opens Chrome with a URL when no active sessionsga.py
web_scan/web_execute_js/first_init_drivernow callensure_tab()instead of immediately returning error on empty sessionsExtension (background.js)
isServerAlive()probes HTTP API port (18766) first, with WS port (18765) fallback for faster detectionTesting
✅ web_scan on fresh blank tab → auto-recovers
✅ web_execute_js on recovered tab
✅ Weather search end-to-end