Install_parse_failed_no_certificates

Ok so I am coming back to an Android project I haven’t messed with in a year and a new install of Unity on a new machine. After getting past a number of other problems, I now have it building to the phone but right after it installs the APK, I get this error:

Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

I have googled this and people are talking about making sure you have deleted old packages and what not. I have done this and has made no difference.

I have also tried creating a new keystore and still no go.

At my wit’s end at the moment and would appreciate any help. Also I have tried running this:

jarsigner -verify -verbose -certs mypackage.apk

It says:

jar verified.

Warning: 
This jar contains entries whose certificate chain is not validated.

Edit: I just checked some other packages that I made awhile ago and get the same output, and they still install just fine, so I guess that’s normal.

Thanks in advance for any help!

Here’s what appears to be the relevant lines from the logcat:

W/PackageParser(   96): Exception reading assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll in /mnt/asec/smdl2tmp1/pkg.apk
W/PackageParser(   96): java.lang.SecurityException: META-INF/BOWQUEST.SF has invalid digest for assets/bin/Data/Managed/Assembly-CSharp.dll in /mnt/asec/smdl2tmp1/pkg.apk
W/PackageParser(   96): 	at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:130)
W/PackageParser(   96): 	at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:357)
W/PackageParser(   96): 	at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)
W/PackageParser(   96): 	at java.util.jar.JarFile.getInputStream(JarFile.java:389)
W/PackageParser(   96): 	at android.content.pm.PackageParser.loadCertificates(PackageParser.java:342)
W/PackageParser(   96): 	at android.content.pm.PackageParser.collectCertificates(PackageParser.java:513)
W/PackageParser(   96): 	at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:5802)
W/PackageParser(   96): 	at com.android.server.PackageManagerService.access$2200(PackageManagerService.java:137)
W/PackageParser(   96): 	at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4566)
W/PackageParser(   96): 	at android.os.Handler.handleCallback(Handler.java:587)
W/PackageParser(   96): 	at android.os.Handler.dispatchMessage(Handler.java:92)
W/PackageParser(   96): 	at android.os.Looper.loop(Looper.java:130)
W/PackageParser(   96): 	at android.os.HandlerThread.run(HandlerThread.java:60)
E/PackageParser(   96): Package com.fizzpow.BowQuestPM2 has no certificates at entry assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll; ignoring!

So it’s failing on /Assembly-CSharp-firstpass.dll

Still not sure where to go from there though??

Please anyone? I am completely dead in the water here and have no clue what to do. Is there any official support I can get on this perhaps?

Bumping this, because I still am stuck here, thanks!

GRRRR, I just figured this out. JDK 7, Don’t USE IT! =) I downgraded to JDK 6 and this fixed the issue along with another issue I was having implementing the TapJoy plugin. Someone should probably look into why JDK 7 breaks stuff since I am sure I won’t be the only one that decides to just download the latest version on a re-install.

Just signed up to this forum to say thank you. Was having the same problem for the past two days.

You are welcome, I am glad my four days of hell will at least help someone else =)

aha! Rolling back to JDK 6 worked for me, too!

My case was especially bad, since I didn’t know what the “expected behavior” was for trying to install a certified app locally, and I thought that the “certification failed” error I was getting was normal!

Thanks for saving me another two days of hell :slight_smile:

did the trick for me too, maybe this should be pointed out in some area of the documentation?

+1 Thanks for taking one for the team akasurreal. We’re all greatful. :wink: Fixed me as well.

:slight_smile:

I also realized why OSX users would not run into this very easily, JDK 6 is pre-installed by the OS. Pretty handy when I was working on my Mac the other day.

+1
thank you akasurreal
reinstalling to JDK 6 (+ PATH windows variable added) and Unity Android is working NOW

+1

Thanks for the help akasurreal - this fixed it for me too!

akasurreal,you’re my life saver !

Please Unity guys, update documentation on this :!::

DO NOT USE JDK 7 FOR SIGNING applications for Android.

The phone just display “Application not installed” , and adb logcat says :
Package com.Xxxxx.yyyy has no certificates at entry assets/bin/Data/Mana

Downgrade to JDK6 (don’t forget to aim pour PATH env variable to its bin directory).

I had this JDK7 signing problem with BD-J jars (which also use self-signed certificates) - adding the root certificate as trusted CA to the certificate store solved the problem (keytool -importcert -trustcacerts -file root.crt …).

Hope this helps!

problem apparently fixed – I again uninstalled JDK alltogether, and reinstalled 6 – things look ok, submitting to market now and crossing fingers.


So I was having the signing problem, and downgrading to JDK6 did fix it – and jarsigner now properly verifies the file.

But unfortunately, I am still unable to install the app. When I download it off my server, it fails to install. When using Unity to Build Run, I’m getting this INSTALL_PARSE_FAILED_NO_CERTIFICATES

I’m unable to sign the app directly using keytool/jarsigner because unity signs it with the debug certificate and there’s a byte count mismatch.

48 hours and counting – any thoughts are appreciated

I have the same problem, thanks, I have solved it.

It has solved my problem aswell, thanks! :slight_smile:

I had to same problem! Thank you!