From 9155fbe8aac289d7e3c34b6eef1dcf84b98f7b53 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:22:48 +0000
Subject: [PATCH] =?UTF-8?q?fix(ai):=20frontend=20console=20error=20?=
=?UTF-8?q?=E2=80=94=20remove=20redundant=20script=20tags=20(agent)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com>
---
index.html | 9 ---------
scripts/agent/debug_frontend.py | 27 +++++++++++++++------------
2 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/index.html b/index.html
index 43e5c196..7b729cf4 100644
--- a/index.html
+++ b/index.html
@@ -419,15 +419,6 @@
-
-
-
-
-
-
-
-
-
diff --git a/scripts/agent/debug_frontend.py b/scripts/agent/debug_frontend.py
index 3bb97531..8142f20b 100644
--- a/scripts/agent/debug_frontend.py
+++ b/scripts/agent/debug_frontend.py
@@ -1,30 +1,33 @@
-from playwright.sync_api import sync_playwright
import sys
+import time
+from playwright.sync_api import sync_playwright
def run():
with sync_playwright() as p:
- # Launch browser
+ # Launch browser (headless by default)
browser = p.chromium.launch()
page = browser.new_page()
- # Listen for console messages
+ # Capture console messages
page.on("console", lambda msg: print(f"console:{msg.type}: {msg.text}"))
- # Listen for uncaught exceptions
+ # Capture uncaught exceptions
page.on("pageerror", lambda exc: print(f"pageerror: {exc}"))
- # Listen for failed requests
- page.on("requestfailed", lambda req: print(f"requestfailed: {req.url} {req.failure}"))
+ # Capture failed requests
+ page.on("requestfailed", lambda request: print(f"requestfailed: {request.url} {request.failure}"))
try:
- print("Navigating to http://localhost:8000")
+ 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}")
- browser.close()
+ # Wait for some time to catch initialization errors
+ time.sleep(5)
+
+ except Exception as e:
+ print(f"Script error: {e}")
+ finally:
+ browser.close()
if __name__ == "__main__":
run()