Files
bitvid/scripts/agent/debug_frontend.py
T
google-labs-jules[bot] c076cd9684 fix(ai): frontend console error — remove broken tracker (agent)
- Remove `wss://open.video.lukewarlow.uk:443/announce` from `DEFAULT_WSS_TRACKERS` in `js/constants.js`.
- This tracker was returning `net::ERR_SSL_PROTOCOL_ERROR`, causing console noise and connection failures.
- Added `scripts/agent/debug_frontend.py` to help diagnose frontend initialization errors.

Verified with `scripts/agent/debug_frontend.py` that the error is resolved.
Ran `npm run format`, `npm run lint`, and `npm run test:unit`.
2026-01-22 18:23:20 +00:00

30 lines
837 B
Python

from playwright.sync_api import sync_playwright
import time
import sys
def run():
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
print("--- Console Messages ---")
page.on("console", lambda msg: print(f"console:{msg.type}: {msg.text}"))
print("--- Page Errors ---")
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
print("--- Failed Requests ---")
page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} {req.failure}"))
try:
page.goto("http://localhost:8000")
# Wait for potential initialization errors
time.sleep(5)
except Exception as e:
print(f"Navigation failed: {e}")
browser.close()
if __name__ == "__main__":
run()