Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
silence noisy warnings
Nick Sweeting5e03a961dfac
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.pyindex 9095588ca..d439a2d19 100644--- a/browser_use/browser/session.py+++ b/browser_use/browser/session.py@@ -888,6 +888,9 @@ class BrowserSession(BaseModel):# Wait for CDP port to become available (Chrome might still be starting)import httpx+ # Add initial delay to give Chrome time to start up before first check+ await asyncio.sleep(1.3)+async with httpx.AsyncClient() as client:for i in range(30): # 30 second timeout# First check if the Chrome process has exiteddiff --git a/browser_use/sync/auth.py b/browser_use/sync/auth.pyindex 3853c9f6c..cf98d4c26 100644--- a/browser_use/sync/auth.py+++ b/browser_use/sync/auth.py@@ -331,7 +331,8 @@ class DeviceAuthClient:logger.warning(f'Failed to authenticate with cloud service: HTTP {e.response.status_code} - {e.response.text}')except httpx.RequestError as e:# Connection/network errors- logger.warning(f'Failed to connect to cloud service: {type(e).__name__}: {e}')+ # logger.warning(f'Failed to connect to cloud service: {type(e).__name__}: {e}')+ passexcept Exception as e:# Other unexpected errorslogger.warning(f'Unexpected error during cloud authentication: {type(e).__name__}: {e}')diff --git a/browser_use/sync/service.py b/browser_use/sync/service.pyindex e9072f6e8..a46dd5786 100644--- a/browser_use/sync/service.py+++ b/browser_use/sync/service.py@@ -96,7 +96,8 @@ class CloudSync:except httpx.TimeoutException:logger.warning(f'⚠️ Event send timed out after 10 seconds: {event}')except httpx.ConnectError as e:- logger.warning(f'⚠️ Failed to connect to cloud service at {self.base_url}: {e}')+ # logger.warning(f'⚠️ Failed to connect to cloud service at {self.base_url}: {e}')+ passexcept httpx.HTTPError as e:logger.warning(f'⚠️ HTTP error sending event {event}: {type(e).__name__}: {e}')except Exception as e: