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] PLAYWRIGHT_BROWSERS_PATH throws error on subsequent installs #1651

Closed
aesyondu opened this issue Apr 3, 2020 · 0 comments · Fixed by #1662
Closed

[BUG] PLAYWRIGHT_BROWSERS_PATH throws error on subsequent installs #1651

aesyondu opened this issue Apr 3, 2020 · 0 comments · Fixed by #1662
Assignees

Comments

@aesyondu
Copy link
Contributor

aesyondu commented Apr 3, 2020

Context:

Code Snippet

$ npm install -D playwright@latest
### NOTE: latest resolves to 0.12.1
# in .bash_profile
# export PLAYWRIGHT_BROWSERS_PATH="$HOME/playwright-browsers"

### stdout & stderr:
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

> [email protected] install /Users/aes/sandbox/playwright-element-click/node_modules/playwright
> node install.js

(node:25564) UnhandledPromiseRejectionWarning: Error: ERROR: downloadPath folder already exists!
    at Object.downloadBrowser (/Users/aes/sandbox/playwright-element-click/node_modules/playwright-core/lib/server/browserFetcher.js:110:15)
    at async downloadBrowserWithProgressBar (/Users/aes/sandbox/playwright-element-click/node_modules/playwright-core/download-browser.js:65:3)
    at async /Users/aes/sandbox/playwright-element-click/node_modules/playwright/install.js:21:3
(node:25564) 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 terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25564) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 46 packages from 36 contributors and audited 53 packages in 3.911s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Describe the bug

PLAYWRIGHT_BROWSERS_PATH works great, but it throws an error on subsequent installs.

Relevant code here:

throw new Error('ERROR: downloadPath folder already exists!');

EDIT:
Expect not to throw when downloadPath already exists.

@pavelfeldman pavelfeldman added the v1 label Apr 3, 2020
aslushnikov added a commit to aslushnikov/playwright that referenced this issue Apr 4, 2020
Drive-by: introduce installation tests that use `npm pack`
to simulate installation from NPM registry.

Fixes microsoft#1651
aslushnikov added a commit that referenced this issue Apr 4, 2020
Drive-by: introduce installation tests that use `npm pack`
to simulate installation from NPM registry.

Fixes #1651
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

Successfully merging a pull request may close this issue.

3 participants