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.

unlock_apk-debug.apk [INSTALL_FAILED_VERSION_DOWNGRADE] after upgraded to 1.7.1

See original GitHub issue

The problem

We recently upgraded to Appium 1.7.1 from 1.6.6-beta.4. After the upgrade, every tests failed with this error: 2017-10-20 12:13:42:312 - error: [MJSONWP] Encountered internal error running command: Error: Error executing adbExec. Original error: 'Command '/opt/android-sdk-linux/platform-tools/adb -P 5037 -s f15aeffe install /opt/myTest/adbservice/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk' exited with code 1'; Stderr: 'Failed to install /opt/myTest/adbservice/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]'; Code: '1' at ADB.execFunc$ (../../../lib/tools/system-calls.js:317:13) at tryCatch (/opt/myTest/adbservice/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/opt/myTest/adbservice/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/opt/myTest/adbservice/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/opt/myTest/adbservice/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.6.6-beta.4
  • Desktop OS/version used to run Appium: centos-release-7-3.1611.el7.centos.x86_64
  • Node.js version (unless using Appium.app|exe): v6.11.2
  • Mobile platform/version under test: Android 7.0
  • Real device or emulator/simulator: Real device (Samsung S7)
  • Appium CLI or Appium.app|exe:

Details

So is Appium 1.7.1 really trying to install an older version of unlock_apk-debug.apk? By the way, why does Appium still trying to install unlock_apk-debug.apk every time when I have capability skipUnlock=true? Does this app also do other tasks other than unlock the screen?

Link to Appium logs

https://gist.github.com/oldstone/b60e3e9d6b0e288c9a0ad36dcd7ae032

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

19reactions
vighneshpai-ymlcommented, Feb 20, 2018

Instead of uninstalling all together, a simple but manual workaround is, uninstall the app ‘Unlock’ from your device and then try again.

2reactions
anantgoldiecommented, Oct 8, 2018

@vighneshpai-yml thanks for the suggestion. it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android_Install failed version downgrade
Just uninstall the application on your device first and then install the fresh one.
Read more >
INSTALL_FAILED_VERSION_D...
Rather than factory reset the device, I used the adb install command posted earlier to downgrade the .APK and get the embedded scanner...
Read more >
SideQuest Community Support | SideQuest
I cant downgrade my version of beatsaber it says "A task failed. Check the tasks screen for more info. beat-saber.apk: : /data/local/tmp/_stream.apk could ......
Read more >
Can the previous version overwrite the currently installed ...
Since Android 4.0, downgrading an app is not possible anymore. The installation will fail (with error code ...
Read more >
How to downgrade an app using Android's hidden rollback ...
Android doesn't normally let users install an older version of an app (downgrade) ... into their own hands and downgrade the app after...
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