- [16.4] Keystore was tampered with or password was incorrect #4036
- Comments
- xdr-synapse commented Dec 13, 2019
- Steps to Reproduce
- Expected Behavior
- Actual Behavior
- Version Information
- alexthekid07 commented Dec 13, 2019
- xdr-synapse commented Dec 15, 2019
- sh0ckrates commented Dec 18, 2019
- xdr-synapse commented Dec 18, 2019
- chrome050 commented Jan 5, 2020
- chrome050 commented Jan 5, 2020
- dellis1972 commented Jan 9, 2020
- less0 commented Jan 29, 2020 •
- xdr-synapse commented Feb 12, 2020
- VictorK1902 commented Mar 28, 2020
- dellis1972 commented Apr 2, 2020 •
- dellis1972 commented Apr 14, 2020
- ccant01 commented Jun 9, 2020
- matll42 commented Jun 11, 2020
- mtossain commented Jun 16, 2020
- chrome050 commented Jun 17, 2020
- mtossain commented Jun 17, 2020
- brendanzagaeski commented Jun 24, 2020
- Candidate workaround
- Other possible workarounds
- «Keystore was tampered with, or password was incorrect» #1028
- Comments
- HeRo002 commented Feb 23, 2020
- Versions
- Description
- AndroidSigning@3 fails to sign — java.io.IOException: Keystore was tampered with, or password was incorrect #11624
- Comments
- MouthOfMadness commented Oct 23, 2019
- Environment
- Issue Description
[16.4] Keystore was tampered with or password was incorrect #4036
Comments
xdr-synapse commented Dec 13, 2019
After upgrade to VS 16.4, I was unable to sign again my application for Google Play with my keystore. Tought it was a bug so I waited for for an update to see if it was fixed, but no (16.4.1)
I tried so sign my APK with jarsigner from Android JDK and it worked, so I confirm that I don’t lost the password or alias.
Steps to Reproduce
- Keystore password and alias the same (generated by VS old version). Password have the next symbols: @ ^ ] $
- Distribute project with AdHoc/Google Play
- Get error
Expected Behavior
Actual Behavior
Failed to load signer «signer 1»
java.io.IOException: Keystore was tampered with, or password was incorrect.
Version Information
Microsoft Visual Studio Enterprise 2019
Version 16.4.1
VisualStudio.16.Release/16.4.1+29609.76
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Enterprise
Azure App Service Tools v3.0.0 16.4.457.38025
Azure App Service Tools v3.0.0
C# Tools 3.4.1-beta4-19607-02+52d275c4f82f329a9732b078c7f7fa0e45cd3e84
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Mono Debugging for Visual Studio 16.5.23 (1b51e8c)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Visual Basic Tools 3.4.1-beta4-19607-02+52d275c4f82f329a9732b078c7f7fa0e45cd3e84
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.4 for F# 4.6 16.4.0-beta.19556.5+e7597deb7042710a7142bdccabd6f92b0840d354
Microsoft Visual F# Tools 10.4 for F# 4.6
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.4.000.306 (d16-4@564b8d0)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.4.0.464 (remotes/origin/d16-4@4abf337c3)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.4.25 (579ee62)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.iOS and Xamarin.Mac SDK 13.8.3.0 (0d8fe21)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
The text was updated successfully, but these errors were encountered:
alexthekid07 commented Dec 13, 2019
Did you try deleting the keystore from VS and then re-adding it from the keystore file? I had to do that before when using a fresh install of VS with a lot of stuff dragged over
xdr-synapse commented Dec 15, 2019
I just tried it, but it didn’t work.
sh0ckrates commented Dec 18, 2019
any solutions yet please ? Same issue for me after updating Visual Studio
xdr-synapse commented Dec 18, 2019
Upgraded to VS 16.4.2, same error.
chrome050 commented Jan 5, 2020
I have the same issue on two installations (VS 16.4.1 and VS 16.4.2). If I create a new keystore with a simple password without «@ ^ ] $» it works. But this can’t be a solution!
chrome050 commented Jan 5, 2020
If i change the password for the alias it works (./keytool.exe -keypasswd -alias myalias -keystore «pathtokeystore»)
dellis1972 commented Jan 9, 2020
Its possible that we need to escape the password being sent to the key tool. I’ll try to create a unit test for this.
less0 commented Jan 29, 2020 •
This did not work for me, but pointed me in the right direction. I had to change the keystore password, too with the command
xdr-synapse commented Feb 12, 2020
My way to solve this was: Create a new certificate without the special characters and request/send to google support the upload key with pem file of the new certificate
VictorK1902 commented Mar 28, 2020
This did not work for me, but pointed me in the right direction. I had to change the keystore password, too with the command
OMG. Thank you so much. The solution is to change both alias password and keystore password:
dellis1972 commented Apr 2, 2020 •
I have tested this and we are correctly quoting the passwords.
It seems that the signing tools do NOT like certain characters. The @ always breaks it with the following error .
I don’t think this is anything we can actually fix since the problem is within the java tooling itself. Best thing to do is try to avoid certain characters (‘@’ especially).
I am however adding a test which will use special characters in the password field.
dellis1972 commented Apr 14, 2020
For some reason, keytool is no longer breaking when using the @ symbol on my machine.
Interestingly I do get the following
ccant01 commented Jun 9, 2020
I don’t know if this is still an issue for people but none of the above solutions worked for me (VS 16.6.1). What I did notice is putting the keystore file details into the Android Package Signing tab in the Android project seemed to make it work.
matll42 commented Jun 11, 2020
Same for me and my coworker with Visual Studio Community 16.6.1 and 16.6.2.
Compilation from Visual Studio for Mac 8.6.3 as I don’t need to enter the password anymore (last keystore used).
mtossain commented Jun 16, 2020
I had the same problem:
- migrated to VS 8.7 Preview, Android X (10.0.99) R on MacOS Catalina 10.15.6 Beta
and got the following error on archive build:
- keystore is tampered with or password incorrect:
Solution was combination of the above:
- reset keystore and alias password with keytool -storepasswd and keytool -alias commands in terminal
- under android project settings: android package signing, use the keystore details to automatically sign the apk
Took me several days to get this working. VS team please could you have a look to this? It can be very critical if you need to release an app, and you cannot, since the apk signing does not work.anymore.
chrome050 commented Jun 17, 2020
You can replace your uploaded keystore with a new keystore, which has a password without certain characters.
mtossain commented Jun 17, 2020
Sorry I tried that but it did not work.
brendanzagaeski commented Jun 24, 2020
For anyone seeing this in the past few weeks, a recent possible cause is if Android SDK Build-Tools 30 is installed in the build-tools directory of the Android SDK.
Candidate workaround
- In Visual Studio, open Tools > Options, open the Xamarin > Android Settings item, and copy the directory from the Android SDK Location.
- Open the Android SDK Location in Windows Explorer, open the build-tools directory, and delete any 30.0.0* directories.
Explanation: If Android SDK Build-Tools 30 is installed, the Xamarin section of the Output window shows the following error during the Distribute workflow:
This happens because the apksigner tool in Android SDK Build-Tools 30 requires Java JDK 9 or higher but Xamarin.Android currently requires Java JDK 8. The Distribute step automatically uses the highest Android SDK Build-Tools version in the build-tools directory, so removing Android SDK Build-Tools 30 from the build-tools directory allows Distribute to use Android SDK Build-Tools 29 or lower.
A future version of Visual Studio 2019 will install Java JDK 9 or higher to enable compatibility with Android SDK Build-Tools 30, but Java JDK 9 is not yet compatible with Xamarin.Android.
Other possible workarounds
As noted in earlier comments, if the project is configured to use the Android Package Signing options in the Visual Studio project property pages, then the Distribute step will succeed as long as the matching signing identity is used.
Explanation: Unlike the Distribute step, the initial Build > Archive step obeys the AndroidSdkBuildToolsVersion MSBuild property and uses Android SDK Build-Tools 29.0.2 even if Android SDK Build-Tools 30 is installed. I’ve added an internal tracking item to request that the Distribute step be adjusted to obey the AndroidSdkBuildToolsVersion MSBuild property in the future.
One other possible workaround if preparing apps for upload to Google Play is to switch to the Android App Bundle publishing format by setting Android Package Format to aab in the Visual Studio project property pages.
Explanation: Android App Bundles are signed using jarsigner instead of apksigner , so they do not hit the problem.
Источник
«Keystore was tampered with, or password was incorrect» #1028
Comments
HeRo002 commented Feb 23, 2020
Considering the reply I received when I posted this problem here:
https://groups.google.com/forum/#!topic/kivy-users/hFb4w-HysmI
It seems to me, that this is a bug in Buildozer or the guide «Creating a Release APK» — https://github.com/kivy/kivy/wiki/Creating-a-Release-APK .
I am not sure how to give you a short runnable example that reproduces this issue.
And giving you the extreme amount of information from a log_level = 2 in buildozer.spec seems like extreme overkill.
The buildozer.spec is below.
Versions
- Python: 3.6
- OS: Ubuntu 18.04.4 LTS (with GNOME 3.28.2)
- Buildozer: 0.40.dev0
- Kivy ver. 1.11.1
Description
When I try to run «buildozer android release» in Terminal on Ubuntu 18.04 I get the strange error «Keystore was tampered with, or password was incorrect» as seen below in the log.
I HAVE run the following, just before, in the same Terminal-window:
/keystores/
keytool -genkey -v -keystore
/keystores/geo-esp-app-sign-key2.keystore -alias geo-esp-app-sign-key2-alias -keyalg RSA -keysize 2048 -validity 20000
/keystores/geo-esp-app-sign-key2.keystore
export P4A_RELEASE_KEYSTORE_PASSWD=android
export P4A_RELEASE_KEYALIAS_PASSWD=android
export P4A_RELEASE_KEYALIAS=geo-esp-app-sign-key2-alias
buildozer android release
Here comes the log output from Buildozer:
[INFO]: Selecting java build tool:
[INFO]: Detected highest available build tools version to be 30.0.0-rc1
[INFO]: Building with gradle, as gradle executable is present
[DEBUG]: -> running gradlew assembleRelease
[DEBUG]:
[DEBUG]: > Task :compileReleaseJavaWithJavac
[DEBUG]: Note: Some input files use or override a deprecated API.
[DEBUG]: Note: Recompile with -Xlint:deprecation for details.
[DEBUG]: Note: Some input files use unchecked or unsafe operations.
[DEBUG]: Note: Recompile with -Xlint:unchecked for details.
[DEBUG]:
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ‘:packageRelease’.
[DEBUG]: > com.android.ide.common.signing.KeytoolException: Failed to read key geo-esp-app-sign-key2-alias from store «/home/henrik/keystores/geo-esp-app-sign-key2.keystore»: Keystore was tampered with, or password was incorrect
[DEBUG]:
[DEBUG]: * Try:
[DEBUG]: Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output. Run with —scan to get full insights.
[DEBUG]:
[DEBUG]: * Get more help at https://help.gradle.org
[DEBUG]:
[DEBUG]: BUILD FAILED in 14s
[DEBUG]: 28 actionable tasks: 28 executed
I tried the suggestions of the 2 first answers on:
But that didn’t help.
Command: buildozer android release
The text was updated successfully, but these errors were encountered:
Источник
AndroidSigning@3 fails to sign — java.io.IOException: Keystore was tampered with, or password was incorrect #11624
Comments
MouthOfMadness commented Oct 23, 2019
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AndroidSigning@3 fails to sign
MicrosoftDocs/azure-devops-docs#6097
Environment
- Server — Azure Pipelines
- Agent — Hosted
Issue Description
Is AndroidSigning@3 using a different keystore format and if so, how do you generate it?
I’m receiving a DevOps YAML task signing error using AndroidSigning@3
VS2019 16.3.5 generated the keystore, using Ad-Hoc
The keystore is uploaded as a secure file.
The passwords are set as secure
Using the same pipeline, but different android signing tasks:
This works:
task: AndroidSigning@2
displayName: «align and sign»
inputs:
apkFiles: ‘$(outputDirectory)/*.apk’
jarsign: true
jarsignerKeystoreFile: ‘myapp-keystore.keystore’
jarsignerKeystorePassword: ‘$(keystorePassword)’
jarsignerKeystoreAlias: ‘myapp-keystore’
jarsignerKeyPassword: ‘$(keyPassword)’
zipalign: true
This fails (see error details below)
task: AndroidSigning@3
displayName: ‘align and sign’
inputs:
apkFiles: ‘$(outputDirectory)/*.apk’
apksignerKeystoreFile: ‘myapp-keystore.keystore’
apksignerKeystorePassword: ‘$(keystorePassword)’
apksignerKeystoreAlias: ‘myapp-keystore’
apksignerKeyPassword: ‘$(keyPassword)’
zipalign: true
C:\windows\system32\cmd.exe /D /S /C «»C:\Program Files (x86)\Android\android-sdk\build-tools\24.0.3\apksigner.bat» sign —ks d:\a_temp\myapp-keystore.keystore —ks-pass «pass:» —ks-key-alias myapp-keystore —key-pass «pass:» —verbose
d:\a\1\b\Release\android\com.aiworldwide.myapp.apk»
Failed to load signer «signer #1»
java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:785)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
at java.security.KeyStore.load(KeyStore.java:1445)
at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:604)
at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCerts(ApkSignerTool.java:546) at com.android.apksigner.ApkSignerTool$SignerParams.access$200(ApkSignerTool.java:500)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:236)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:93)
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:783)
. 9 more
##[error]Error: The process ‘C:\Program Files (x86)\Android\android-sdk\build-tools\24.0.3\apksigner.bat’ failed with exit code 2
The text was updated successfully, but these errors were encountered:
Источник