angular / webdriver-manager

A binary manager for E2E testing
MIT License
224 stars 116 forks source link

webdriver-manager update error confusing while running in docker on m1 mac #510

Open ladislavpr opened 2 years ago

ladislavpr commented 2 years ago

Trying to run webdriver-manager update results in following error

[01:39:17] I/config_source - curl -o/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/standalone-response.xml https://selenium-release.storage.googleapis.com/
[01:39:18] E/downloader - options.uri is a required argument
[01:39:18] I/update - chromedriver: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_100.0.4896.60.zip
[01:39:18] I/update - chromedriver: unzipping chromedriver_100.0.4896.60.zip
/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cmds/update.js:232
            throw new Error(`Invalid filename: ${path.resolve(outputDir, fileName)}`);
                  ^

Error: Invalid filename: /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_100.0.4896.60.zip
    at unzip (/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cmds/update.js:232:19)
    at /usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cmds/update.js:205:13

Probably due to the output of os.type() being Linux, but os.arch() being arm64 by default, but the wording of the error doesn't help very much in reaching that conclusion.

(I thought running docker with --platform=linux/amd64 would fix this, it moves past this error, but it leads to an error spawning chromium)