mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 09:22:24 +00:00
fix(ai): frontend console error — double load and lint fixes (agent)
This commit is contained in:
1 parent
d2e8dc3d3c
commit
f2ab7302ab
6 files changed
+14
-38
No files matched your search
@@ -1,8 +1,9 @@
|
||||
import sys
|
||||
from playwright.sync_api import sync_playwright
|
||||
import sys
|
||||
|
||||
def run():
|
||||
with sync_playwright() as p:
|
||||
# Launch browser
|
||||
browser = p.chromium.launch()
|
||||
page = browser.new_page()
|
||||
|
||||
@@ -12,12 +13,14 @@ def run():
|
||||
# Listen for uncaught exceptions
|
||||
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
|
||||
|
||||
# Listen for failed network requests
|
||||
# Listen for failed requests
|
||||
page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} {req.failure}"))
|
||||
|
||||
print("Navigating to http://localhost:8000 ...")
|
||||
try:
|
||||
page.goto("http://localhost:8000", wait_until="networkidle")
|
||||
print("Navigating to http://localhost:8000")
|
||||
page.goto("http://localhost:8000")
|
||||
# Wait for a bit to capture initial errors
|
||||
page.wait_for_timeout(5000)
|
||||
except Exception as e:
|
||||
print(f"Navigation failed: {e}")
|
||||
|
||||
|
||||
Reference in new issue
Block a user