4 months ago
I'm getting this error from the logs
2025-11-25 15:38:41 | ERROR | app.main:lifespan:122 - Failed to initialize browsers: BrowserType.connect_over_cdp: WebSocket error: wss://browserless-production-9fb0.up.railway.app/playwright 428 Precondition Required
╔════════════════════════════════════════════════════╗
║ Playwright version mismatch: ║
║ - server version: v1.41 ║
║ - client version: v1.55 ║
║ ║
║ If you are using VSCode extension, restart VSCode. ║
║ ║
║ If you are connecting to a remote service, ║
║ keep your local Playwright version in sync ║
║ with the remote service version. ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════╝I'm currently running Crawl4AI and I don't have a clear way of downgrading playwright version to 1.41
Browserless already upgraded to version 1.55 in this PR https://github.com/browserless/browserless/issues/4914
Pinned Solution
4 months ago
Fixed: Playwright–Browserless Version Mismatch
You're getting that error because the Playwright client you're using (v1.55) doesn't match the Browserless server version (v1.41), and the WebSocket /playwright endpoint requires both to be in sync.
There are two solid options to fix this:
Option 1 – Downgrade Playwright
If you're set on using the /playwright WebSocket endpoint, you have to match the server version. That means downgrading your local Playwright package to v1.41 (since that’s what the server is running based on your logs). Example:
npm install playwright@1.41.0
# or for Python:
pip install playwright==1.41.0
That should clear up the 428 version mismatch error.
BUT if you're open to a simpler fix…
Option 2 – Use CDP Instead (Recommended)
Browserless supports connecting via Chrome DevTools Protocol (CDP), which doesn’t require the Playwright versions to match. This is the cleanest way around the issue.
Just remove /playwright from the URL and connect like this:
JavaScript/Node:
const browser = await chromium.connectOverCDP("wss://your-browserless-url?token=your-token");
Python:
browser = playwright.chromium.connect_over_cdp("wss://your-browserless-url?token=your-token")
The cool part here is that CDP is version-tolerant—no more client/server mismatch headaches.
For Crawl4AI
Since you mentioned you're running Crawl4AI, you can set the connection mode to use CDP directly:
from crawl4ai import BrowserConfig, AsyncWebCrawler
import os
browser_cfg = BrowserConfig(
browser_type="chromium",
headless=True,
browser_mode="cdp",
cdp_url=os.environ["BROWSER_WS_ENDPOINT"] # This should be the CDP URL (no `/playwright`)
)
crawler = AsyncWebCrawler(config=browser_cfg)
Just make sure your Railway environment has the correct BROWSER_WS_ENDPOINT set without the /playwright path.
TL;DR:
Either downgrade to Playwright v1.41 (if you’re sticking with the /playwright WebSocket), or better yet, switch to CDP which is way more forgiving on versions. I’d go with CDP if possible—it’s what Browserless recommends too.
Hope that helps—should get you past that error and up and crawling.
3 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
4 months ago
Fixed: Playwright–Browserless Version Mismatch
You're getting that error because the Playwright client you're using (v1.55) doesn't match the Browserless server version (v1.41), and the WebSocket /playwright endpoint requires both to be in sync.
There are two solid options to fix this:
Option 1 – Downgrade Playwright
If you're set on using the /playwright WebSocket endpoint, you have to match the server version. That means downgrading your local Playwright package to v1.41 (since that’s what the server is running based on your logs). Example:
npm install playwright@1.41.0
# or for Python:
pip install playwright==1.41.0
That should clear up the 428 version mismatch error.
BUT if you're open to a simpler fix…
Option 2 – Use CDP Instead (Recommended)
Browserless supports connecting via Chrome DevTools Protocol (CDP), which doesn’t require the Playwright versions to match. This is the cleanest way around the issue.
Just remove /playwright from the URL and connect like this:
JavaScript/Node:
const browser = await chromium.connectOverCDP("wss://your-browserless-url?token=your-token");
Python:
browser = playwright.chromium.connect_over_cdp("wss://your-browserless-url?token=your-token")
The cool part here is that CDP is version-tolerant—no more client/server mismatch headaches.
For Crawl4AI
Since you mentioned you're running Crawl4AI, you can set the connection mode to use CDP directly:
from crawl4ai import BrowserConfig, AsyncWebCrawler
import os
browser_cfg = BrowserConfig(
browser_type="chromium",
headless=True,
browser_mode="cdp",
cdp_url=os.environ["BROWSER_WS_ENDPOINT"] # This should be the CDP URL (no `/playwright`)
)
crawler = AsyncWebCrawler(config=browser_cfg)
Just make sure your Railway environment has the correct BROWSER_WS_ENDPOINT set without the /playwright path.
TL;DR:
Either downgrade to Playwright v1.41 (if you’re sticking with the /playwright WebSocket), or better yet, switch to CDP which is way more forgiving on versions. I’d go with CDP if possible—it’s what Browserless recommends too.
Hope that helps—should get you past that error and up and crawling.
4 months ago
Hi @bytekim, this has resolved the issue for my crawl4ai instance.
Thank you so much!
Status changed to Solved ray-chen • 4 months ago

