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.

Cannot verify the signature of appium-uiautomator2-server apk

See original GitHub issue

The problem

I’m running into a Cannot verify the signature of '/home/deployer/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.3.apk' error today when trying to establish a session. I am running appium@beta version installed a week ago. Somehow I never ran into this at all over the last week until just now, but now it is happening every time. Other servers running appium 1.17.1 are not running into this.

It appears restarting appium makes the problem go away. Apparently the problem only occurs after appium has been running for a few days…

Environment

  • Appium version (or git revision) that exhibits the issue: appium@beta (installed 1 week ago)
  • Last Appium version that did not exhibit the issue (if applicable): 1.17.1
  • Desktop OS/version used to run Appium: Ubuntu 18.04.4 LTS
  • Node.js version (unless using Appium.app|exe): 10.22.0
  • Npm or Yarn package manager: 6.14.6
  • Mobile platform/version under test: Android 8.1
  • Real device or emulator/simulator: real device
  • Appium CLI or Appium.app|exe: cli

Details

Here is the full error:

An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘/home/deployer/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.3.apk’. Original error: Command ‘/usr/lib/jvm/default-java/bin/java -Xmx1024M -Xss1m -jar /usr/lib/android-sdk/build-tools/27.0.1/apksigner.jar verify --print-certs /home/deployer/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.3.apk’ exited with code 1

When I run that directly, it has some warnings but does succeed with exit code 0:

[ PRODUCTION ] deployer@sd-prod-mayhem1:~$ /usr/lib/jvm/default-java/bin/java -Xmx1024M -Xss1m -jar /usr/lib/android-sdk/build-tools/27.0.1/apksigner.jar verify --print-certs /home/deployer/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.3.apk
Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
WARNING: META-INF/jdom-info.xml not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/services/org.xmlpull.v1.XmlPullParserFactory not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/INDEX.LIST not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
WARNING: META-INF/io.netty.versions.properties not protected by signature. Unauthorized modifications to this JAR entry will not be detected. Delete or move the entry outside of META-INF/.
[ PRODUCTION ] deployer@sd-prod-mayhem1:~$ echo $?
0

Link to Appium logs

I’m not seeing anything in the appium log related to this error, but I’ll include it anyway 😃

https://gist.github.com/sshock/76af5741a8ca38c7ac49c75e1d73e003

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Dec 21, 2020
0reactions
Samiksha2703commented, Nov 24, 2021

I am facing this issue when I am using real device also emulator

An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:\Users\samikshashende\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.21.1.apk’. Original error: Command ‘C:\Program Files\Java\jdk1.8.0_301\bin\bin\java.exe’ not found. Is it installed?

ENV Path

Find image for environmental variable

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot verify the signature of '////apks/appium-uiautomator2 ...
It is not Appium issue, but Android SDK missing apksigner: Check the link and install build-tools with extras, then check apksigner is in ......
Read more >
Cannot verify the signature of appium-uiautomator2-server
Hello! appium-inspector fails to start with an error “Failed to create session. An unknown server-side error occurred while processing the ...
Read more >
Cannot verify the signature of 'appium-uiautomator2-server ...
Hi, I have this error when performing mobile object spy, that KS cannot verify signature of appium-uiautomator2-server-v4.15.0.apk, ...
Read more >
appium/appium - Gitter
... when I start session use the Appium desktop, it popup a message “Original error:Cannot verify the signature of 'appium-uiautomator2-server-v4.15.0.apk', ...
Read more >
The UiAutomator2 Driver for Android - appium
Follow the steps below based on whether you want to automate an emulator or a real device. In addition you will need your...
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