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] - Error: Failed to download chromium ETIMEDOUT, cannot install #5442

Closed
thebib opened this issue Feb 12, 2021 · 9 comments
Closed

[BUG] - Error: Failed to download chromium ETIMEDOUT, cannot install #5442

thebib opened this issue Feb 12, 2021 · 9 comments
Assignees

Comments

@thebib
Copy link

thebib commented Feb 12, 2021

Context:

  • Playwright Version: 1.8.0
  • Operating System: Linux
  • Node.js version: 14
  • Browser: Chromium
  • CI Platform: Azure DevOps
  • Location: UK

Apologies, this is unrelated to the Playwright codebase but wouldn't know where to go otherwise,
I'm running an NPM install to grab Chromium from within a bionic:playwright container using Azure DevOps and it's returning a timeout when trying to download the executable.

Error: Failed to download chromium, caused by deasync@0.1.20 install /__w/1/s/investor-zone/node_modules/deasync Error: connect ETIMEDOUT 13.107.246.13:443

Browsing to the URL yields:
<h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>08oImYAAAAABLHLg5vDiFR72GN1/9tBvdTUFOMzBFREdFMDcyMQBFZGdl

@evanjmg
Copy link

evanjmg commented Feb 12, 2021

this is a critical issue affecting all versions - blocking all installs - affects 1.5.1 as well

@thebib thebib changed the title [BUG] - Playwright Docker Container - Error: Failed to download chromium ETIMEDOUT [BUG] - Playwright - Error: Failed to download chromium ETIMEDOUT, cannot install Feb 12, 2021
@thebib thebib changed the title [BUG] - Playwright - Error: Failed to download chromium ETIMEDOUT, cannot install [BUG] - Error: Failed to download chromium ETIMEDOUT, cannot install Feb 12, 2021
@thebib
Copy link
Author

thebib commented Feb 15, 2021

As a workaround to getting our CI working again I've resorted to using the PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD environment variable to skip download, downloading chromium directly from npm and then pointing to that using the executablePath option when Chromium is launched.

@aslushnikov
Copy link
Collaborator

@thebib @evanjmg so Playwright just doesn't install for you at all? Is it the same both locally and from Ci? How do I reproduce this?

Browsing to the URL yields:

Which URL did you try?

@thebib
Copy link
Author

thebib commented Feb 16, 2021

So this only seems to be occurring in an Azure Pipeline, Locally it's fine.

The URL the pipeline would be trying to download from would be:
https://playwright.azureedge.net/builds/chromium/844399/chromium-linux.zip

This works fine locally. Browsing to the IP Address directly is what returns that message.
However doing a nslookup on 'https://playwright.azureedge.net' with the IP you get back also comes back with the same error page.

image

I'm now thinking because of that this might be an networking issue out of Azure DevOps. I'm investigating this now. I will update this when I've run some tests on the build agents.

@aslushnikov
Copy link
Collaborator

This seems to be an internal Azure Pipeline issue, so I'll close this. Feel free to re-submit if there are indeed problems on our side.

@sharlwong
Copy link

sharlwong commented Mar 27, 2021

@thebib Hello I encountered an issue that sounds similar to yours. This is my code:

import { ChromiumBrowser, BrowserContext, Page, chromium } from 'playwright-core';
const chromiumOnly = require('chromium');

let browser: ChromiumBrowser;
let context: BrowserContext;
let page: Page;

describe('e2e testing', () => {
  beforeAll(async () => {
    browser = await chromium.launch({
      headless: true,
      executablePath: chromiumOnly.path,
    });
 ...
}

FYI I'm using playwright with jest, hence you see jest syntax. Locally the test works fine. But when I run it in my Jenkins CI, I get an error on the browser = await chromium.launch({ line:

browserType.launch: Failed to launch browser: Error: spawn /home/jenkins/agent/workspace/dev/web-app/node_modules/chromium/lib/chromium/chrome-linux/chrome ENOENT

Based on what you said:

downloading chromium directly from npm

I used npm install node-chromium too

then pointing to that using the executablePath option when Chromium is launched.

I used the .path method to get the executablePath. Locally, my path is this: /Users/sw/web-app/node_modules/chromium/lib/chromium/chrome-mac/Chromium.app/Contents/MacOS/Chromium

I'm using Mac to develop locally, while the Jenkins agent is running on linux. Wonder what you did for your workaround to get your CI working. I still can't get my own CI to work. Appreciate any advice as I'm new to this. I'm also not using Docker. Thanks!

@jonathanpmartins
Copy link

jonathanpmartins commented Jun 16, 2021

Same problem here trying to install the latest version (1.12.2) with NPM. yarn add playwright doesn't work as well!

This is bad for new users, they will try to install playwright following the docs npm i -D playwright, and it will not work.

The error that I encounter was the following:

npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! (node:22337) UnhandledPromiseRejectionWarning: Error: Failed to download chromium, caused by
npm ERR! Error: connect ETIMEDOUT 13.107.246.33:443
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)

Is this out of service since February?

@mxschmitt
Copy link
Member

@jonathanpmartins it is our CDN where the browser builds get served from. Does https://playwright.azureedge.net/ work for you (404 is fine)?

Its probably blocked by e.g. your cooperate firewall or your internal network does block it. The service is up and working for all the other users.

@jonathanpmartins
Copy link

Strange, because I'm working from home. This should not happen!

If I try to access this URL https://playwright.azureedge.net/ I get the following:

<Error>
    <Code>InvalidQueryParameterValue</Code>
    <Message>Value for one of the query parameters specified in the request URI is invalid. RequestId:bee86ed6-501e-00c2-0302-637cec000000 Time:2021-06-16T22:54:18.7136694Z</Message>
    <QueryParameterName>comp</QueryParameterName>
    <QueryParameterValue/>
<Reason/>
</Error>

Trying to download https://playwright.azureedge.net/builds/chromium/844399/chromium-linux.zip is fine too.

I did follow the tips from @thebib and @sharlwong and could make it work fine! Thanks

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

6 participants