Appium 2.0 Beta - Cannot install uiauatomator2 behind corporate proxy
See original GitHub issueAppium 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:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
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.
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:
note that this isn’t for a tarball. it should be the driver code directory.