Skip to content

ci: dependencies CI job is sometimes failing #685

Closed
@not-my-profile

Description

The lerna bootstrap command part of the dependencies CI job is currently sometimes failing with the error message:

npm ERR! code 1
npm ERR! path /home/circleci/axe-core-npm/packages/webdriverio/node_modules/chromedriver
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.
npm ERR! Downloading from file:  https://chromedriver.storage.googleapis.com/109.0.5414.74/chromedriver_linux64.zip
npm ERR! Saving to file: /tmp/109.0.5414.74/chromedriver/chromedriver_linux64.zip
npm ERR! Received 1040K...
npm ERR! Received 2080K...
npm ERR! Received 3120K...
npm ERR! Received 4160K...
npm ERR! Received 5200K...
npm ERR! Received 6240K...
npm ERR! Received 7129K total.
npm ERR! Extracting zip contents to /tmp/109.0.5414.74/chromedriver.
npm ERR! ChromeDriver installation failed Error: Error extracting archive: Error: unexpected end of file
npm ERR!     at extractDownload (/home/circleci/axe-core-npm/packages/webdriverio/node_modules/chromedriver/install.js:309:11)
npm ERR!     at async install (/home/circleci/axe-core-npm/packages/webdriverio/node_modules/chromedriver/install.js:71:7)

This appears to be some unreliable CI fluke since the job failed and succeeded once for the exact same commit:

image

I am not sure what exactly is causing this CI failure ... it doesn't happen locally for me. Changing the command to npm run bootstrap -- --ci || (md5sum /tmp/109.0.5414.74/chromedriver/chromedriver_linux64.zip; ls -l /tmp/109.0.5414.74/chromedriver; false) revealed that the zip extraction indeed is successful ... which makes the occurrence of the "Error extracting archive" all the more puzzling.

Inserting a cd packages/webdriverio && npm ci before the lerna bootstrap call fixed the problem, showing that this indeed appears to be a lerna bug. Since lerna bootstrap is deprecated anyway it probably makes sense to switch to NPM workspaces.

I have two PRs that are affected by this:

Metadata

Assignees

No one assigned

    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