[Resolved] debug.Keystore not valid or incorrect password ??

Josh,

I did some reading and also found out that alot of these issues are related with java and mac.

The problem i encounter is a difficult one, because on my machine is only java 1.6.0.jdk. Java 7 is not on it. Its not in the virtual machine directory. I also know that iOS stores it on two places in the system/lib and also in root/lib.

There are two issues but i think both are connected to the java issue.
1 - password problem during build
2 - application wont install on android when build (tested it with debug)

I found out that if you have this problem and you allow unknown installations on android it has something to do with java also.

I cant really solve it because i have java 7 not installed. So im a bit confused on what to do.

I have two macs, these are the specs:

  • iMac - 3.1 Ghz Intel Core i5 - 8GB 1333 Mhz DDR3 - software 10.7.5 (up to date trough software-update) and only JavaVirtualMachines/1.6.0.jdk
  • MacbookPro - 2.66 Ghz Intel Core 2 Duo - 8 GB 1067 Mhz DDR3 - software 10.8.2 and only JavaVirtualMachines/1.6.0.jdk

On both machines its not working. Does Corona has any ideas for me what to do?

Greetz
John. [import]uid: 164820 topic_id: 29668 reply_id: 138979[/import]

John,

Are you able to successfully build and install a sample app with our debug keystore on Android?
Or is this only an issue with your keystore file?

If it fails with Corona’s debug keystore, then yes, it sounds like we’re having a problem using the JDK tools on your 2 Mac machines.

If it only fails with your keystore file, then it sounds like it was set up wrong… or the more likely case is you’re not using the correct password with it. Unfortunately, the JDK tools do not tell us or you if you’ve entered the wrong password when signing with a keystore, causing the app to be signed with a completely different signature. [import]uid: 32256 topic_id: 29668 reply_id: 139056[/import]

Josh,

The debug doesnt work also, i have problems with the jdk. Called apple and they say its an java problem, but they block java 6 anyways. so i have no clue :slight_smile:

What i will try is install corona on a windows machine and see if i can get it to work there.

And try to install the java 7 and then maybe the install of java 6 also is possible that overrides my current one. then change the prio back to java 6 on my mac and compile again :slight_smile:

Will let you know if i can get it to work :slight_smile:

I can compile with the key so that problem is solved. Just doenst install on the S3. Can I send the APK to corona so they can see if they have the same problem? Maybe its the S3 :slight_smile:

Thanks for your time!
Greetz
John. [import]uid: 164820 topic_id: 29668 reply_id: 139174[/import]

John,

Would you mind trying to sign your APK manually?
This is to verify that your JDK is installed correctly and working.

First, we need to locate the “jarsigner” command line tool. On my system, it can be found in the following directory…
> /Library/Java/Home/bin/jarsigner

The “Home” directory is really a symlink on my machine. The actual path for me is…
> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner

Next, you need to locate Corona’s “debug.keystore” file. You can find it in the following directory…
> ./CoronaSDK/Resource Library/Android/debug.keystore

Finally, the command line to sign your APK will look something like this…
[lua]/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner -keystore /Users/josh/Desktop/CoronaSDK/Resource\ Library/Android/debug.keystore androiddebugkey[/lua]

If the above command line works, then it will ask you for the keystore’s password. The password for Corona’s debug keystore is “android”.

Once your APK is signed, try installing it to your device.
If it fails, then we know we have that there is a problem with the JDK on your machine.
If it succeeds, then it sounds like Corona is having a problem finding your JDK tools.
[import]uid: 32256 topic_id: 29668 reply_id: 139200[/import]

Josh,

I did some reading and also found out that alot of these issues are related with java and mac.

The problem i encounter is a difficult one, because on my machine is only java 1.6.0.jdk. Java 7 is not on it. Its not in the virtual machine directory. I also know that iOS stores it on two places in the system/lib and also in root/lib.

There are two issues but i think both are connected to the java issue.
1 - password problem during build
2 - application wont install on android when build (tested it with debug)

I found out that if you have this problem and you allow unknown installations on android it has something to do with java also.

I cant really solve it because i have java 7 not installed. So im a bit confused on what to do.

I have two macs, these are the specs:

  • iMac - 3.1 Ghz Intel Core i5 - 8GB 1333 Mhz DDR3 - software 10.7.5 (up to date trough software-update) and only JavaVirtualMachines/1.6.0.jdk
  • MacbookPro - 2.66 Ghz Intel Core 2 Duo - 8 GB 1067 Mhz DDR3 - software 10.8.2 and only JavaVirtualMachines/1.6.0.jdk

On both machines its not working. Does Corona has any ideas for me what to do?

Greetz
John. [import]uid: 164820 topic_id: 29668 reply_id: 138979[/import]

John,

Are you able to successfully build and install a sample app with our debug keystore on Android?
Or is this only an issue with your keystore file?

If it fails with Corona’s debug keystore, then yes, it sounds like we’re having a problem using the JDK tools on your 2 Mac machines.

If it only fails with your keystore file, then it sounds like it was set up wrong… or the more likely case is you’re not using the correct password with it. Unfortunately, the JDK tools do not tell us or you if you’ve entered the wrong password when signing with a keystore, causing the app to be signed with a completely different signature. [import]uid: 32256 topic_id: 29668 reply_id: 139056[/import]

Josh,

The debug doesnt work also, i have problems with the jdk. Called apple and they say its an java problem, but they block java 6 anyways. so i have no clue :slight_smile:

What i will try is install corona on a windows machine and see if i can get it to work there.

And try to install the java 7 and then maybe the install of java 6 also is possible that overrides my current one. then change the prio back to java 6 on my mac and compile again :slight_smile:

Will let you know if i can get it to work :slight_smile:

I can compile with the key so that problem is solved. Just doenst install on the S3. Can I send the APK to corona so they can see if they have the same problem? Maybe its the S3 :slight_smile:

Thanks for your time!
Greetz
John. [import]uid: 164820 topic_id: 29668 reply_id: 139174[/import]

John,

Would you mind trying to sign your APK manually?
This is to verify that your JDK is installed correctly and working.

First, we need to locate the “jarsigner” command line tool. On my system, it can be found in the following directory…
> /Library/Java/Home/bin/jarsigner

The “Home” directory is really a symlink on my machine. The actual path for me is…
> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner

Next, you need to locate Corona’s “debug.keystore” file. You can find it in the following directory…
> ./CoronaSDK/Resource Library/Android/debug.keystore

Finally, the command line to sign your APK will look something like this…
[lua]/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jarsigner -keystore /Users/josh/Desktop/CoronaSDK/Resource\ Library/Android/debug.keystore androiddebugkey[/lua]

If the above command line works, then it will ask you for the keystore’s password. The password for Corona’s debug keystore is “android”.

Once your APK is signed, try installing it to your device.
If it fails, then we know we have that there is a problem with the JDK on your machine.
If it succeeds, then it sounds like Corona is having a problem finding your JDK tools.
[import]uid: 32256 topic_id: 29668 reply_id: 139200[/import]

Joshua,

when I try that manual signing, I get a warning, the signer certificate has expired.

What does that mean?

Thanks [import]uid: 153530 topic_id: 29668 reply_id: 140171[/import]

That warning is normal for Corona’s debug.keystore… because it actually has expired. But since it is only used for testing purposes, we left it as is.

Now that said, the keystore that you’ll eventually have to create to digitally sign the release version of your app should not be expired. You’ll have to manage that for yourself. You can find Google’s official documentation on how to create a keystore file and sign your app via the link below…
http://developer.android.com/tools/publishing/app-signing.html
[import]uid: 32256 topic_id: 29668 reply_id: 140246[/import]

Joshua,

when I try that manual signing, I get a warning, the signer certificate has expired.

What does that mean?

Thanks [import]uid: 153530 topic_id: 29668 reply_id: 140171[/import]

That warning is normal for Corona’s debug.keystore… because it actually has expired. But since it is only used for testing purposes, we left it as is.

Now that said, the keystore that you’ll eventually have to create to digitally sign the release version of your app should not be expired. You’ll have to manage that for yourself. You can find Google’s official documentation on how to create a keystore file and sign your app via the link below…
http://developer.android.com/tools/publishing/app-signing.html
[import]uid: 32256 topic_id: 29668 reply_id: 140246[/import]

There was an update to Java  (3/13/2014) that appears to have removed Java 6 from Windows 7. I was not able to find it in my installed programs, just the Java 7 was there.

Needless to say the debug keystore problem reared it’s ugly head, but fortunately reinstalling the latest Java 6 fixed it.

 

Could you guys have the simulator check that Java 6 is actually installed, and then prompt the user to install it if it is not? This would be so much easier for us. It’s a PIA to try to find the resolution to this problem on the internet. It also seems now that Google search results are being redirected to the forum main page, which is another PIA because now you have to try finding what you saw on Google here.

We do check that the 32-bit version of the JDK 6 is installed when you open the “Build for Android” window.  We find the path to the JDK 6 via the registry and verify that its tool files are there.  If we can’t find them, then we display a warning.  So, this means Corona is finding the JDK 6.

 

The issue you are running into and some others as well is that something you are installing is adding JDK 7 to your PATH environment variable, which is taking precedence during the final build step.

 

Installing JDK 7 does not replace the JDK 6.  Oracle/Sun can’t do that.  Both versions must be allowed to coexist.  The reason is that Java applications target a specific Java version (ie: 6 or 7) and will fail to run if the specific Java version is not installed.  This is because they make breaking changes between major versions.  It’s an environment variable PATH issue.

I can second Pace, it was a Java update lately that messed Corona install. Removed all Java versions and reinstalled not noticing this thread. 

 

In any case I wish Corona would 

a ) Add some logic to detect/hint broken Java installs since this kind of thing is likely to happen again (disregarding Java updates is not really good idea)

b ) Provide some guidance on how to secure Java so that it’s there for Corona only. I would like to disable everything else except the stuff needed by Corona 

We can look into it.

There was an update to Java  (3/13/2014) that appears to have removed Java 6 from Windows 7. I was not able to find it in my installed programs, just the Java 7 was there.

Needless to say the debug keystore problem reared it’s ugly head, but fortunately reinstalling the latest Java 6 fixed it.

 

Could you guys have the simulator check that Java 6 is actually installed, and then prompt the user to install it if it is not? This would be so much easier for us. It’s a PIA to try to find the resolution to this problem on the internet. It also seems now that Google search results are being redirected to the forum main page, which is another PIA because now you have to try finding what you saw on Google here.

We do check that the 32-bit version of the JDK 6 is installed when you open the “Build for Android” window.  We find the path to the JDK 6 via the registry and verify that its tool files are there.  If we can’t find them, then we display a warning.  So, this means Corona is finding the JDK 6.

 

The issue you are running into and some others as well is that something you are installing is adding JDK 7 to your PATH environment variable, which is taking precedence during the final build step.

 

Installing JDK 7 does not replace the JDK 6.  Oracle/Sun can’t do that.  Both versions must be allowed to coexist.  The reason is that Java applications target a specific Java version (ie: 6 or 7) and will fail to run if the specific Java version is not installed.  This is because they make breaking changes between major versions.  It’s an environment variable PATH issue.

I can second Pace, it was a Java update lately that messed Corona install. Removed all Java versions and reinstalled not noticing this thread. 

 

In any case I wish Corona would 

a ) Add some logic to detect/hint broken Java installs since this kind of thing is likely to happen again (disregarding Java updates is not really good idea)

b ) Provide some guidance on how to secure Java so that it’s there for Corona only. I would like to disable everything else except the stuff needed by Corona 

We can look into it.