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 Timeout in docker image

See original GitHub issue

Context:

  • Playwright Version: [1.22.2]
  • Operating System: [Linux]
  • Node.js version: [14.2]
  • Browser: [Firefox]
  • Extra: []

Code Snippet DOCKER FILE :

FROM mcr.microsoft.com/playwright:v1.22.0-focal
WORKDIR /client
COPY . /client/
EXPOSE 3000 1880
RUN ["chmod", "+x", "/client/entrypoint.sh"]
ENTRYPOINT [ "./entrypoint.sh" ]

Describe the bug I’m trying to run my playwright test in my docker image. Everything works fine in local. But when I run the test in the docker image firefox always timeout. I tried some other playwright images and noticed that for example playwright:v1.15.0-focal and playwright:v1.10.0-focal work perfectly fine. Running the tests in the bitbucket CI also works perfectly. I also tried playwright install --with-deps but the same issues persist. I’m not sure if what I’m doing is valid or the problem is with the dependencies installation?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
morepecommented, Jul 12, 2022

I got the same issue. with playwright 1.23.2 on WSL2 Ubuntu image

My steps to reproduce:

mkdir visual-comparison
cd visual-comparison

npm init playwright@latest

Now I created a directory visual-comparison/ci containing a docker-compose file where I reference the project as volume:

version: '3'
services:
  tests:
    image: mcr.microsoft.com/playwright:v1.23.2-focal
    ipc: host
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    working_dir: /visual-comparison
    cap_add:
      - SYS_ADMIN
    command:
      - /bin/sh
      - -c
      - |
        npm install
        npx playwright test
    volumes:
      - ..:/visual-comparison

When doing a docker-compose -f ci/docker-compose.yaml run tests I got the same timeout error. However, when I add a Dockerfile containing just these lines:

FROM mcr.microsoft.com/playwright:v1.23.2-focal
ADD visual-comparison visual-comparison

and change the docker-compose to use my image where the folder is already part of the build instead of mounted as volume it works:

version: '3'
services:
  tests:
    build:
      dockerfile: visual-comparison/ci/Dockerfile
      context: ../../
    ipc: host
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    working_dir: /visual-comparison
    cap_add:
      - SYS_ADMIN
    command:
      - /bin/sh
      - -c
      - |
        npm install
        npx playwright test

I don’t know the difference, I would bet on some permission issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1619825 - ubuntu1804 - puppeteer times out - Bugzilla@Mozilla
RESOLVED DUPLICATE of bug 1623128 ... When the puppeteer tests are run on ubuntu1804-test docker image, the resulting tests time out all the...
Read more >
Firefox headless not working within Docker as non-root user
As the title says, I'm having trouble running Firefox in headless mode inside a Docker container as a non-root user.
Read more >
Azure Cloud Shell troubleshooting | Microsoft Learn
Resolution: Open FireFox and navigate to "about:config" in the URL box. Search for "network.websocket.timeout.ping.request" and change the value ...
Read more >
How to Fix the ERR_CONNECTION_TIMED_OUT Error - Kinsta
In Mozilla Firefox the error will show as “The connection has timed out. ... site running using a tool like DevKinsta, Vagrant, or...
Read more >
Troubleshooting - IBM
Command docker push fails with gateway timeout error. When using OpenShift Container Platform on a cloud with Kubernetes service and an internal Docker ......
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