question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] - Firefox with Jenkins inside Docker does not work

See original GitHub issue

Context: Project: https://github.com/APAODUQS/playwright-demo Playwright image: mcr.microsoft.com/playwright:v1.20.1-focal Jenkins Server version: 2.277.4

#Jenkinsfile
pipeline {
   agent { docker { image 'mcr.microsoft.com/playwright:v1.20.1-focal' } }
   stages {
      stage('e2e-tests') {
         steps {
            sh 'npm install'
            sh 'npm run test -- --project Chrome --grep @playwright'
         }
      }
   }
}

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: Screen Shot 2022-03-31 at 5 31 52 PM

Then, when I run:

        sh '''
            npm install
            npx playwright install chrome
            npm run test -- --project Chrome --grep @playwright
        '''

I get the error: Screen Shot 2022-03-31 at 5 36 54 PM

Then I tried to run it with tue command npx playwright install:

        sh '''
            npm install
            npx playwright install
            npm run test -- --project Chrome --grep @playwright
        '''

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?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
rwollcommented, Apr 6, 2022

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[JENKINS-58657] sh not working inside docker container
In my scenario, there are two containers on a kubernetes pod, one is the jnlp-slave. The directory /home/jenkins/agent/workspace/<jobname>@tmp/ ...
Read more >
Run TestCafe in Firefox browser using docker container via ...
I want to run the TestCafe in firefox browser(not headless) through Jenkins. I'm using docker container which has chromium and firefox ...
Read more >
linuxserver/firefox - Docker Image
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic....
Read more >
How to run firefox inside docker container | Edureka Community
I have one docker container in my centos base system. But I am not able to run firefox from my container. How can...
Read more >
PKIX path building failed error message
Jenkins with HTTPS causes PKIX error message. Elasticsearch task that is running in a docker fails with the following error: "PKIX path building...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found