Files
bitvid/scripts/agent/debug_frontend.py
T
google-labs-jules[bot] 69e5a45af1 fix(ai): prevent race condition in login modal initialization (agent)
Removes a premature call to `initializeLoginModalController` in `ApplicationBootstrap` which was attempting to initialize the login modal before the DOM was fully hydrated, causing a "modal container not found" warning during startup. The modal is already correctly initialized later in `js/index.js` after markup loading completes.
2026-01-18 18:21:41 +00:00

31 lines
932 B
Python

from playwright.sync_api import sync_playwright
import sys
import time
def run():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
# Subscribe to console messages
page.on("console", lambda msg: print(f"console:{msg.type}: {msg.text}"))
# Subscribe to uncaught exceptions
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
# Subscribe to failed network requests
page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} {req.failure}"))
try:
# Navigate to localhost
page.goto("http://localhost:8000", wait_until="networkidle")
# Wait a bit for async operations
time.sleep(2)
except Exception as e:
print(f"Error navigating: {e}")
finally:
browser.close()
if __name__ == "__main__":
run()