From 2fe56a74eda5a8cf9345b38820ea833f58baf367 Mon Sep 17 00:00:00 2001 From: AakashHotchandani Date: Fri, 5 Jun 2026 13:15:58 +0530 Subject: [PATCH] Fix: pin robotframework-browser to 19.13.0 so the SDK Playwright wrapper loads robotframework-browser 19.14+ resolves the bundled Playwright Node core to 1.60.x. In playwright-core 1.60 the client classes were moved out of `lib/client/` into a bundled core, so the path `playwright-core/lib/client/browserContext` no longer exists. The BrowserStack Python SDK injects a wrapper (index_bstack.js) that hard-requires that path; with 1.60 it loads `undefined` and crashes at `BrowserContext.prototype.newPage`, killing the Playwright Node sidecar. Every Robot `Browser` keyword then fails with "Could not connect to the playwright process" and no BrowserStack session is ever created. Pinning to 19.13.0 keeps the bundled Node core at 1.59.x (which still ships `lib/client/browserContext.js`) and remains compatible with browserstack-sdk 1.46.0 (protobuf 6.33.6). Verified live: `browserstack-sdk pabot --testlevelsplit --processes 3 ./test/sdk_sample_test.robot` produced 3/3 passing Automate sessions (Win11 Chrome, macOS Sonoma playwright-firefox, macOS Sonoma playwright-webkit). Co-Authored-By: Claude Opus 4.8 --- requirements.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 14de263..a6a970a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,11 @@ -robotframework-browser +# Pinned: robotframework-browser 19.14+ bundles Playwright Node core 1.60.x, whose +# client classes moved out of `playwright-core/lib/client/`. The BrowserStack SDK's +# injected Playwright wrapper still requires `playwright-core/lib/client/browserContext`, +# so on 1.60 the Node sidecar crashes at startup ("Could not connect to the playwright +# process") and no BrowserStack session is created. 19.13.0 resolves Node core to 1.59.x +# (which keeps `lib/client/`) and stays compatible with the SDK. Unpin once the SDK +# wrapper is updated for Playwright 1.60's bundled core. +robotframework-browser==19.13.0 robotframework robotframework-pabot browserstack-sdk