Appium: Appium 1.5.3 fails to push .apk on Android Emulator API 17

Created on 5 Jul 2016  路  3Comments  路  Source: appium/appium

The problem

Appium 1.5.3 fails to push .apk on Android Emulator API 17.

Environment

  • Appium version - (or git revision) that exhibits the issue: 1.5.3
  • Last Appium version that did not exhibit the issue (if applicable): 1.3.1
  • Desktop OS/version used to run Appium: OS X 10.11.5
  • Node.js version (unless using Appium.app|exe): 6.2.2
  • Mobile platform/version under test: Android 4.2
  • Real device or emulator/simulator: Default Android SDK HAXM emulator
  • Appium CLI or Appium.app|exe: -

    Details

[MJSONWP] Encountered internal error running command: Error: Error executing adbExec. Original error: Command '/Users/vchimev/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 push /Users/vchimev/Work/git/functional-tests-new/testapp/CutenessIO-release.apk /data/local/tmp/7c0f27e2e31b49fcc7204e02714e80ad.apk' timed out after 90000ms{"stdout":"","stderr":"","code":null}

Link to Appium logs

https://gist.github.com/vchimev/a931591c7b38f1049cfe326e74c1b651

Most helpful comment

It seems like it takes a lot of time for ADB tool to install your application. The default timeout for this in Appium is hardcoded and equals to 90000 milliseconds.
You can manually set this constant to a greater value by editing this file (this is the place where _npm_ installs Appium in Mac OS if you provide _-g_ option):
/usr/local/lib/node_modules/appium-android-driver/build/lib/android-helpers.js

Change the value of

var REMOTE_INSTALL_TIMEOUT = 90000; // milliseconds

constant to _90000 * 2_ and check whether your test still fails.

@imurchie it would be good to make this constant configurable from capabilities

All 3 comments

It seems like it takes a lot of time for ADB tool to install your application. The default timeout for this in Appium is hardcoded and equals to 90000 milliseconds.
You can manually set this constant to a greater value by editing this file (this is the place where _npm_ installs Appium in Mac OS if you provide _-g_ option):
/usr/local/lib/node_modules/appium-android-driver/build/lib/android-helpers.js

Change the value of

var REMOTE_INSTALL_TIMEOUT = 90000; // milliseconds

constant to _90000 * 2_ and check whether your test still fails.

@imurchie it would be good to make this constant configurable from capabilities

The androidInstallTimeout cap implements this.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings