Skip to content

[BUG] Yarn install (yarn 2) does not install chromium from time to time. #5136

@DJ-Glock

Description

@DJ-Glock

Context:

  • Playwright Version: 1.6.+
  • Operating System: Windows 10
  • Node.js version: v12.18.3
  • Browser: Chromium (did not check others)
  • Extra: yarn 2.4.0

We use yarn2 in our project, package.json can be found below. The issue is:
After installing new version of playwright (using yarn upgrade-interactive) or after cloning repo if crhomium was not installed before, when running yarn install, it does not install chromium to the ms-playwright folder. So I get an error:

browserType.launch: Failed to launch chromium because executable doesn't exist at C:\Users\DKurashko\AppData\Local\ms-playwright\chromium-844399\chrome-win\chrome.exe
Try re-installing playwright with "npm install playwright"
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

If I run yarn add playwright-chromium - it does not install chromium. In the same time npm install playwright-chromium helps, but it requires us to remove a lock file after installing because we do not use NPM.
image

This issue happens to my team mates regularly and pretty annoying.

package.json example:

{
  "name": "e2e",
  "version": "4.4.0",
  "private": true,
  "scripts": {
    "test:parallel": "mocha --reporter mocha-teamcity-reporter --timeout 90000 -r ts-node/register/transpile-only --require src/Generic/mochaHooks.ts src/Tests/**/*.e2e.ts src/Tests/**/*.ui.ts --parallel --jobs 4 --grep '#build'"
   },
  "devDependencies": {
    "@types/btoa": "^1.2.3",
    "@types/chai": "^4.2.14",
    "@types/chai-as-promised": "^7.1.3",
    "@types/dotenv": "^8.2.0",
    "@types/extract-zip": "^1.6.2",
    "@types/mocha": "^8.2.0",
    "@types/node-fetch": "^2.5.8",
    "@types/pixelmatch": "^5.2.2",
    "@types/pngjs": "^3.4.2",
    "@types/uuid": "^8.3.0",
    "@types/yargs": "^15.0.12",
    "allure-commandline": "^2.13.8",
    "btoa": "^1.2.1",
    "chai": "^4.2.0",
    "chai-as-promised": "^7.1.1",
    "csv-parser": "^3.0.0",
    "dotenv": "^8.2.0",
    "eslint": "^7.18.0",
    "eslint-plugin-no-null": "^1.0.2",
    "extract-zip": "^2.0.1",
    "lighthouse": "^7.0.0",
    "mocha": "^8.2.1",
    "mocha-allure-reporter": "^1.4.0",
    "mocha-teamcity-reporter": "^3.0.0",
    "node-fetch": "^2.6.1",
    "pixelmatch": "^5.2.1",
    "playwright-chromium": "^1.8.0",
    "pngjs": "^6.0.0",
    "prettier": "^2.2.1",
    "prettier-eslint": "^12.0.0",
    "ts-node": "^9.1.1",
    "tslib": "^2.1.0",
    "typescript": "^4.1.3",
    "uuid": "^8.3.2",
    "yargs": "^16.2.0"
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions