microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.44k stars 3.63k forks source link

[BUG]: Failed to launch chromium on Ubuntu (ubuntu-20.04) (Azure Devops) with error 'Unable to open X display' #8393

Closed jonsamwell closed 3 years ago

jonsamwell commented 3 years ago

Context:

## System:
  - OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
  - Memory: 3.21 GB / 6.79 GB
  - Container: Yes
 ## Binaries:
  - Node: 14.17.5 - /usr/local/bin/node
  - Yarn: 1.22.11 - /usr/local/bin/yarn
  - npm: 6.14.14 - /usr/local/bin/npm
 ## Languages:
  - Bash: 5.0.17 - /usr/bin/bash
 ## npmPackages:
  - playwright: ^1.14.0 => 1.14.0 

Code Snippet

Setup script:

npm ci
npx playwright install-deps

Then launching a chromium instance via the code

import { chromium} from 'playwright';

await chromium.launch({
    headless: true,
    args: ['--no-sandbox', '--disable-setuid-sandbox'],  // note the failure also happens without these args
  });

Describe the bug

Everything works fine on Windows and MacOS however when run on Unbuntu the below error is thrown and the tests do not run.

Note this is all run on hosted agents in Azure Devops

Unable to open X display

Logs:

> set "headless=true" && npx cucumber-js --profile report
2021-08-24T06:00:41.9352019Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-ha7tg1 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9354305Z 
2021-08-24T06:00:41.9355570Z <launched> pid=4430
2021-08-24T06:00:41.9356164Z cucumber-js version: 7.3.1
2021-08-24T06:00:41.9357707Z [pid=4430][err] [4430:4430:0824/060040.039820:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9358290Z Run started at 2021/08/24 06:00
2021-08-24T06:00:41.9361123Z [pid=4430][err] [0824/060040.072351:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9361530Z 
2021-08-24T06:00:41.9362883Z [pid=4430][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9363340Z 0 scenarios
2021-08-24T06:00:41.9364640Z =========================== logs ===========================
2021-08-24T06:00:41.9365380Z 0 steps
2021-08-24T06:00:41.9370339Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-ha7tg1 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9373013Z 0m30.210s (executing steps: 0m00.000s)
2021-08-24T06:00:41.9374966Z <launched> pid=4430
2021-08-24T06:00:41.9375349Z Run finished at 2021/08/24 06:00
2021-08-24T06:00:41.9375847Z 
2021-08-24T06:00:41.9376570Z [pid=4430][err] [4430:4430:0824/060040.039820:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9378298Z [pid=4430][err] [0824/060040.072351:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9379641Z [pid=4430][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9381796Z ============================================================
2021-08-24T06:00:41.9385359Z     at Worker.exit (/home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/run_worker.ts:8:38)
2021-08-24T06:00:41.9386852Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/worker.ts:160:14
2021-08-24T06:00:41.9389916Z caused by: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9390724Z ==================== Browser output: ====================
2021-08-24T06:00:41.9744820Z Found npm debug log, make sure the path matches with the one in npm's output: /home/vsts/.npm/_logs/2021-08-24T06_00_41_925Z-debug.log
2021-08-24T06:00:41.9750034Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-ha7tg1 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9751940Z <launched> pid=4430
2021-08-24T06:00:41.9752375Z [pid=4430][err] [4430:4430:0824/060040.039820:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9752957Z [pid=4430][err] [0824/060040.072351:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9753463Z [pid=4430][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9754422Z =========================== logs ===========================
2021-08-24T06:00:41.9757563Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-ha7tg1 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9759770Z <launched> pid=4430
2021-08-24T06:00:41.9760194Z [pid=4430][err] [4430:4430:0824/060040.039820:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9760773Z [pid=4430][err] [0824/060040.072351:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9761346Z [pid=4430][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9761855Z ============================================================
2021-08-24T06:00:41.9762542Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/support-files/drivers/playwright/playwright.hook.ts:16:35
2021-08-24T06:00:41.9763533Z VError: a BeforeAll hook errored on worker 2, process exiting: support-files/drivers/playwright/playwright.hook.ts:15: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9764183Z ==================== Browser output: ====================
2021-08-24T06:00:41.9767123Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-Z4mx4G --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9768850Z <launched> pid=4619
2021-08-24T06:00:41.9769249Z [pid=4619][err] [4619:4619:0824/060040.660932:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9769788Z [pid=4619][err] [0824/060040.676963:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9770266Z [pid=4619][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9770646Z [pid=4619] <process did exit: exitCode=1, signal=null>
2021-08-24T06:00:41.9770991Z [pid=4619] starting temporary directories cleanup
2021-08-24T06:00:41.9771341Z =========================== logs ===========================
2021-08-24T06:00:41.9774181Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-Z4mx4G --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9776056Z <launched> pid=4619
2021-08-24T06:00:41.9776441Z [pid=4619][err] [4619:4619:0824/060040.660932:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9776975Z [pid=4619][err] [0824/060040.676963:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9777458Z [pid=4619][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9777844Z [pid=4619] <process did exit: exitCode=1, signal=null>
2021-08-24T06:00:41.9778202Z [pid=4619] starting temporary directories cleanup
2021-08-24T06:00:41.9778536Z ============================================================
2021-08-24T06:00:41.9779258Z     at Worker.exit (/home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/run_worker.ts:8:38)
2021-08-24T06:00:41.9780065Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/worker.ts:160:14
2021-08-24T06:00:41.9780578Z caused by: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9781025Z ==================== Browser output: ====================
2021-08-24T06:00:41.9784673Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-Z4mx4G --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9786617Z <launched> pid=4619
2021-08-24T06:00:41.9787036Z [pid=4619][err] [4619:4619:0824/060040.660932:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9787619Z [pid=4619][err] [0824/060040.676963:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9788140Z [pid=4619][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9788552Z [pid=4619] <process did exit: exitCode=1, signal=null>
2021-08-24T06:00:41.9788932Z [pid=4619] starting temporary directories cleanup
2021-08-24T06:00:41.9789302Z =========================== logs ===========================
2021-08-24T06:00:41.9792388Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-Z4mx4G --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9794422Z <launched> pid=4619
2021-08-24T06:00:41.9794835Z [pid=4619][err] [4619:4619:0824/060040.660932:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9795422Z [pid=4619][err] [0824/060040.676963:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9795927Z [pid=4619][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9796337Z [pid=4619] <process did exit: exitCode=1, signal=null>
2021-08-24T06:00:41.9796725Z [pid=4619] starting temporary directories cleanup
2021-08-24T06:00:41.9797083Z ============================================================
2021-08-24T06:00:41.9797797Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/support-files/drivers/playwright/playwright.hook.ts:16:35
2021-08-24T06:00:41.9798854Z VError: a BeforeAll hook errored on worker 1, process exiting: support-files/drivers/playwright/playwright.hook.ts:15: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9799540Z ==================== Browser output: ====================
2021-08-24T06:00:41.9802595Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-E1PRot --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9804446Z <launched> pid=4700
2021-08-24T06:00:41.9804871Z [pid=4700][err] [4700:4700:0824/060040.821017:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9805445Z [pid=4700][err] [0824/060040.827617:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9805968Z [pid=4700][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9806479Z =========================== logs ===========================
2021-08-24T06:00:41.9809298Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-E1PRot --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9811095Z <launched> pid=4700
2021-08-24T06:00:41.9811476Z [pid=4700][err] [4700:4700:0824/060040.821017:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9812062Z [pid=4700][err] [0824/060040.827617:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9812542Z [pid=4700][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9812914Z ============================================================
2021-08-24T06:00:41.9813642Z     at Worker.exit (/home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/run_worker.ts:8:38)
2021-08-24T06:00:41.9814425Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/worker.ts:160:14
2021-08-24T06:00:41.9815012Z caused by: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9815441Z ==================== Browser output: ====================
2021-08-24T06:00:41.9818614Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-E1PRot --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9820612Z <launched> pid=4700
2021-08-24T06:00:41.9821026Z [pid=4700][err] [4700:4700:0824/060040.821017:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9821607Z [pid=4700][err] [0824/060040.827617:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9822130Z [pid=4700][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9822534Z =========================== logs ===========================
2021-08-24T06:00:41.9825781Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-E1PRot --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9827643Z <launched> pid=4700
2021-08-24T06:00:41.9828055Z [pid=4700][err] [4700:4700:0824/060040.821017:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9828646Z [pid=4700][err] [0824/060040.827617:ERROR:nacl_helper_linux.cc(307)] NaCl helper process running without a sandbox!
2021-08-24T06:00:41.9829244Z [pid=4700][err] Most likely you need to configure your SUID sandbox correctly
2021-08-24T06:00:41.9829663Z ============================================================
2021-08-24T06:00:41.9830367Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/support-files/drivers/playwright/playwright.hook.ts:16:35
2021-08-24T06:00:41.9831527Z VError: a BeforeAll hook errored on worker 3, process exiting: support-files/drivers/playwright/playwright.hook.ts:15: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9832430Z ==================== Browser output: ====================
2021-08-24T06:00:41.9835555Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-UIsUe6 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9837410Z <launched> pid=4846
2021-08-24T06:00:41.9837821Z [pid=4846][err] [4846:4846:0824/060041.125787:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9838311Z =========================== logs ===========================
2021-08-24T06:00:41.9841359Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-UIsUe6 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9843147Z <launched> pid=4846
2021-08-24T06:00:41.9843580Z [pid=4846][err] [4846:4846:0824/060041.125787:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9844058Z ============================================================
2021-08-24T06:00:41.9844843Z     at Worker.exit (/home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/run_worker.ts:8:38)
2021-08-24T06:00:41.9845697Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/node_modules/@cucumber/cucumber/src/runtime/parallel/worker.ts:160:14
2021-08-24T06:00:41.9847574Z caused by: browserType.launch: Protocol error (Browser.getVersion): Browser closed.
2021-08-24T06:00:41.9848693Z ==================== Browser output: ====================
2021-08-24T06:00:41.9851934Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-UIsUe6 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9858542Z <launched> pid=4846
2021-08-24T06:00:41.9858996Z [pid=4846][err] [4846:4846:0824/060041.125787:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9859520Z =========================== logs ===========================
2021-08-24T06:00:41.9863040Z <launching> /home/vsts/.cache/ms-playwright/chromium-907428/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=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose --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-UIsUe6 --remote-debugging-pipe --no-sandbox --no-sandbox --disable-setuid-sandbox --no-startup-window
2021-08-24T06:00:41.9865343Z <launched> pid=4846
2021-08-24T06:00:41.9865784Z [pid=4846][err] [4846:4846:0824/060041.125787:ERROR:browser_main_loop.cc(1400)] Unable to open X display.
2021-08-24T06:00:41.9866265Z ============================================================
2021-08-24T06:00:41.9867019Z     at /home/vsts/work/r1/a/_qa-tests/All_Files/support-files/drivers/playwright/playwright.hook.ts:16:35
mxschmitt commented 3 years ago

See https://playwright.dev/docs/ci#running-headed or don't use headless: false when launching the browser.

jonsamwell commented 3 years ago

Thanks @mxschmitt sorry I didn't see that doc!