question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install appium is - Failed at the appium-chromedriver@4.21.0 postinstall script.

See original GitHub issue

The 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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
KazuCocoacommented, May 24, 2020

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.

[10:34:58] Downloading Chromedriver can be skipped by using the '--chromedriver-skip-install' flag or setting the 'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.

https://github.com/appium/appium/issues/14368 could install appium with the flag.

1reaction
KazuCocoacommented, May 24, 2020

This case was timeout as the below. (In the case also skip the downloading by --chromedriver-skip-install flag.

[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

So, it is appreciated if you could detect your cause was not such download timeout or node’s write permission stuff

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed at the appium-chromedriver@4.0.0 install script
sudo npm install -g appium --unsafe-perm=true. You will not be able to use appium in the same terminal, you will encounter an error...
Read more >
Npm ERR! Failed at the appium-chromedriver@2.9.2 install ...
I installed Appium 1.6.0 on MacOS 10.12 in the morning with via 'sudo npm install -g appium' but it gave me an error...
Read more >
appium-chromedriver - npm
Keywords · Install · Repository · Homepage · Weekly Downloads · Version · License · Unpacked Size · Total Files.
Read more >
Error while installing appium in macbook via terminal
Failed at the appium-chromedriver@4.27.3 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found