Cannot install appium on Android, Ubuntu stack

appium
script
#1

Cannot install appium on Android, Ubuntu stack.

Description of the issue

Install appium with npm has errors.

+ npm install -g appium
/usr/bin/appium -> /usr/lib/node_modules/appium/build/lib/main.js
> appium-chromedriver@3.0.1 install /usr/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js
(node:658) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/201795-658-f7xl6k.ye8gd'
(node:658) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info Chromedriver Install Installing Chromedriver version '2.30' for platform 'linux' and architecture '64'
info Chromedriver Install Opening temp file to write chromedriver_linux64 to...
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/201795-658-yzkh96.6u41d'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/appium/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@3.0.1 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the appium-chromedriver@3.0.1 install 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!     /root/.npm/_logs/2017-10-05T08_26_27_644Z-debug.log

Environment:

Where did the issue happen?

Stack: Android & Docker Ubuntu 16.04

Which build Step causes the issue and which version of the step?

Script

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : NO
  • If it’s an issue which happens sporadically, what’s the frequency? (e.g. Once a day ; about x% of the builds) : Always
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : From beginning

Build log

https://www.bitrise.io/build/253fc9081013d3c3

0 Likes

Cannot execute Appium tests on Bitrise. Invalid Server Instance there are no installed Nodes
#2

Hey @han.tran

Could you please try local debugging? Here is a Discuss How-to for this.

0 Likes

#3

Hi @gergelybekesi,

I did debug on with docker at my local, same errors.

0 Likes

#4

What I can try at local now is:

  • Pull docker and run
  • Remove nodejs by apt-get
  • Create new user and use that user to install linuxbrew
  • Install Node again
  • Install Appium

=> BUT all on the new user role, not a solution!
=> There are some problems with pre-installed node on the image.

0 Likes

#5

Looks like it’s a bug of npm . https://github.com/appium/appium/issues/7525#issuecomment-266800539

I did switch back to older version of npm and able to install appium on android-docker.

npm uninstall -g appium
npm install -g npm@4.0.5
npm install -g appium
1 Like

Appium tests / setup
Appium tests / setup