playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] browserType.launch: Timeout 30000ms exceeded

Open mohitkhatri88 opened this issue 3 years ago • 7 comments

Context:

  • Playwright Version: [what Playwright version do you use?] 1.24.1
  • Operating System: [e.g. Windows, Linux or Mac] Ubuntu 22.04
  • Node.js version: [e.g. 12.22, 14.6] 16.15.1
  • Browser: [e.g. All, Chromium, Firefox, WebKit] Webkit
  • Extra: [any specific details about your environment] I am running a ubuntu 22 docker image and have playwright and nodejs installed. I am able to launch chrome browser but launching webkit constantly fails.

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:

import { chromium, webkit, firefox, Browser, LaunchOptions, BrowserContext } from 'playwright';

let browserLaunchOptions = {
      headless: false,
      slowMo:  0,
      timeout: 30 * 1000
    };
let browserContext = await webkit.launch(browserLaunchOptions);

Describe the bug My environment: docker image(ubuntu 22.04) running playwright(v1.24.1) and nodejs(16.15.1). I am having trouble running tests against webkit. It fails each time with the following error:

browserType.launch: Timeout 30000ms exceeded.
=========================== logs ===========================
<launching> /home/<username>/.cache/ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=25328
============================================================
browserType.launch: Timeout 30000ms exceeded.
=========================== logs ===========================
<launching> /home/<username>/.cache/ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=25328

Add any other details about the problem here.

mohitkhatri88 avatar Aug 01 '22 19:08 mohitkhatri88

Most likely you don't have the Playwright operating system dependencies installed. We recommend if you use Docker, to use the official image as well, which is tested and guaranteed to work.

mxschmitt avatar Aug 01 '22 20:08 mxschmitt

Let me confirm.

mohitkhatri88 avatar Aug 01 '22 20:08 mohitkhatri88

I am experience a similar issue, but ONLY when running in GitHub Actions. It works fine when running inside Docker Desktop on Windows 10.

https://github.com/jetwiwo/playwright-jammy-webkit-freeze/actions/runs/2779274141 reproduces this issue using the official Docker image. It works fine in the focal image, but not in the jammy image.

Also note that when I reproduce this issue Playwright never times out on its own. If I did not add a timeout on the GitHub Action, it would keep running forever.

jetwiwo avatar Aug 02 '22 02:08 jetwiwo

I confirmed that I have the browser binaries. Differences between my image and official playwright image seem to be:

  1. Node version: I am on 16.15.1 and playwright image is on 16.16.0
  2. $PLAYWRIGHT_BROWSERS_PATH: Was empty in my image and was set to /ms-playwright in playwright image.

mohitkhatri88 avatar Aug 02 '22 16:08 mohitkhatri88

Did you install the dependencies via npx playwright install --with-deps?

@jetwiwo please file a separate issue.

mxschmitt avatar Aug 04 '22 08:08 mxschmitt

Created https://github.com/microsoft/playwright/issues/16279

jetwiwo avatar Aug 05 '22 01:08 jetwiwo

@mohitkhatri88 what is your host operating system? Is it ubuntu 20? If so, then its most likely a duplicate of https://github.com/microsoft/playwright/issues/15764.

mxschmitt avatar Aug 05 '22 07:08 mxschmitt

Closing as part of triage—please re-file if this is still an issue. We recently released an official jammy Docker image. However, for now, it must be run on an Ubuntu Jammy host. Follow https://github.com/microsoft/playwright/issues/15764 for updates.

rwoll avatar Aug 11 '22 20:08 rwoll