npm install appium is - Failed at the appium-chromedriver@4.21.0 postinstall script.
See original GitHub issueThe problem
Failed at the appium-chromedriver@4.21.0 postinstall script. executed command: npm install appium Also tried: npm install -g appium --unsafe-perm=true --allow-root
Environment
v1.17.1
- Appium version (or git revision) that exhibits the issue:
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium:
- Node.js version (unless using Appium.app|exe):
- Npm or Yarn package manager:
- Mobile platform/version under test:
- Real device or emulator/simulator:
- Appium CLI or Appium.app|exe:
Details
Getting issue:
appium-chromedriver@4.21.0 postinstall C:\Users\SG0226069\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver node install-npm.js
[10:34:36] [Chromedriver Install] Installing Chromedriver version ‘80.0.3987.106’ for platform ‘win’ and architecture ‘32’ [10:34:36] [Chromedriver Install] Opening temp file to write ‘chromedriver_win32’ to… [10:34:36] [Chromedriver Install] Opened temp file ‘C:\Users\SG0226~1\AppData\Local\Temp\1\202045-20788-7bj1ku.8scmf\chromedriver_win32.zip’ [10:34:36] [Chromedriver Install] Downloading https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_win32.zip… [10:34:58] Error installing Chromedriver: Error: connect ETIMEDOUT 172.217.164.144:443 [10:34:58] RequestError: Error: connect ETIMEDOUT 172.217.164.144:443 at new RequestError (C:\Users\SG0226069\AppData\Roaming\npm\node_modules\appium\node_modules\request-promise-core\lib\errors.js:14:15) at Request.plumbing.callback (C:\Users\SG0226069\AppData\Roaming\npm\node_modules\appium\node_modules\request-promise-core\lib\plumbing.js:87:29) at Request.RP$callback [as _callback] (C:\Users\SG0226069\AppData\Roaming\npm\node_modules\appium\node_modules\request-promise-core\lib\plumbing.js:46:31) at self.callback (C:\Users\SG0226069\AppData\Roaming\npm\node_modules\appium\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.onRequestError (C:\Users\SG0226069\AppData\Roaming\npm\node_modules\appium\node_modules\request\request.js:877:8) at ClientRequest.emit (events.js:189:13) at TLSSocket.socketErrorListener (_http_client.js:392:9) at TLSSocket.emit (events.js:189:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19) [10:34:58] Downloading Chromedriver can be skipped by using the ‘–chromedriver-skip-install’ flag or setting the ‘APPIUM_SKIP_CHROMEDRIVER_INSTALL’ environment variable. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.x (node_modules\appium\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@4.21.0 postinstall: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@4.21.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\SG0226069\AppData\Roaming\npm-cache_logs\2020-05-05T05_05_24_474Z-debug.log If necessary, describe the problem you have been experiencing in more detail.
Link to Appium logs
Create a GIST which is a paste of your full Appium logs, and link them here. Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it’s easier t
o reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the sample-code
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
The root cause looks a write permission in npm on Windows. https://stackoverflow.com/questions/28763958/nodejs-unsafe-perm-not-working-on-package-json
Appium provides a flag to avoid such write permission issue as the error message.
https://github.com/appium/appium/issues/14368 could install appium with the flag.
This case was timeout as the below. (In the case also skip the downloading by
--chromedriver-skip-install
flag.So, it is appreciated if you could detect your cause was not such download timeout or node’s write permission stuff