Hi everyone!
I’m trying to run a test on a Raspberry Pi 3. This test works very well in my notebook with Ubuntu 20.04, but when I try to run on the Rpi I got the error Error: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
Did anyone see something like this before?
Error
pi@raspberrypi:~/poc-python-robot-framework/pfm_example $ cat playwright-log.txt
{“level”:30,“time”:“2021-06-22T14:51:49.004Z”,“pid”:1126,“hostname”:“raspberrypi”,“msg”:“Listening on 35847”}
================= Original suppressed error =================
browserType.launch: Protocol error (Browser.getVersion): Browser closed.
==================== Browser output: ====================
/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/.local-browsers/chromium-888113/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading,GlobalMediaControls --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --user-data-dir=/tmp/playwright_chromiumdev_profile-0hOoZK --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
pid=1285
[pid=1285][err] /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/.local-browsers/chromium-888113/chrome-linux/chrome: 1: /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/.local-browsers/chromium-888113/chrome-linux/chrome: Syntax error: “(” unexpected
[pid=1285]
[pid=1285] starting temporary directories cleanup
=========================== logs ===========================
/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/.local-browsers/chromium-888113/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading,GlobalMediaControls --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --user-data-dir=/tmp/playwright_chromiumdev_profile-0hOoZK --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
pid=1285
[pid=1285][err] /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/.local-browsers/chromium-888113/chrome-linux/chrome: 1: /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/.local-browsers/chromium-888113/chrome-linux/chrome: Syntax error: “(” unexpected
[pid=1285]
[pid=1285] starting temporary directories cleanup
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
Error
at Object.captureStackTrace (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/lib/utils/stackTrace.js:51:19)
at Connection.sendMessageToServer (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/lib/client/connection.js:69:48)
at Proxy. (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/lib/client/channelOwner.js:64:61)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/lib/client/browserType.js:59:67
at BrowserType._wrapApiCall (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/lib/client/channelOwner.js:77:34)
at BrowserType.launch (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/node_modules/playwright/lib/client/browserType.js:50:21)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25886:64
at step (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25822:23)
at Object.next (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25803:53)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25797:71
at new Promise ()
at webpack_modules…/node/playwright-wrapper/playwright-state.ts.__awaiter (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25793:12)
at _newBrowser (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25872:12)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:26473:42
at step (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25822:23)
at Object.next (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25803:53)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25797:71
at new Promise ()
at webpack_modules…/node/playwright-wrapper/playwright-state.ts.__awaiter (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25793:12)
at newBrowser (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:26465:12)
at PlaywrightServer. (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:24046:50)
at step (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:23999:23)
at Object.next (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:23980:53)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:23974:71
at new Promise ()
at webpack_modules…/node/playwright-wrapper/grpc-service.ts.__awaiter (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:23970:12)
at PlaywrightServer.newBrowser (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:24037:55)
at handleUnary (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:17918:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
================= Original suppressed error =================
Error: Tried to take screenshot, but no page was open.
at Object.exists (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:25732:15)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:22895:41
at step (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:22842:23)
at Object.next (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:22823:53)
at /home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:22817:71
at new Promise ()
at webpack_modules…/node/playwright-wrapper/browser-control.ts.__awaiter (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:22813:12)
at takeScreenshot (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:22869:12)
at PlaywrightServer. (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:24046:50)
at step (/home/pi/.local/lib/python3.7/site-packages/Browser/wrapper/index.js:23999:23)
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Node.js v14.17.1.
Robot Framework 4.0.3 (Python 3.7.3 on linux)
lib browser version = latest (5.1.1)