Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Install_parse_failed_no_certificates

Discussion in 'Android' started by akasurreal, Aug 12, 2011.

  1. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    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:

    Code (csharp):
    1. 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:

    Code (csharp):
    1. jar verified.
    2.  
    3. Warning:
    4. 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!
     
    Last edited: Aug 12, 2011
  2. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    Here's what appears to be the relevant lines from the logcat:

    Code (csharp):
    1. W/PackageParser(   96): Exception reading assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll in /mnt/asec/smdl2tmp1/pkg.apk
    2. 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
    3. W/PackageParser(   96):     at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:130)
    4. W/PackageParser(   96):     at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:357)
    5. W/PackageParser(   96):     at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)
    6. W/PackageParser(   96):     at java.util.jar.JarFile.getInputStream(JarFile.java:389)
    7. W/PackageParser(   96):     at android.content.pm.PackageParser.loadCertificates(PackageParser.java:342)
    8. W/PackageParser(   96):     at android.content.pm.PackageParser.collectCertificates(PackageParser.java:513)
    9. W/PackageParser(   96):     at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:5802)
    10. W/PackageParser(   96):     at com.android.server.PackageManagerService.access$2200(PackageManagerService.java:137)
    11. W/PackageParser(   96):     at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4566)
    12. W/PackageParser(   96):     at android.os.Handler.handleCallback(Handler.java:587)
    13. W/PackageParser(   96):     at android.os.Handler.dispatchMessage(Handler.java:92)
    14. W/PackageParser(   96):     at android.os.Looper.loop(Looper.java:130)
    15. W/PackageParser(   96):     at android.os.HandlerThread.run(HandlerThread.java:60)
    16. E/PackageParser(   96): Package com.fizzpow.BowQuestPM2 has no certificates at entry assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll; ignoring!
    17.  
    So it's failing on /Assembly-CSharp-firstpass.dll

    Still not sure where to go from there though??
     
    Last edited: Aug 12, 2011
  3. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    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?
     
  4. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    Bumping this, because I still am stuck here, thanks!
     
  5. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    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.
     
  6. ALKP

    ALKP

    Joined:
    Aug 18, 2011
    Posts:
    1
    Just signed up to this forum to say thank you. Was having the same problem for the past two days.
     
  7. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    You are welcome, I am glad my four days of hell will at least help someone else =)
     
  8. luvcraft

    luvcraft

    Joined:
    Aug 22, 2011
    Posts:
    67
    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!
     
  9. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    257
    Thanks for saving me another two days of hell :)
     
  10. fox

    fox

    Joined:
    Jan 14, 2009
    Posts:
    118
    did the trick for me too, maybe this should be pointed out in some area of the documentation?
     
  11. mhardy

    mhardy

    Joined:
    Apr 3, 2011
    Posts:
    48
    +1 Thanks for taking one for the team akasurreal. We're all greatful. ;) Fixed me as well.
     
  12. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    :)

    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.
     
  13. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    228
    +1
    thank you akasurreal
    reinstalling to JDK 6 (+ PATH windows variable added) and Unity Android is working NOW
     
    Last edited: Sep 19, 2011
  14. dstrawberrygirl

    dstrawberrygirl

    Joined:
    Jan 26, 2010
    Posts:
    3
    +1

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

    gon2024

    Joined:
    Nov 24, 2009
    Posts:
    3
    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).
     
  16. biobronch

    biobronch

    Joined:
    Nov 23, 2011
    Posts:
    1
    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!
     
  17. Surreal

    Surreal

    Joined:
    Dec 10, 2011
    Posts:
    29
    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
     
    Last edited: Dec 11, 2011
  18. sampson3333

    sampson3333

    Joined:
    Jul 17, 2009
    Posts:
    9
    I have the same problem, thanks, I have solved it.
     
  19. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    It has solved my problem aswell, thanks! :)
     
  20. SeikoTheWiz

    SeikoTheWiz

    Joined:
    Aug 1, 2011
    Posts:
    69
    I had to same problem! Thank you!
     
  21. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    I have the exact same problem but uninstalling all JDK and then installing JDK 6 (32 bit) still fails....
     
  22. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    How do I aim PATH env variable to bin directory?
     
  23. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    I managed to change PATH and now it works. Thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
  24. BazLevelUp

    BazLevelUp

    Joined:
    Jun 27, 2012
    Posts:
    36
    I have downgraded to JDK6, set the PATH env variable but I still get
    "Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]"
    :(
    Can anyone help me ?

    Edit : I found the solution here. You need to create your keystore using the JDK6, you can't create a keystore using JDK7, realize it doesn't work, downgrade, and then valid the keystore create with jdk7. You must do everything using JDK6.
     
    Last edited: Sep 6, 2012
  25. PJisAnarchist

    PJisAnarchist

    Joined:
    Jan 9, 2012
    Posts:
    9
    Thx BazLevelUp too! Mother effing jdk7... After recreating keystore with jdk6, everything seemed to build nice and it installed well. Let see if GGplay handles it well too when I publish.
    Double thumbs up dudes.
     
  26. Flarup

    Flarup

    Joined:
    Jan 7, 2010
    Posts:
    164
    Apparently this issue is still a problem, so thanks a lot for your help in this thread! In addition to the JDK downgrade I also had to create a new keystore using keytool from JDK6, but once that was done it solved the problem.
     
  27. ackarkka

    ackarkka

    Joined:
    Oct 23, 2012
    Posts:
    1
    this is not fixed...Unity or Java or Android...one of the three of you please address this issue

    two machines...one w7-64 the other w7-32, both downgraded to JDK/JRE 6

    w7-64 machine created keystore and passwords and what not..can install to galaxy S and to nexus 7...w7-32 can install to galaxy S but can not install to nexus 7...

    keystore files (that i can find) were checked into svn by w7-64 machine...

    very frustrating and very much a show stopper
     
    Last edited: Dec 19, 2012
  28. wormy

    wormy

    Joined:
    Jan 2, 2013
    Posts:
    1