Closed APAODUQS closed 2 years ago
npm install
npx playwright install chrome
npm run test -- --project Chrome --grep @playwright
looks correct. Can you add whoami
to see what user Jenkins is running in your container?
I got this:
I don't have expertise with Jenkins, nor do I have a Jenkins instance handy to test. I suspect Jenkins is running your commands inside the docker container as Jenkins user, so it can't do the root commands needed for the npx playwright install.
Can you try the following where you have Jenkins break up the building of the test image and actually running the tests?
Dockerfile
FROM mcr.microsoft.com/playwright:v1.20.1-focal
RUN npx playwright@1.20.1 install chrome
Jenkinsfile
pipeline {
agent { dockerfile true }
stages {
stage('e2e-tests') {
steps {
sh 'npm install'
sh 'npm run test -- --project Chrome --grep @playwright'
}
}
}
}
I'll cross post to in the community chat as I'm not a Jenkins user!
It is working thanks. Now I'm trying to run all browsers but I have problems only with firefox, always the tests fails because of timeout. I have:
ARG PLAYWRIGHT_VERSION='1.20.1'
FROM mcr.microsoft.com/playwright:v${PLAYWRIGHT_VERSION}-focal
RUN npx playwright@${PLAYWRIGHT_VERSION} install chrome
RUN npx playwright@${PLAYWRIGHT_VERSION} install msedge
Thanks for your help. :)
Awesome!
I have problems only with firefox,
You can enable tracing and view the trace of one of your failed FFox runs. Alterntively, focus one test, and run with DEBUG="pw:*"
env var set to get a dump of logs. Share here (after skimming them for anything sensitive)! If you're getting an error at a specific part of your test, please include the line(s) and the exact error message.
I got this error:
+ PWDEBUG=console npx playwright test --config=playwright.config.ts --project Firefox --grep @playwright
Running 1 test using 1 worker
[1A[2K
[1A[2K[1/1] [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright
[1A[2K 1) [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright =====
browserType.launch: Protocol error (Browser.enable): Browser closed.
==================== Browser output: ====================
<launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-va24Dc -juggler-pipe -silent
<launched> pid=365
[pid=365][err] Error: no DISPLAY environment variable specified
=========================== logs ===========================
<launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-va24Dc -juggler-pipe -silent
<launched> pid=365
[pid=365][err] Error: no DISPLAY environment variable specified
============================================================
[1A[2K
1 failed
[Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright ======
Error: no DISPLAY environment variable specified
Are you running firefox in headful mode? This error message usually indicates a headful browser is running without a display.
In CI, you'll want to put xvfb-run
in front of your commands so a virtual display is used:
xvfb-run npm run test
That might not work based on this other users experience: https://github.com/microsoft/playwright/issues/12923. Since we've solved the initial npx install
issue, and the remaining bit overlaps with #12923, folding it into there.
I got this error:
+ PWDEBUG=console npx playwright test --config=playwright.config.ts --project Firefox --grep @playwright Running 1 test using 1 worker �[1A�[2K �[1A�[2K[1/1] [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright �[1A�[2K 1) [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright ===== browserType.launch: Protocol error (Browser.enable): Browser closed. ==================== Browser output: ==================== <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-va24Dc -juggler-pipe -silent <launched> pid=365 [pid=365][err] Error: no DISPLAY environment variable specified =========================== logs =========================== <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-va24Dc -juggler-pipe -silent <launched> pid=365 [pid=365][err] Error: no DISPLAY environment variable specified ============================================================ �[1A�[2K 1 failed [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright ======
Do you get the same error when running:
DEBUG=pw:api,pw:browser npx playwright test --config=playwright.config.ts --project Firefox --grep @playwright
I think PWDEBUG=console is running in headed mode so masking your actual issue.
I got this error:
+ PWDEBUG=console npx playwright test --config=playwright.config.ts --project Firefox --grep @playwright Running 1 test using 1 worker �[1A�[2K �[1A�[2K[1/1] [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright �[1A�[2K 1) [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright ===== browserType.launch: Protocol error (Browser.enable): Browser closed. ==================== Browser output: ==================== <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-va24Dc -juggler-pipe -silent <launched> pid=365 [pid=365][err] Error: no DISPLAY environment variable specified =========================== logs =========================== <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-va24Dc -juggler-pipe -silent <launched> pid=365 [pid=365][err] Error: no DISPLAY environment variable specified ============================================================ �[1A�[2K 1 failed [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright ======
Do you get the same error when running:
DEBUG=pw:api,pw:browser npx playwright test --config=playwright.config.ts --project Firefox --grep @playwright
I think PWDEBUG=console is running in headed mode so masking your actual issue.
I got this:
[](http://localhost:8081/job/playwright-demo/job/main/145/console#)Run Tests
[Pipeline] sh
+ DEBUG=pw:api,pw:browser npx playwright test --config=playwright.config.ts --project Firefox --grep @playwright
Running 1 test using 1 worker
[1A[2K
[1A[2K[Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright
[38;5;45;1mpw:api [0m=> browserType.launch started [38;5;45m+0ms[0m
[1A[2K [30;1mpw:browser [0m<launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-7i2bQF -juggler-pipe -silent [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m<launched> pid=345 [30m+5ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] *** You are running in headless mode. [30m+428ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.670878) [GFX1-]: glxtest: libpci missing [30m+243ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.670878) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.670963) [GFX1-]: glxtest: Unable to open a connection to the X server [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.670878) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.670963) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.670981) [GFX1-]: glxtest: libEGL initialize failed [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.670878) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.670963) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.670981) |[3][GFX1-]: No GPUs detected via PCI (t=0.671006) [GFX1-]: No GPUs detected via PCI [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] Unable to revert mtime: /ms-playwright/firefox-1319/firefox/fonts [30m+93ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+224ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+10ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+7ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+3ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+36ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+60s[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:49.932: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+2ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:49.933: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:49.933: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:49.934: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+5ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:49.939: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+1ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+482ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:50.421: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:50.422: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:50.422: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+1ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345][err] (firefox:345): dconf-CRITICAL **: 20:14:50.422: unable to create directory '/.cache/dconf': Permission denied. dconf will not work properly. [30m+0ms[0m
[1A[2K[1/1] [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright
[1A[2K 1) [Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright =====
[31mTimeout of 90000ms exceeded.[39m
[1A[2K [30;1mpw:browser [0m[pid=345] <kill> [30m+29s[0m
[1A[2K [30;1mpw:browser [0m[pid=345] <will force kill> [30m+0ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345] starting temporary directories cleanup [30m+1ms[0m
[1A[2K [30;1mpw:browser [0m[pid=345] finished temporary directories cleanup [30m+7ms[0m
[1A[2K Slow test file: [Firefox] › example.spec.ts (2m)
Consider splitting slow test files to speed up parallel execution
1 failed
[Firefox] › example.spec.ts:13:3 › My tests set › Get started with Playwright @playwright ======
You and I seem to be in the same boat. My hunch is we can't write to the /tmp dir to create the profile. See "-profile /tmp/playwright_firefoxdev_profile-7i2bQF" in your output.
I'm evaluating Playwright for my organisation and thinking of dropping Playwright as an option which is a shame as it's my favourite.
Re-opened! Will attempt to repro again with the /tmp hint. If you use launchPersistentContext (with a local dir), does it work? If so, that's good info!
Locally I was able to switch profile dir using launchPersistentContent but I did see it tried to use /tmp and failed but then created a new profile.
pw:api => browserType.launch started +0ms
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile **/tmp/playwright_firefoxdev_profile-s4JBOc -juggler-pipe** -silent +0ms
pw:browser <launched> pid=14769 +4ms
pw:browser [pid=14769][err] *** You are running in headless mode. +187ms
pw:browser [pid=14769][out] console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError(**"Could not open the file at /tmp/playwright_firefoxdev_profile-s4JBOc/search.json.mozlz4"**, (void 0))) +103ms
pw:api <= browserContext.newPage succeeded +7ms
✓ [firefox] › test-userdatadir.spec.js:3:1 › verify userdatadir (7s)
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless **-profile playwright-tmp** -juggler-pipe about:blank +1s
pw:browser <launched> pid=15149 +5ms
In Jenkins it still failed with the same error as reported. I wonder how significant this error is, "[err] Unable to revert mtime: /ms-playwright/firefox-1319/firefox/fonts"?
Can I hack/modify something here in PW to change the default profile location to test it?
@spursbob @APAODUQS I'm failing to repro the issue on my Jenkins instance. /tmp is writeable and the tests (headful and headless for firefox) all pass:
Here is the full code (Jenkinsfile and test code for the pipeline above): https://github.com/rwoll/jenkins-playground/tree/8ecb7cc77328b5f484483accd421b29909dfe765
Please try running that repo on your Jenkins instance and let us know if it passes or fails (in the same or different way from the issue reported here). If it passes (and is therefore not a repro), then we'll need you to link us to a repro repo from you in order to debug further.
We're using os.tmpdir()
in our Node code when choosing these tmp directories. If that's not writable on yours Jenkins installation, that seems like it would break more than just Playwright. Perhaps the Jenkins agent is not configured properly and there are some overall permissions issues?
Thanks for your patience! Happy Jenkins debugging!
@rwoll Thank you, using this worked:
agent {
docker { image 'mcr.microsoft.com/playwright:v1.20.2-focal' }
}
Using this fails:
agent {
kubernetes {
defaultContainer 'playwright'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
project: web-ui-trial
spec:
containers:
- name: playwright
image: mcr.microsoft.com/playwright:v1.20.2-focal
tty: true
command:
- bash
"""
}
}
Thanks @spursbob! Given this, since it works with the Docker Jenkins plugin, but not the k8s Jenkins Plugin, I suspect it has to do something about the k8s Jenkins Plugin (or its specific configuration), and is not an issue with Playwright itself.
The Jenkins community might be able to help troubleshoot your k8s configuration further.
I executed your project in my local jenkins server and I got:
+ npx playwright screenshot --browser=firefox https://example.com/[](http://localhost:8081/job/jenkins-playwright/job/main/3/console#) ./out.png
added 189 packages, and audited 190 packages in 2m
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
[Pipeline] sh
added 189 packages, and audited 190 packages in 2m
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
added 189 packages, and audited 190 packages in 2m
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
+ npx playwright screenshot --browser=chromium https://example.com/[](http://localhost:8081/job/jenkins-playwright/job/main/3/console#) ./out.png
[Pipeline] sh
[Pipeline] sh
+ xvfb-run -- npx playwright test --project=firefox headful
+ xvfb-run -- npx playwright test --project=chromium headful
xvfb-run: error: Xvfb failed to start
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Chromium Headful
Navigating to https://example.com/
: net::ERR_NAME_NOT_RESOLVED at https://example.com/
=========================== logs ===========================
navigating to "https://example.com/", waiting until "load"
============================================================
at captureRawStack (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/@playwright/test/node_modules/playwright-core/lib/utils/stackTrace.js:64:17) {
name: 'Error'
}
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Chromium
Running 25 tests using 1 worker
command.<anonymous>: Timeout 30000ms exceeded.
=========================== logs ===========================
<launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-NTYWo3 -juggler-pipe -silent
<launched> pid=920
[pid=920][err] *** You are running in headless mode.
[pid=920][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=6.54858) [GFX1-]: glxtest: libpci missing
[pid=920][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=6.54858) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=6.54884) [GFX1-]: glxtest: Unable to open a connection to the X server
[pid=920][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=6.54858) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=6.54884) |[2][GFX1-]: glxtest: libEGL initialize failed (t=6.54887) [GFX1-]: glxtest: libEGL initialize failed
[pid=920][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=6.54858) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=6.54884) |[2][GFX1-]: glxtest: libEGL initialize failed (t=6.54887) |[3][GFX1-]: No GPUs detected via PCI (t=6.54891) [GFX1-]: No GPUs detected via PCI
[pid=920][err] Unable to revert mtime: /ms-playwright/firefox-1319/firefox/fonts
[pid=920][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
[pid=920][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
[pid=920][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
[pid=920][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
[pid=920][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
============================================================
at Command.listener [as _actionHandler] (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:488:17)
at /Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:1227:65
at Command._chainOrCall (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:1144:12)
at Command._parseCommand (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:1227:27)
at Command._dispatchSubcommand (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:1050:25)
at Command._parseCommand (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:1193:19)
at Command.parse (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/commander/lib/command.js:897:10)
at Object.<anonymous> (/Users/duquiang/Documents/Jenkins/workspace/jenkins-playwright_main/node_modules/@playwright/test/cli.js:17:18) {
name: 'TimeoutError'
}
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Firefox
[1A[2K[1/25] [firefox headful] › example.spec.ts:14:3 › New Todo › should allow me to add todo items
[1A[2K 1) [firefox headful] › example.spec.ts:14:3 › New Todo › should allow me to add todo items =======
[31mTimeout of 30000ms exceeded.[39m
[1A[2K[2/25] [firefox headful] › example.spec.ts:37:3 › New Todo › should clear text input field when an item is added
[1A[2K 2) [firefox headful] › example.spec.ts:37:3 › New Todo › should clear text input field when an item is added
[31mTimeout of 30000ms exceeded.[39m
Thanks @APAODUQS! Is that output from a run in a container? If not (and theirs a display), remove the xvfb-run
bit—that's only needed if there isn't a display available already. That looks like a different error from https://github.com/microsoft/playwright/issues/13230#issuecomment-1086195132.
Since there are now several confirmations that it works for some Jenkins Docker configurations and the surface area for configuring Jenkins and its agents is large, folks in the Jenkins community will likely be better able to help you troubleshoot.
Thanks for your patience, and feel free to post back what you find!
As part of triaging, closing per-above.
Hello I have the same error with firefox "Error: Access was denied while trying to open files in your profile directory" when using it with jenkins and I started to test why and it is docker issue not jenkins since I could have the same error with docker. The error is when maintaining the docker volume. Using this example repository uploaded by @rwoll using the command.
docker run -it --ipc=host -w /app -v /home/sebastian/temp/jenkins-playground:/app:rw,z mcr.microsoft.com/playwright:v1.23.3-focal /bin/bash
installing npm install
and npx playwright install
to install the browsers. After using DEBUG=pw:browser npx playwright test --project=firefox
I get the same error. I would like to know if there is a solution or should I just disable firefox on the ci?
Running 25 tests using 1 worker
[firefox] › example.spec.ts:14:3 › New Todo › should allow me to add todo items
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-S66zjg -juggler-pipe -silent +0ms
pw:browser <launched> pid=570 +2ms
pw:browser [pid=570][err] *** You are running in headless mode. +14ms
pw:browser [pid=570][err] Error: Access was denied while trying to open files in your profile directory. +0ms
pw:browser [pid=570][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0358873) [GFX1-]: glxtest: libpci missing +23ms
pw:browser [pid=570][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0358873) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0359173) [GFX1-]: glxtest: Unable to open a connection to the X server +0ms
pw:browser [pid=570][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0358873) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0359173) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0359232) [GFX1-]: glxtest: libEGL initialize failed +0ms
pw:browser [pid=570][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0358873) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0359173) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0359232) |[3][GFX1-]: No GPUs detected via PCI (t=0.0359327) [GFX1-]: No GPUs detected via PCI +0ms
pw:browser [pid=570][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +57ms
pw:browser [pid=570][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +2ms
pw:browser [pid=570][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +0ms
pw:browser [pid=570][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=570][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +4ms
1) [firefox] › example.spec.ts:14:3 › New Todo › should allow me to add todo items ===============
Timeout of 30000ms exceeded.
pw:browser [pid=570] <kill> +30s
pw:browser [pid=570] <will force kill> +0ms
pw:browser [pid=570] starting temporary directories cleanup +0ms
pw:browser [pid=570] finished temporary directories cleanup +2ms
[firefox] › example.spec.ts:37:3 › New Todo › should clear text input field when an item is added
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-QmzsDn -juggler-pipe -silent +0ms
pw:browser <launched> pid=797 +3ms
pw:browser [pid=797][err] *** You are running in headless mode. +13ms
pw:browser [pid=797][err] Error: Access was denied while trying to open files in your profile directory. +1ms
pw:browser [pid=797][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376659) [GFX1-]: glxtest: libpci missing +24ms
pw:browser [pid=797][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376659) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0376956) [GFX1-]: glxtest: Unable to open a connection to the X server +0ms
pw:browser [pid=797][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376659) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0376956) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0377017) [GFX1-]: glxtest: libEGL initialize failed +0ms
pw:browser [pid=797][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376659) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0376956) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0377017) |[3][GFX1-]: No GPUs detected via PCI (t=0.0377104) [GFX1-]: No GPUs detected via PCI +0ms
pw:browser [pid=797][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +57ms
pw:browser [pid=797][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=797][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=797][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=797][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +5ms
2) [firefox] › example.spec.ts:37:3 › New Todo › should clear text input field when an item is added
Timeout of 30000ms exceeded.
pw:browser [pid=797] <kill> +30s
pw:browser [pid=797] <will force kill> +0ms
pw:browser [pid=797] starting temporary directories cleanup +1ms
pw:browser [pid=797] finished temporary directories cleanup +1ms
[firefox] › example.spec.ts:47:3 › New Todo › should append new items to the bottom of the list
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-A6wtbK -juggler-pipe -silent +0ms
pw:browser <launched> pid=1026 +5ms
pw:browser [pid=1026][err] *** You are running in headless mode. +25ms
pw:browser [pid=1026][err] Error: Access was denied while trying to open files in your profile directory. +1ms
pw:browser [pid=1026][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0454196) [GFX1-]: glxtest: libpci missing +19ms
pw:browser [pid=1026][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0454196) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.045448) [GFX1-]: glxtest: Unable to open a connection to the X server +0ms
pw:browser [pid=1026][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0454196) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.045448) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0454543) [GFX1-]: glxtest: libEGL initialize failed +0ms
pw:browser [pid=1026][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0454196) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.045448) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0454543) |[3][GFX1-]: No GPUs detected via PCI (t=0.0454639) [GFX1-]: No GPUs detected via PCI +0ms
pw:browser [pid=1026][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +98ms
pw:browser [pid=1026][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1026][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1026][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1026][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +13ms
3) [firefox] › example.spec.ts:47:3 › New Todo › should append new items to the bottom of the list
Timeout of 30000ms exceeded.
pw:browser [pid=1026] <kill> +30s
pw:browser [pid=1026] <will force kill> +0ms
pw:browser [pid=1026] starting temporary directories cleanup +0ms
pw:browser [pid=1026] finished temporary directories cleanup +2ms
[firefox] › example.spec.ts:61:3 › New Todo › should show #main and #footer when items added
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-ElYN82 -juggler-pipe -silent +0ms
pw:browser <launched> pid=1255 +3ms
pw:browser [pid=1255][err] *** You are running in headless mode. +15ms
pw:browser [pid=1255][err] Error: Access was denied while trying to open files in your profile directory. +0ms
pw:browser [pid=1255][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376365) [GFX1-]: glxtest: libpci missing +24ms
pw:browser [pid=1255][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376365) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0376725) [GFX1-]: glxtest: Unable to open a connection to the X server +0ms
pw:browser [pid=1255][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376365) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0376725) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0376793) [GFX1-]: glxtest: libEGL initialize failed +0ms
pw:browser [pid=1255][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0376365) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0376725) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0376793) |[3][GFX1-]: No GPUs detected via PCI (t=0.0376873) [GFX1-]: No GPUs detected via PCI +0ms
pw:browser [pid=1255][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +78ms
pw:browser [pid=1255][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1255][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1255][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1255][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +14ms
4) [firefox] › example.spec.ts:61:3 › New Todo › should show #main and #footer when items added ==
Timeout of 30000ms exceeded.
pw:browser [pid=1255] <kill> +30s
pw:browser [pid=1255] <will force kill> +0ms
pw:browser [pid=1255] starting temporary directories cleanup +0ms
pw:browser [pid=1255] finished temporary directories cleanup +1ms
[firefox] › example.spec.ts:81:3 › Mark all as completed › should allow me to mark all items as completed
pw:browser <launching> /ms-playwright/firefox-1319/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-9EWIcd -juggler-pipe -silent +0ms
pw:browser <launched> pid=1482 +3ms
pw:browser [pid=1482][err] *** You are running in headless mode. +16ms
pw:browser [pid=1482][err] Error: Access was denied while trying to open files in your profile directory. +0ms
pw:browser [pid=1482][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0413065) [GFX1-]: glxtest: libpci missing +26ms
pw:browser [pid=1482][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0413065) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0413396) [GFX1-]: glxtest: Unable to open a connection to the X server +0ms
pw:browser [pid=1482][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0413065) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0413396) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0413458) [GFX1-]: glxtest: libEGL initialize failed +0ms
pw:browser [pid=1482][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: libpci missing (t=0.0413065) |[1][GFX1-]: glxtest: Unable to open a connection to the X server (t=0.0413396) |[2][GFX1-]: glxtest: libEGL initialize failed (t=0.0413458) |[3][GFX1-]: No GPUs detected via PCI (t=0.0413545) [GFX1-]: No GPUs detected via PCI +0ms
pw:browser [pid=1482][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +58ms
pw:browser [pid=1482][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1482][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1482][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +1ms
pw:browser [pid=1482][err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. +6ms
5) [firefox] › example.spec.ts:81:3 › Mark all as completed › should allow me to mark all items as completed
Timeout of 30000ms exceeded.
Try this:
Thank you, it worked for me to change the user.
Hi, what was the solution again? The link is dead!
Context: Project: https://github.com/APAODUQS/playwright-demo Playwright image: mcr.microsoft.com/playwright:v1.20.1-focal Jenkins Server version: 2.277.4
Describe the problem: I am trying to run the tests from a jenkins build as the documentation indicates: https://playwright.dev/docs/ci#jenkins, but when I try to run it with the previous configuration, with the playwright docker image I get this error:
Then, when I run:
I get the error:
Then I tried to run it with tue command
npx playwright install
:And I get the same first error.
I have tried a lot of things but they still are not working. Could you help me or suggest me how I could run it?