Cannot verify the signature of appium-uiautomator2-server apk
See original GitHub issueThe 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:
- Created 3 years ago
- Comments:25 (14 by maintainers)
Top GitHub Comments
@senchi No, this is unrelated. Refer to https://github.com/appium/java-client/blob/master/docs/environment.md
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?
Find image for environmental variable