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]install python -m playwright install on windows7 Python3.8.7, got this error message:(node:5848) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 13.107.24 6.13:443 #4996

Closed
langxmchip opened this issue Jan 13, 2021 · 8 comments

Comments

@langxmchip
Copy link

trying to install python -m playwright install on windows7 Python3.8.7, got this error message:
C:\Users\10034852>python -m playwright install
(node:5848) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 13.107.24
6.13:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
(node:5848) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag --unhandle d-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 1)
(node:5848) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.

@yury-s
Copy link
Member

yury-s commented Jan 13, 2021

The installer downloads browsers from urls like https://playwright.azureedge.net/builds/webkit/1420/webkit-win64.zip can you check that your network firewall doesn't block such urls?

@langxmchip
Copy link
Author

langxmchip commented Jan 14, 2021

The installer downloads browsers from urls like https://playwright.azureedge.net/builds/webkit/1420/webkit-win64.zip can you check that your network firewall doesn't block such urls?

I can download webkit-win64.zip using your urls. So network firewall should not block such urls.

@yury-s
Copy link
Member

yury-s commented Jan 14, 2021

13.107.246.13 is a Microsoft Azure ip and it looks like playwright is having hard time connecting to it. Can you run the command with DEBUG=pw:* and attach the logs here?

@langxmchip
Copy link
Author

13.107.246.13 is a Microsoft Azure ip and it looks like playwright is having hard time connecting to it. Can you run the command with DEBUG=pw:* and attach the logs here?

C:\Users\10034852>set DEBUG=pw*

C:\Users\10034852>python -m playwright install
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'BrowserType',
pw:channel:event initializer: {
pw:channel:event executablePath: 'C:\snapshot\playwright-cli\node_mod
ules\playwright\.local-browsers\chromium-833159\chrome-win\chrome.exe',
pw:channel:event name: 'chromium'
pw:channel:event },
pw:channel:event guid: 'BrowserType@c782b929b35ec537706bd9677e2e5b61'
pw:channel:event }
pw:channel:event } +0ms
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'BrowserType',
pw:channel:event initializer: {
pw:channel:event executablePath: 'C:\snapshot\playwright-cli\node_mod
ules\playwright\.local-browsers\firefox-1221\firefox\firefox.exe',
pw:channel:event name: 'firefox'
pw:channel:event },
pw:channel:event guid: 'BrowserType@7253eba22a15d1109c65accb472aa4e1'
pw:channel:event }
pw:channel:event } +42ms
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'BrowserType',
pw:channel:event initializer: {
pw:channel:event executablePath: 'C:\snapshot\playwright-cli\node_mod
ules\playwright\.local-browsers\webkit-1402\Playwright.exe',
pw:channel:event name: 'webkit'
pw:channel:event },
pw:channel:event guid: 'BrowserType@80289d21934ab6bd049294c456bd3ed6'
pw:channel:event }
pw:channel:event } +32ms
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'Android',
pw:channel:event initializer: {},
pw:channel:event guid: 'Android@e6855a2b159a3f939aeed718814ac951'
pw:channel:event }
pw:channel:event } +27ms
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'Electron',
pw:channel:event initializer: {},
pw:channel:event guid: 'Electron@e475296a7eae7ccdca696b44eff8bca2'
pw:channel:event }
pw:channel:event } +19ms
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'Selectors',
pw:channel:event initializer: {},
pw:channel:event guid: 'Selectors@01d37fa89d8b0f7ba8cce567eaaf953c'
pw:channel:event }
pw:channel:event } +19ms
pw:channel:event {
pw:channel:event guid: '',
pw:channel:event method: 'create',
pw:channel:event params: {
pw:channel:event type: 'Playwright',
pw:channel:event initializer: {
pw:channel:event chromium: [Object],
pw:channel:event firefox: [Object],
pw:channel:event webkit: [Object],
pw:channel:event android: [Object],
pw:channel:event electron: [Object],
pw:channel:event deviceDescriptors: [Array],
pw:channel:event selectors: [Object]
pw:channel:event },
pw:channel:event guid: 'Playwright'
pw:channel:event }
pw:channel:event } +19ms
(node:5344) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN playw
right.azureedge.net
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
(node:5344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To termina
te the node process on unhandled promise rejection, use the CLI flag --unhandle d-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 1)
(node:5344) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.

@pavelfeldman
Copy link
Member

Yeah, looks like azure playwright.azureedge.net is not accessible from where you are :/

@aslushnikov
Copy link
Collaborator

Closing since I don't think this is actionable on our side.

@DJ-Glock
Copy link

Hey guys.
I know the issue is closed, but probably it will help someone.

We faced similar issue. And the root cause was in proxy that was not set in environment variables.
We have a corporate proxy that is set on system level, also it was set in yarn-config. But it looks like PW uses envrionment variables HTTP_PROXY and HTTPS_PROXY to download browser.

So once proxy variables were set - everything became fine.
image

@jonathanpmartins
Copy link

jonathanpmartins commented Nov 2, 2021

Yeah, looks like azure playwright.azureedge.net is not accessible from where you are :/

I'm having this issue now and only a VPN connection solved the problem. So, to install a NPM package I need a VPN? What is going on?

Take a look: #5442.

npm info run playwright@1.14.1 install node_modules/playwright node install.js
npm info run playwright@1.14.1 install { code: 1, signal: null }
npm timing reify:rollback:createSparse Completed in 734ms
npm timing reify:rollback:retireShallow Completed in 0ms
npm timing command:install Completed in 397943ms
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
npm verb stack     at ChildProcess.emit (node:events:390:28)
npm verb stack     at maybeClose (node:internal/child_process:1064:16)
npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm verb pkgid playwright@1.14.1
npm verb cwd /var/www/project
npm verb Linux 5.4.0-89-generic
npm verb argv "/usr/bin/node" "/usr/local/bin/npm" "install" "--verbose"
npm verb node v16.13.0
npm verb npm  v7.17.0
npm ERR! code 1
npm ERR! path /var/www/project/node_modules/playwright
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! /var/www/project/node_modules/playwright/lib/utils/registry.js:551
npm ERR!       throw new Error(`Failed to download ${title}, caused by\n${e.stack}`);
npm ERR!             ^
npm ERR! 
npm ERR! Error: Failed to download chromium v907428, caused by
npm ERR! Error: connect ETIMEDOUT 13.107.246.33:443
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
npm ERR!     at /var/www/project/node_modules/playwright/lib/utils/registry.js:551:13
npm ERR!     at async Registry._downloadExecutable (/var/www/project/node_modules/playwright/lib/utils/registry.js:550:5)
npm ERR!     at async Registry.install (/var/www/project/node_modules/playwright/lib/utils/registry.js:537:34)
npm ERR!     at async installDefaultBrowsersForNpmInstall (/var/www/project/node_modules/playwright/lib/utils/registry.js:663:3)
npm verb exit 1
npm timing npm Completed in 398162ms
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jonathan/.npm/_logs/2021-11-02T17_14_15_729Z-debug.log

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