debug.keystore doesn't work

Hello.

Since the 2020 Macbook Pro will no longer be supported in the next OS, I bought a Mac mini M4 and am building a new Solar2D environment.

However, in the Android build, the production keystore I have been using cannot be authenticated with the same password.

I tried it just to be sure, but the debug keystore (debug.keystore) included with Solar2D also did not pass password authentication (pw:android).

I restored the Mac Mini M4 to its factory settings and tried the same thing as quickly as possible, but I was unable to authenticate the keystore with Solar2D.

The Windows version of Solar2D authenticated both debug and production without any problems. iOS builds also work normally on the Mac Mini M4.

Has anything changed since I changed from Intel Mac to M4?

I’m sure that a new Java installation was no longer necessary, so I haven’t installed any Java.

Hello, @umalemon.
When the build was failing because of the password, in my case, the problem came down to two points:

No internet connection
The build only worked if the computer was connected to the internet. Check your connection before trying again.

Incorrect keystore password
The best solution might be to create a new keystore from scratch.
When creating it, pay attention when typing the password, and use only letters and numbers to avoid problems.

You are using a Mac Mini M4 (Java installed), you can use the following command in the Terminal to create a new keystore:

keytool -genkeypair -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

During the creation, it will ask for:

  • A password for the keystore
  • Name, organization, city, etc.
  • And also a password for the key

The file my-release-key.keystore will be generated in the directory where you ran the command. Keep it safe!

Thanks for the reply.

I have a wired internet connection.

What’s strange is that the password for the debug.keystore that comes with Solar2D doesn’t work either. My production keystore is having the same problem, so I can’t proceed with the build.


002

When authenticating the password, Solar2D output the following error:

1. Using exec failed: Error Domain=NSPOSIXErrorDomain Code=86 "Bad CPU type in executable" UserInfo={NSLocalizedFailureReason=Failed to execute /Applications/Corona-3721/Corona Simulator.app/Contents/jre/jdk/Contents/Home/bin/java: Bad CPU type in executable} Jul 03 00:29:27.155 exec failed: Error Domain=NSPOSIXErrorDomain Code=86 "Bad CPU type in executable" UserInfo={NSLocalizedFailureReason=Failed to execute /Applications/Corona-3721/Corona Simulator.app/Contents/jre/jdk/Contents/Home/bin/keytool: Bad CPU type in executable} Jul 03 00:29:27.158 ERROR: Cannot Unlock Keystore: The password for the Keystore located at /Users/sublogic/Desktop/debug.keystore is not correct or the file is not a valid Keystore

Sorry for posting multiple times.
I solved it myself.

To authenticate the keystore on Apple Silicon, you need to install Rosetta. I noticed this because I switched from Intel to Apple M4.

However, this explanation does not seem to be in the Solar2D tutorial. I think it is necessary to add this explanation for new Solar2D users.

In the M4 Mac terminal,

softwareupdate --install-rosetta

All keystores now worked without any problems. The build was also successful.

Sorry for the fuss.

1 Like

This will be very helpful for someone who at some point, encounters this problem.

https://www.macrumors.com/2025/06/10/apple-to-phase-out-rosetta-2/

Rosetta seems to be coming to an end.
We may need to take a more fundamental approach to this issue.

Even if you can solve the problem by recreating a keystore that you created yourself, I think it’s a problem that the included debug.keystore doesn’t work.