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:
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.
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
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.
The problem appears to be essentially the JRE included with Solard2D/Corona SDK on silicon Macs.
There are two ways to fix this. The simplest is to install Rosetta and use the included JRE:
softwareupdate --install-rosetta
But there’s another solution: using a native jre for Silicon.
I looked for the same version used by the latest version of Solar2D, 17.0.6.
I downloaded the tar.gz to avoid system installations and cluttering the environment. I also used a symbolic link to keep the original corona package as clean as possible.
Basically, you can follow these steps from the command line. If you don’t have wget, you can use curl.
# let’s move it to a neutral directory
cd tmp
# download the tar.gz with wget
wget “https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.6%2B10/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.6_10.tar.gz”
# or with curl (-o for the file name, -L to follow redirects)
# curl -o OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.6_10.tar.gz -L https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.6%2B10/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.6_10.tar.gz
# let’s create a folder in our home
mkdir -p ~/jdks
# let’s unzip the file
tar -xzf OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.6_10.tar.gz -C ~/jdks
# let’s remove the archive
rm OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.6_10.tar.gz
# let’s give it a more compact name
mv ~/jdks/jdk-17.0.6+10 ~/jdks/jdk-17.0.6
# Let’s rename the Solar2D jre
mv /Applications/Corona-3729/Corona\ Simulator.app/Contents/jre/jdk /Applications/Corona-3729/Corona\ Simulator.app/Contents/jre/jdk_old
# let’s point the directory to the silicon JRE
ln -s ~/jdks/jdk-17.0.6 /Applications/Corona-3729/Corona\ Simulator.app/Contents/jre/jdk