Failed to package AIR application dev_32_S.air: unable to load a certificate in this file
Answered
from version 2017.2 packaging air apps stopped working. I get error:
Failed to package AIR application dev_32_S.air: unable to load a certificate in this file
yesterday it was working OK, on older version it is working OK.
Please sign in to leave a comment.
See https://youtrack.jetbrains.com/issue/IDEA-176227.
The solution would be to switch Java version for Flash/Flex SDK tools. Find
SDK_HOME\bin\jvm.config
file (create if it's missing). In this file there isjava.home
property that is empty by default. Set it to the location of JDK 8u112 or older. Make sure to use forward slashes on Windows, like this:java.home=c:/work/idea/jre64
. Now IntelliJ IDEA (and other IDEs) will use the specified Java version instead of the version IntelliJ IDEA runs under.Works! Thanks Serge!
Hi Serge,
I am experiencing this issue and have done the following:
1.Changed the boot JDK as described here:
https://intellij-support.jetbrains.com/hc/en-us/articles/206544879
- doing that seems to have no effect, it prompts me to restart IDEA , I click OK but when it restarts it seems to still be using the default JDK.
2. Downloaded jdk-8u112 , created the jvm.config file and added the following 'java.home=C:/Program Files/Java/jre1.8.0_112'
Neither of these have solved the issue.
Do you have any other suggestions?
Thanks
> - doing that seems to have no effect, it prompts me to restart IDEA , I click OK but when it restarts it seems to still be using the default JDK.
There appears to be a bug with the switch boot JDK feature on Windows. Please try setting IDEA_JDK_64 environment variable instead, it should work.
> Downloaded jdk-8u112 , created the jvm.config file and added the following 'java.home=C:/Program Files/Java/jre1.8.0_112'
Try installing into a location without spaces, make sure you modified jvm.config in the correct location of the SDK. Which SDK do you use? What is the full path to jvm.config on your disk? Flex SDK should already have jvm.config file in the bin directory.
hi Paul!
in:
c:/SDKs/AIR_25/bin/jvm.config
(where c:/SDKs/AIR_25 is your AIR SDK folder used by idea project)
you need to have:
java.home=c:/Users/pol/.IntelliJIdea2017.2/config/jdks/jbsdk8u112b287.2_windows_x64/
But this you need to download via:
JB SDK Bintray Downloader
Not sure if this is the case on Windows, but on Mac, just doing the jvm.config file in the AIR SDK did make the building and certificate warning go away, however no debug console session appeared when running the app with an Android device connected.
However, if I do the Switch IDE boot JDK to 112 instead, not only does the certificate issue go away, but proper run/debug tool sessions appear.
Thanks for the feedback guys.
It is working for me now but only in the case of using a self signed cert.
I still get the error when using my original p12 cert.
I have installed JDK 112, and created file jvm.config in AIR SDK 24/bin folder...
there is a row:
java.home = /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
in the file. Restarted IntelliJ, no effects, just won't accept certificate.
We've updated bundled temporary self-signed certificate to be 2048-RSA. The fix will appear in IntelliJ IDEA 2017.2.x update release. For now, a trick with setting an older Java in [AIR SDK]/bin/jvm.comfig file works fine.
However, the trick with jvm.config doesn't work with user's custom 1024-RSA certificate and there's no way to fix it. It is not possible to enter your keystore password in the IDE dialog for such certificates. If by some reason you need to work with your own 1024-RSA certificate then you'll need either to use the ADT tool from the command line with compatible (older) Java or to configure older JDK to be used for IntelliJ IDEA itself.
Hi Alexander,
I'm having a similar issue (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000034724-Failed-to-load-a-certificate-message-when-packaging-for-Android-) and I think it's because of the certificate we are using. If that's so, could you walk me through on how to configure an older JDK to be used for IntelliJ IDEA? I already tried to edit the jvm.config line to use an older JDK but had no luck so far.
Thanks in advance,