Commit graph

7 commits

Author SHA1 Message Date
DannyDannyDanny
8ad0f5e1af Fix exception handling order and add WebSocket fallback attempt
- Fix exception handling to catch URLError before generic Exception
- Add WebSocket fallback attempt when HTTP endpoint fails
- Note: WebSocket fallback may not work as Firefox uses different protocol than CDP
- Known issue: HTTP /json/list endpoint closes connection even when DevTools shows connected
2026-02-01 15:06:50 +01:00
DannyDannyDanny
90565ae16a Add WebSocket fallback for tab listing when HTTP endpoint fails
- Add get_tabs_via_websocket() to query tabs via WebSocket when HTTP /json/list fails
- Update get_tabs_via_rdp() to try WebSocket fallback
- Update get_tab_html_async() to use WebSocket fallback for getting tab WebSocket URLs
- Known issue: HTTP endpoint may not respond even when DevTools shows connected
2026-02-01 15:05:54 +01:00
DannyDannyDanny
a228866b0c Fix asyncio deprecation warning and improve error messages
- Replace asyncio.get_event_loop() with asyncio.get_running_loop()
- Add better error messages when HTTP endpoint fails
- Show available tab IDs when tab not found
- Handle HTTP endpoint connection failures gracefully
2026-02-01 15:04:41 +01:00
DannyDannyDanny
b2b0d76e02 Update faf README with content command and troubleshooting
- Document new 'content' command for fetching HTML from tabs
- Add troubleshooting section for HTTP endpoint issues
- Add instructions for running from Nix development shell
- Note requirement for 'nix develop -c $(which fish)'
2026-02-01 15:03:47 +01:00
DannyDannyDanny
d9eccc8cdb Add websockets Python package to faf development environment
- Add websockets dependency to Python environment in flake.nix
- Required for WebSocket connections to Firefox tabs
2026-02-01 15:03:43 +01:00
DannyDannyDanny
2253bdde5d Add WebSocket support and content command to faf script
- Add WebSocket connection functions for Firefox Remote Debugging Protocol
- Implement CDP Runtime.evaluate protocol communication
- Add 'content' command to fetch HTML from tabs via WebSocket
- Add get_tab_html() function to orchestrate HTML retrieval
- Increase connection timeout for RDP requests
2026-02-01 15:03:42 +01:00
DannyDannyDanny
9aedc697d9 Rename firefox-tabs to f-around-firefox (faf) and add to PATH 2026-01-30 18:26:15 +01:00