Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Browsers will not start in GitLab pipeline #6415

Closed
radekBednarik opened this issue May 5, 2021 · 8 comments
Closed

[BUG] Browsers will not start in GitLab pipeline #6415

radekBednarik opened this issue May 5, 2021 · 8 comments

Comments

@radekBednarik
Copy link

Context:

  • Playwright Version: 1.10.0
  • Operating System: docker image mcr.microsoft.com/playwright:bionic
  • Node.js version: as in the image
  • Browser: [Chromium, Firefox]
  • Extra:
    • Playwright is running using jest, jest-playwright and jest-playwright-preset

jest-playwright config

module.exports = {
  launchOptions: {
    headless: false,
    slowMo: 100,
  },
  contextOptions: {
    viewport: {
      width: 1920,
      height: 1080,
    },
  },
  browsers: ["chromium", "firefox"],
  exitOnPageError: false,
};

GitLab pipeline

stages:  
  - test
 
tests:
  stage: test 
  image: mcr.microsoft.com/playwright:bionic 
  script: 
    - echo "build"
    - npm ci
    - ls    
    - echo "Test starting"
    - xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" npm test

Describe the bug

When pipeline job will get to the point, where browser are started, I will get following error (using DEBUG=pw:browser*):

Test starting
$ xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" --listen-tcp npm test
> easy_poc@1.0.0 test /builds/radekBednarik/easy_poc
> DEBUG=pw:browser* jest --runInBand
2021-05-05T10:44:45.990Z pw:browser <launching> /ms-playwright/chromium-857950/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 --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-ml9VaE --remote-debugging-pipe --no-sandbox --no-sandbox --no-startup-window
2021-05-05T10:44:45.992Z pw:browser <launched> pid=82
2021-05-05T10:44:46.332Z pw:browser [pid=82][err] [82:94:0505/104446.331277:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T10:44:46.403Z pw:browser [pid=82][err] [82:108:0505/104446.402206:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T10:44:46.403Z pw:browser [pid=82][err] [82:108:0505/104446.402237:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T10:44:46.447Z pw:browser [pid=82][err] [82:121:0505/104446.447286:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T10:44:46.448Z pw:browser [pid=82][err] [82:121:0505/104446.448038:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T10:44:46.448Z pw:browser [pid=82][err] [82:121:0505/104446.448478:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T10:44:46.448Z pw:browser [pid=82][err] [82:121:0505/104446.448892:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T10:44:46.449Z pw:browser [pid=82][err] [82:121:0505/104446.449245:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T10:44:46.473Z pw:browser <launching> /ms-playwright/firefox-1238/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-s840a4 -juggler-pipe --no-sandbox -silent
2021-05-05T10:44:46.473Z pw:browser <launched> pid=122
2021-05-05T10:44:46.581Z pw:browser [pid=82][err] libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
2021-05-05T10:44:46.589Z pw:browser [pid=82][err] [106:106:0505/104446.589206:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
2021-05-05T10:44:46.630Z pw:browser [pid=82][err] [132:132:0505/104446.630157:ERROR:vaapi_wrapper.cc(594)] Could not get a valid VA display
2021-05-05T10:44:46.631Z pw:browser [pid=82][err] [132:132:0505/104446.631081:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl
2021-05-05T10:44:47.404Z pw:browser [pid=122][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.935859) [GFX1-]: glxtest: libpci missing
2021-05-05T10:44:47.404Z pw:browser [pid=122][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.935859) |[1][GFX1-]: No GPUs detected via PCI (t=0.93701) [GFX1-]: No GPUs detected via PCI
2021-05-05T10:44:47.549Z pw:browser [pid=122][out] 
2021-05-05T10:44:47.549Z pw:browser [pid=122][out] Juggler listening to the pipe
2021-05-05T10:44:47.769Z pw:browser [pid=122][out] console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)"))
2021-05-05T10:44:48.570Z pw:browser [pid=82][err] [82:108:0505/104448.569869:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T10:44:48.572Z pw:browser [pid=82][err] [82:108:0505/104448.569907:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

If there is something, I should do regarding CI or test runner setup, I am at loss what it is.

Pls help :)

Best

RB

@hananmalka
Copy link

@radekBednarik Is it mandatory to run in headless=false?
This error is due to headless mode.

In case of headless=true - I believe you won't have it.

@radekBednarik
Copy link
Author

@hananmalka hi, well, according to their documenation, their docker images should have xvfb in and should handle headful mode. and secondly, in headless, I am getting a bunch of different errors, I do not want to get into right now

@mxschmitt
Copy link
Member

Could you try using the following Docker image instead? mcr.microsoft.com/playwright:v1.10.0-focal (soon we have it like that also updated in the docs) - it could solve the issue when the non-tagged variant is locally in the cache and oudated.

@radekBednarik
Copy link
Author

Hello @mxschmitt , I tried running this image in headful and headless as well.

  1. Headfull mode errors:
Test starting
$ xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" npm test
> easy_poc@1.0.0 test /builds/radekBednarik/easy_poc
> DEBUG=pw:browser* jest --runInBand
2021-05-05T11:26:15.014Z pw:browser <launching> /ms-playwright/chromium-857950/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 --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-QiqBit --remote-debugging-pipe --no-sandbox --no-sandbox --no-startup-window
2021-05-05T11:26:15.016Z pw:browser <launched> pid=84
2021-05-05T11:26:15.632Z pw:browser [pid=84][err] [84:100:0505/112615.631331:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:26:15.753Z pw:browser <launching> /ms-playwright/firefox-1238/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-VCYURw -juggler-pipe --no-sandbox -silent
2021-05-05T11:26:15.754Z pw:browser <launched> pid=131
2021-05-05T11:26:15.755Z pw:browser [pid=84][err] [84:130:0505/112615.743218:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:26:15.756Z pw:browser [pid=84][err] [84:130:0505/112615.743275:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:26:15.756Z pw:browser [pid=84][err] [84:130:0505/112615.743316:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:26:15.756Z pw:browser [pid=84][err] [84:130:0505/112615.743340:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:26:15.756Z pw:browser [pid=84][err] [84:130:0505/112615.743361:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:26:15.768Z pw:browser [pid=84][err] [84:114:0505/112615.765857:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T11:26:15.769Z pw:browser [pid=84][err] [84:114:0505/112615.765884:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T11:26:15.911Z pw:browser [pid=84][err] libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
2021-05-05T11:26:15.918Z pw:browser [pid=84][err] [112:112:0505/112615.918108:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
2021-05-05T11:26:15.938Z pw:browser [pid=84][err] [145:145:0505/112615.938450:ERROR:vaapi_wrapper.cc(594)] Could not get a valid VA display
2021-05-05T11:26:15.943Z pw:browser [pid=84][err] [145:145:0505/112615.943037:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl
2021-05-05T11:26:16.801Z pw:browser [pid=131][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=1.05326) [GFX1-]: glxtest: libpci missing
2021-05-05T11:26:16.802Z pw:browser [pid=131][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=1.05326) |[1][GFX1-]: glxtest: libEGL initialize failed (t=1.05421) [GFX1-]: glxtest: libEGL initialize failed
2021-05-05T11:26:16.802Z pw:browser [pid=131][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=1.05326) |[1][GFX1-]: glxtest: libEGL initialize failed (t=1.05421) |[2][GFX1-]: glxtest: X error, error_code=158, request_code=150, minor_code=6 (t=1.05468) [GFX1-]: glxtest: X error, error_code=158, request_code=150, minor_code=6
2021-05-05T11:26:16.802Z pw:browser [pid=131][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=1.05326) |[1][GFX1-]: glxtest: libEGL initialize failed (t=1.05421) |[2][GFX1-]: glxtest: X error, error_code=158, request_code=150, minor_code=6 (t=1.05468) |[3][GFX1-]: No GPUs detected via PCI (t=1.05512) [GFX1-]: No GPUs detected via PCI
2021-05-05T11:26:16.803Z pw:browser [pid=131][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=1.05326) |[1][GFX1-]: glxtest: libEGL initialize failed (t=1.05421) |[2][GFX1-]: glxtest: X error, error_code=158, request_code=150, minor_code=6 (t=1.05468) |[3][GFX1-]: No GPUs detected via PCI (t=1.05512) |[4][GFX1-]: glxtest: process failed (exited with status 1) (t=1.05548) [GFX1-]: glxtest: process failed (exited with status 1)
2021-05-05T11:26:16.945Z pw:browser [pid=131][out] 
2021-05-05T11:26:16.945Z pw:browser [pid=131][out] Juggler listening to the pipe
2021-05-05T11:26:17.225Z pw:browser [pid=131][out] console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)"))
2021-05-05T11:26:18.422Z pw:browser [pid=84][err] [84:114:0505/112618.418307:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T11:26:18.423Z pw:browser [pid=84][err] [84:114:0505/112618.418345:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T11:26:20.338Z pw:browser [pid=84][err] [84:114:0505/112618.732950:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T11:26:20.339Z pw:browser [pid=84][err] [84:114:0505/112618.732977:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
2021-05-05T11:26:20.339Z pw:browser [pid=84][err] [84:114:0505/112618.732989:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
  1. Headless mode:

I used headless:true in the jest-playwright.config.js file and in the pipeline npm test .

$ npm test
> easy_poc@1.0.0 test /builds/radekBednarik/easy_poc
> DEBUG=pw:browser* jest --runInBand
2021-05-05T11:40:14.427Z pw:browser <launching> /ms-playwright/chromium-857950/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 --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-TWuGYc --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
2021-05-05T11:40:14.429Z pw:browser <launched> pid=67
2021-05-05T11:40:14.771Z pw:browser [pid=67][err] [0505/114014.768172:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-05T11:40:14.786Z pw:browser <launching> /ms-playwright/firefox-1238/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-PEt4gb -juggler-pipe -silent
2021-05-05T11:40:14.787Z pw:browser <launched> pid=89
2021-05-05T11:40:14.788Z pw:browser [pid=67][err] [0505/114014.781388:ERROR:vaapi_wrapper.cc(594)] Could not get a valid VA display
2021-05-05T11:40:14.788Z pw:browser [pid=67][err] [0505/114014.781501:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl
2021-05-05T11:40:14.827Z pw:browser [pid=89][err] *** You are running in headless mode.
2021-05-05T11:40:15.239Z pw:browser [pid=89][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.45613) [GFX1-]: glxtest: libpci missing
2021-05-05T11:40:15.240Z pw:browser [pid=89][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.45613) |[1][GFX1-]: glxtest: libEGL initialize failed (t=0.457064) [GFX1-]: glxtest: libEGL initialize failed
2021-05-05T11:40:15.240Z pw:browser [pid=89][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.45613) |[1][GFX1-]: glxtest: libEGL initialize failed (t=0.457064) |[2][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.45757) [GFX1-]: glxtest: Unable to open a connection to the X server
2021-05-05T11:40:15.240Z pw:browser [pid=89][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.45613) |[1][GFX1-]: glxtest: libEGL initialize failed (t=0.457064) |[2][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.45757) |[3][GFX1-]: glxtest: libEGL initialize failed (t=0.458) [GFX1-]: glxtest: libEGL initialize failed
2021-05-05T11:40:15.241Z pw:browser [pid=89][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.45613) |[1][GFX1-]: glxtest: libEGL initialize failed (t=0.457064) |[2][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.45757) |[3][GFX1-]: glxtest: libEGL initialize failed (t=0.458) |[4][GFX1-]: No GPUs detected via PCI (t=0.458428) [GFX1-]: No GPUs detected via PCI
2021-05-05T11:40:15.361Z pw:browser [pid=89][out] 
2021-05-05T11:40:15.361Z pw:browser [pid=89][out] Juggler listening to the pipe
2021-05-05T11:40:15.512Z pw:browser [pid=89][out] console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)"))
2021-05-05T11:40:15.824Z pw:browser [pid=89][err] 
2021-05-05T11:40:15.825Z pw:browser [pid=89][err] (/ms-playwright/firefox-1238/firefox/firefox:138): GLib-GObject-CRITICAL **: 11:40:15.823: g_object_set: assertion 'G_IS_OBJECT (object)' failed
2021-05-05T11:40:16.345Z pw:browser [pid=67][err] [0505/114016.344669:ERROR:command_buffer_proxy_impl.cc(121)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.

@aslushnikov
Copy link
Contributor

Hey @radekBednarik,

I tried to repro this here: https://gitlab.com/aslushnikov/playwright-repro-for-6415/-/pipelines

However, the pipeline worked just fine - browsers all launched and printed their user agents. I didn't use jest-playwright though; should I? If I should, what would be the minimal test that fails for you?

@radekBednarik
Copy link
Author

Hello @aslushnikov is it possible to pm you? The repo which I am trying to run on gitlab is private, since it was POC for for a 3rd party.
Otherwise i will need a bit of my off time to try to prepare something.

@radekBednarik
Copy link
Author

Hi @aslushnikov I do not know, what happened, but it works now ! :D

there are still some errors, but browser starts and tests are running. I used this image: mcr.microsoft.com/playwright:v1.10.0-focal

> easy_poc@1.0.0 test /builds/radekBednarik/easy_poc
> DEBUG=pw:browser* jest --runInBand
2021-05-07T06:37:53.554Z pw:browser <launching> /ms-playwright/chromium-857950/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 --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-flJTGd --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
2021-05-07T06:37:53.556Z pw:browser <launched> pid=67
2021-05-07T06:37:53.809Z pw:browser [pid=67][err] [0507/063753.728280:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2021-05-07T06:37:53.810Z pw:browser [pid=67][err] [0507/063753.743867:ERROR:vaapi_wrapper.cc(594)] Could not get a valid VA display
2021-05-07T06:37:53.810Z pw:browser [pid=67][err] [0507/063753.744021:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl

Whoever did whatever, thanks a lot for that :D

@aslushnikov
Copy link
Contributor

Awesome! Closing this then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants