Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

chore: update cdp-use dependency version and increase max WebSocket frame size in BrowserSession

reformedot91e82ae85ec1
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.py
index 19cff80cb..9995a8622 100644
--- a/browser_use/browser/session.py
+++ b/browser_use/browser/session.py
@@ -1418,7 +1418,9 @@ class BrowserSession(BaseModel):
try:
# Create and store the CDP client for direct CDP communication
- self._cdp_client_root = CDPClient(self.cdp_url)
+ self._cdp_client_root = CDPClient(
+ self.cdp_url, max_ws_frame_size=200 * 1024 * 1024
+ ) # Use 200MB limit to handle pages with very large DOMs
assert self._cdp_client_root is not None
await self._cdp_client_root.start()
diff --git a/pyproject.toml b/pyproject.toml
index edb47e044..8a184bc2a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -41,7 +41,7 @@ dependencies = [
"mcp>=1.10.1",
"pypdf>=5.7.0",
"reportlab>=4.0.0",
- "cdp-use>=1.4.0",
+ "cdp-use>=1.4.4",
"pyotp>=2.9.0",
"pillow>=11.2.1",
"cloudpickle>=3.1.1",