WIP: Save current work before CHORUS rebrand
- Agent roles integration progress - Various backend and frontend updates - Storybook cache cleanup 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
56
check_browser_logs.py
Normal file
56
check_browser_logs.py
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Check browser console logs to see the debug output
|
||||
"""
|
||||
|
||||
import time
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
from selenium.webdriver.common.by import By
|
||||
|
||||
def check_browser_logs():
|
||||
chrome_options = Options()
|
||||
chrome_options.add_argument("--headless")
|
||||
chrome_options.add_argument("--no-sandbox")
|
||||
chrome_options.add_argument("--disable-dev-shm-usage")
|
||||
chrome_options.add_argument("--enable-logging")
|
||||
chrome_options.add_argument("--log-level=0")
|
||||
|
||||
driver = webdriver.Chrome(options=chrome_options)
|
||||
|
||||
try:
|
||||
print("🌐 Loading frontend to check debug logs...")
|
||||
driver.get("http://localhost:3000")
|
||||
time.sleep(3)
|
||||
|
||||
# Try to get browser console logs (may not work in headless mode)
|
||||
try:
|
||||
logs = driver.get_log('browser')
|
||||
print("📋 Browser Console Logs:")
|
||||
for log in logs:
|
||||
print(f" [{log['level']}] {log['message']}")
|
||||
except:
|
||||
print("📋 Console logs not available in this mode")
|
||||
|
||||
# Check for specific debug information in page source
|
||||
page_source = driver.page_source
|
||||
if "Auth API_BASE_URL" in page_source:
|
||||
lines = page_source.split('\n')
|
||||
for line in lines:
|
||||
if "Auth API_BASE_URL" in line or "apiConfig" in line:
|
||||
print(f"🔍 Found debug info: {line.strip()}")
|
||||
else:
|
||||
print("🔍 No debug info found in page source")
|
||||
|
||||
# Also check page text for any visible errors
|
||||
body_text = driver.find_element(By.TAG_NAME, "body").text
|
||||
if "api_base_url" in body_text.lower() or "auth" in body_text.lower():
|
||||
print(f"📄 Page content related to API: {body_text[:500]}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
finally:
|
||||
driver.quit()
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_browser_logs()
|
||||
Reference in New Issue
Block a user