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.

Appium 2.0 Beta - Cannot install uiauatomator2 behind corporate proxy

See original GitHub issue

Appium version used: 2.0.0-beta.19

I’ve setup the corporate proxy using: npm config set proxy <my_company_proxy> npm config set https-proxy <my_company_proxy>

After proxy setup npm seem to be working fine as I can install various packages including appium (npm install -g appium@next)

xcuitest@3.56.3 installs fine relaxed-caps@1.0.2 installs fine images@1.2.3 installs fine

The problem is with uiautomator2, it returns this error: Error: Encountered an error when installing package: Command 'npm install --no-save --no-package-lock appium-uiautomator2-driver -json' exited with code 1

what’s the --local or --github alternative? I have the appium-uiautomator2-driver-1.73.0.tar locally.


Not sure if this info is relevant or not but I’ve tried to debug it by running: sudo npm install -g --no-save --no-package-lock appium-uiautomator2-driver -json and there’s an error in there related to --chromedriver-skip-install

npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/appium-chromedriver
npm ERR! command failed
npm ERR! command sh -c node install-npm.js
npm ERR! [15:28:35] Error installing Chromedriver: timeout of 15000ms exceeded
npm ERR! [15:28:35] Error: timeout of 15000ms exceeded
npm ERR!     at createError (/usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/axios/lib/core/createError.js:16:15)
npm ERR!     at RedirectableRequest.handleRequestTimeout (/usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/axios/lib/adapters/http.js:328:16)
npm ERR!     at RedirectableRequest.emit (events.js:400:28)
npm ERR!     at Timeout.<anonymous> (/usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/follow-redirects/index.js:164:12)
npm ERR!     at listOnTimeout (internal/timers.js:557:17)
npm ERR!     at processTimers (internal/timers.js:500:7)
npm ERR! [15:28:35] Downloading Chromedriver can be skipped by using the '--chromedriver-skip-install' flag or setting the 'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
{
  "error": {
    "code": 1,
    "summary": "command failed",
    "detail": "sh -c node install-npm.js\n[15:28:35] Error installing Chromedriver: timeout of 15000ms exceeded\n[15:28:35] Error: timeout of 15000ms exceeded\n    at createError (/usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/axios/lib/core/createError.js:16:15)\n    at RedirectableRequest.handleRequestTimeout (/usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/axios/lib/adapters/http.js:328:16)\n    at RedirectableRequest.emit (events.js:400:28)\n    at Timeout.<anonymous> (/usr/local/lib/node_modules/appium-uiautomator2-driver/node_modules/follow-redirects/index.js:164:12)\n    at listOnTimeout (internal/timers.js:557:17)\n    at processTimers (internal/timers.js:500:7)\n[15:28:35] Downloading Chromedriver can be skipped by using the '--chromedriver-skip-install' flag or setting the 'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable."
  }
}

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tester/.npm/_logs/2021-11-23T15_28_37_024Z-debug.log

Then I ran: sudo npm install -g --no-save --no-package-lock appium-uiautomator2-driver -json --chromedriver-skip-install and the error was not returned anymore, seems like the driver was installed but appium doesn’t see it when runningappium driver list

Thank You!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jlippscommented, Nov 30, 2021

Cool. Sounds like the long term resolution would be to get your IT department to support the URLs involved in downloading chromedriver from the chromium website.

1reaction
jlippscommented, Nov 23, 2021

the problem is you’ll have the same issue no matter where you install it from, because downloading chromedriver happens as an install hook for the uiautomator2 driver, whether the latter is being installed locally or from NPM. but you could try it anyway:

appium driver install --source=local /path/to/driver/checkout

note that this isn’t for a tarball. it should be the driver code directory.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing 'appium-uiautomator2-driver' after 2.0.0-beta.46 ...
The problem I was on appium version:2.0.0-beta.45 with appium-uiautomator2-driver . After I updated appium to .46 and re-installed ...
Read more >
Appium driver install uiautomator2 can't install - Support
Hi. When I try to install uiautomator2 on Mac I have this error appium driver install uiautomator2 info Appium Setting NODE_PATH to ...
Read more >
Error installing uiautomator2 driver with Appium - Stack Overflow
Seems to be a problem with appium@2.0.0-beta.41. Workaround was to install npm v6: $ npm -g install npm@6. after that I could install...
Read more >
appium/appium - Gitter
Hm actually driver.pause() doesn't seem to be needed at all. ... If anyone's curious I'm using npm i -g appium@beta and ... there...
Read more >
@appium/test-support | Yarn - Package Manager
A collection of test utility lib used across Appium packages. Build Status. Install. npm install @appium/test-support --save-dev ...
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