• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Keystore was tampered with, or password was incorrect

K

Kevin Gillespie

Guest
Hi.

I have been attempting to get my first GMS2 sample working on an Android device. However, I am running into an issue with the Keystore. The following is the last portion of the build failure message:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':com.company.game:packageArm64-v8aRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key myalias from store "C:\Users\kgillespie\Dropbox\Kids Learning Material\Projects\myalias.keystore": Keystore was tampered with, or password was incorrect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 35.729 secs

I have created multiple keystores in the process of trying to resolve this issue. In the process I have made sure that passwords for the alias and the keystore were the same. I have used different keystore names and alias names between attempts in order to verify that it was using the newest settings (and not by chance or otherwise using cached info.) Nonetheless, each time I get some variation of the above error. I have also restarted GMS2 between compiles just in case some settings were not updated.

I have not tried any of the above "run with" options as I am not sure where to set those options within the GMS2 IDE.

This seems like a recurring thread at times, but I have not yet seen a response that addresses my issue.

Note: I am running version 2.2.1.375. I had installed the latest version, but uninstalled it after it would not launch properly.

Thanks in advance to all responses.
 

rIKmAN

Member
Note: I am running version 2.2.1.375. I had installed the latest version, but uninstalled it after it would not launch properly.
Despite you saying you tried the latest version and uninstalled it, 2.2.1.375 is a very old and known pirated version of GMS so your post rings alarm bells that you might be using a pirated version.

If it's a coincidence and you do have a licence, you should redownload the latest version and find/fix the reason it won't launch as there have been many changes/fixes since 2.2.1 was released.

When you launch the latest version, what does "would not launch properly" mean?
Error message? White screen? Frozen IDE? Instantly closes?
 
Last edited:

Dan

GameMaker Staff
GameMaker Dev.
As well as the advice already given to update to the current release, I would advise not creating your keystore in a Dropbox folder, as it's highly likely Dropbox is locking the file to sync it and so the keystore is not writing out properly. Try saving it somewhere else wen you generate the keystore and see if this then works during a build.

(We recommend you don't have anything to do with your projects or building projects in "live" folders, such as Dropbox/OneDrive/etc., btw, so I would recommend moving that entire Projects folder somewhere safer.)
 
K

Kevin Gillespie

Guest
Despite you saying you tried the latest version and uninstalled it, 2.2.1.375 is a very old and known pirated version of GMS so your post rings alarm bells that you might be using a pirated version.

If it's a coincidence and you do have a licence, you should redownload the latest version and find/fix the reason it won't launch as there have been many changes/fixes since 2.2.1 was released.

When you launch the latest version, what does "would not launch properly" mean?
Error message? White screen? Frozen IDE? Instantly closes?
It's a coincidence. Yesterday, I tried uninstalling, redownloading, and reinstalling the latest release multiple time with the same error message --- no white screen, the IDE did not freeze or close instantly. Simply said something along the lines of GMS not being able to install completely. Clicking ok simply resulting in it trying to continue loading and redisplaying the same message until I terminated the program altogether. I will try again, perhaps on an different machine. I grabbed the previous version of GMS from YoYo site since the update killed my installed version, and proceeded to try to get it working.
 
K

Kevin Gillespie

Guest
As well as the advice already given to update to the current release, I would advise not creating your keystore in a Dropbox folder, as it's highly likely Dropbox is locking the file to sync it and so the keystore is not writing out properly. Try saving it somewhere else wen you generate the keystore and see if this then works during a build.

(We recommend you don't have anything to do with your projects or building projects in "live" folders, such as Dropbox/OneDrive/etc., btw, so I would recommend moving that entire Projects folder somewhere safer.)
Thanks for your suggestion. I was hopefully that that might work. Unfortunately, the same issue occurred:

* What went wrong:
Execution failed for task ':com.company.game:packageArm64-v8aRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key myalias from store "C:\Users\kgillespie\Documents\keystores\SpaceGold.keystore": Keystore was tampered with, or password was incorrect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 42.411 secs
I will see if I can get the latest release of GMS 2 to work and then try again. I will update this thread one way or the other.

Thanks, and if anything else comes to mind, please share.
 

rIKmAN

Member
If you can provide some useful, specific information on what the exact error message says it might be possible to help you.

Does anything get written to the ui.log file after it has crashed?
 
K

Kevin Gillespie

Guest
If you can provide some useful, specific information on what the exact error message says it might be possible to help you.

Does anything get written to the ui.log file after it has crashed?
Thanks. I am now beyond the original upgrade issue and am currently running IDE 2.2.2.413/ RT 2.2.2.326.

Rerunning the build process (with the keystore no longer in the Dropbox folder), I get the same results as before:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.company.game:packageArm64-v8aRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key myalias from store "C:\Users\kgillespie\Documents\keystores\SpaceGold.keystore": Keystore was tampered with, or password was incorrect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 24.979 secs


C:\WINDOWS\system32\cmd.exe exited with non-zero status (1)
elapsed time 00:02:01.4020274s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.2.326/bin/Igor.exe" -j=8 -options="C:\Users\kgillespie\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -- Android Run started at 05/24/2019 13:01:43
"cmd" /c subst Z: /d

elapsed time 00:00:00.0681814s for command "cmd" /c subst Z: /d started at 05/24/2019 13:03:45
"cmd" /c subst Y: /d

elapsed time 00:00:00.0967572s for command "cmd" /c subst Y: /d started at 05/24/2019 13:03:45
"cmd" /c subst X: /d

elapsed time 00:00:00.0797116s for command "cmd" /c subst X: /d started at 05/24/2019 13:03:45
FAILED: Run Program Complete​

Please let me know if there are any additional details that might be useful for me to share to keep diagnose this issue. Meanwhile, I am also attempting to set up a second machine to reproduce (or get beyond) this issue.
 

rIKmAN

Member
Thanks. I am now beyond the original upgrade issue and am currently running IDE 2.2.2.413/ RT 2.2.2.326.

Rerunning the build process (with the keystore no longer in the Dropbox folder), I get the same results as before:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.company.game:packageArm64-v8aRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key myalias from store "C:\Users\kgillespie\Documents\keystores\SpaceGold.keystore": Keystore was tampered with, or password was incorrect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 24.979 secs


C:\WINDOWS\system32\cmd.exe exited with non-zero status (1)
elapsed time 00:02:01.4020274s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.2.326/bin/Igor.exe" -j=8 -options="C:\Users\kgillespie\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -- Android Run started at 05/24/2019 13:01:43
"cmd" /c subst Z: /d

elapsed time 00:00:00.0681814s for command "cmd" /c subst Z: /d started at 05/24/2019 13:03:45
"cmd" /c subst Y: /d

elapsed time 00:00:00.0967572s for command "cmd" /c subst Y: /d started at 05/24/2019 13:03:45
"cmd" /c subst X: /d

elapsed time 00:00:00.0797116s for command "cmd" /c subst X: /d started at 05/24/2019 13:03:45
FAILED: Run Program Complete​

Please let me know if there are any additional details that might be useful for me to share to keep diagnose this issue. Meanwhile, I am also attempting to set up a second machine to reproduce (or get beyond) this issue.
Weird how the latest version now “just works” - what was the fix for previous issue?

For the keystore error - are you still trying to use the same key from before?
If so it seems it is corrupted.

Like Dan said it’s likely that saving it to Dropbox during creation has caused issues with it, so try starting from scratch and generating a brand new key - this time saving it to a local hard drive location and not Dropbox.
 
K

Kevin Gillespie

Guest
Weird how the latest version now “just works” - what was the fix for previous issue?

"For the keystore error - are you still trying to use the same key from before?
If so it seems it is corrupted.

Like Dan said it’s likely that saving it to Dropbox during creation has caused issues with it, so try starting from scratch and generating a brand new key - this time saving it to a local hard drive location and not Dropbox".​

In the process of setting up the 2nd machine, I ran into a similar issue with upgrading. However, the issue on the 2nd machine was related to available space on the C drive. Upon clearing up space, the installation (of the runtime engine) was able to complete successfully. I then went back to the initial machine to see if that was the same issue. However, it had plenty of space available and upon trying again, it was able to launch and complete the engine installation. So, I am not sure what blocked it initially.

Regarding the keystore issue, I followed Dan's advice and proceeded to create and save it to a non-dropbox folder. In general, I recreated the keystore file on each rerun as I presumed something happened to the previous keystore file. The issue still occurs on the initial machine. I am not sure what is corrupting the keystore file. I also went as far as to create a new project containing only an empty room -- same issue resulted.

I have completed setting up the second machine for GMS Android development templated from the 1st machine (updated to newest release, installed and configured Android Studio and AVDs), and I proceeded to convert an existing app to Android. It worked, so I am pleased that I have an environment that works, but I still have no idea as to why the first system does not work.

Any other ideas?
 

rIKmAN

Member
If the key is corrupted then it doesn't matter what project you try to use it with it will give the error as the issue is with the key, not the project.

Have you tried using the key generated on the 2nd machine on the 1st machine and seeing if that works?

I would guess you are going to want to be using the same key on both machines anyway, as you would be working on the same project across both machines.
 
K

Kevin Gillespie

Guest
If the key is corrupted then it doesn't matter what project you try to use it with it will give the error as the issue is with the key, not the project.

Have you tried using the key generated on the 2nd machine on the 1st machine and seeing if that works?

I would guess you are going to want to be using the same key on both machines anyway, as you would be working on the same project across both machines.
I have not tried the keystone from the second machine, but will.

At this point, my primary question would be what is causing the corruption on the first system. As noted before, I am creating new keystore files with each test.

Again, thanks for the suggestion. I will let you know how it goes later.
 

Heathenlamb

Member
I have suddenly developed the same issue ... been running perfectly fine until this morning. Tried to export to android and have recieved the same Keystore Error
 

xNYARLx

Member
Despite you saying you tried the latest version and uninstalled it, 2.2.1.375 is a very old and known pirated version of GMS so your post rings alarm bells that you might be using a pirated version.

If it's a coincidence and you do have a licence, you should redownload the latest version and find/fix the reason it won't launch as there have been many changes/fixes since 2.2.1 was released.

When you launch the latest version, what does "would not launch properly" mean?
Error message? White screen? Frozen IDE? Instantly closes?
When pay monthly subscription hi can use what version want.
 
Top