GLBasic forum

Main forum => GLBasic - en => Topic started by: msx on 2011-Oct-26

Title: "Package file was not signed correctly" when installing from Market
Post by: msx on 2011-Oct-26
My app throws an error in signature when I install it from Market. The signing process is done correctly because I do not get any errors but I can not install it.

Any ideas?.  :zzz:
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: MrTAToad on 2011-Oct-27
You would probably need to watch the Android log file whilst trying to install, but it sounds like the jarsigner program created a corrupt xml file (possibly somewhere in the res/ directory).
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: msx on 2011-Oct-29
This is the LOG

Code (glbasic) Select
10-29 11:45:22.480: INFO/wpa_supplicant(618): CTRL-EVENT-SCAN-RESULTS  Ready
10-29 11:45:22.530: INFO/ActivityManager(541): Starting: Intent { dat=file:///mnt/sdcard/download/glbasic-release-market.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } from pid 1166
10-29 11:45:22.780: DEBUG/dalvikvm(1838): GC_EXPLICIT freed 8K, 54% free 2505K/5379K, external 0K/0K, paused 156ms
10-29 11:45:22.880: INFO/ActivityManager(541): Displayed com.android.packageinstaller/.InstallAppProgress: +313ms
10-29 11:45:23.050: WARN/ActivityManager(541): No content provider found for:
10-29 11:45:23.060: DEBUG/VoldCmdListener(171): asec list
10-29 11:45:23.070: INFO/PackageHelper(1838): Size of container 5 MB 4079645 bytes
10-29 11:45:23.070: DEBUG/VoldCmdListener(171): asec create smdl2tmp1 5 fat {} 10019
10-29 11:45:23.170: INFO//system/bin/newfs_msdos(171): /system/bin/newfs_msdos: warning, /dev/block/dm-1 is not a character device
10-29 11:45:23.170: INFO//system/bin/newfs_msdos(171): /system/bin/newfs_msdos: Skipping mount checks
10-29 11:45:23.170: INFO//system/bin/newfs_msdos(171): Bogus heads from kernel - setting sane value
10-29 11:45:23.170: INFO//system/bin/newfs_msdos(171): Bogus sectors from kernel - setting sane value
10-29 11:45:23.170: INFO//system/bin/newfs_msdos(171): /dev/block/dm-1: 10400 sectors in 1300 FAT32 clusters (4096 bytes/cluster)
10-29 11:45:23.170: INFO//system/bin/newfs_msdos(171): bps=512 spc=8 res=32 nft=2 sec=10458 mid=0xf0 spt=63 hds=64 hid=0 bspf=11 rdcl=2 infs=1 bkbs=2
10-29 11:45:23.180: INFO/Vold(171): Filesystem formatted OK
10-29 11:45:23.180: DEBUG/VoldCmdListener(171): asec path smdl2tmp1
10-29 11:45:23.190: INFO/PackageHelper(1838): Created secure container smdl2tmp1 at /mnt/asec/smdl2tmp1
10-29 11:45:23.190: INFO/DefContainer(1838): Created container for smdl2tmp1 at path : /mnt/asec/smdl2tmp1
10-29 11:45:24.270: INFO/DefContainer(1838): Copied /mnt/sdcard/download/glbasic-release-market.apk to /mnt/asec/smdl2tmp1/pkg.apk
10-29 11:45:24.270: DEBUG/VoldCmdListener(171): asec finalize smdl2tmp1
10-29 11:45:24.280: INFO/DefContainer(1838): Finalized container smdl2tmp1
10-29 11:45:24.280: INFO/DefContainer(1838): Unmounting smdl2tmp1 at path /mnt/asec/smdl2tmp1
10-29 11:45:24.320: DEBUG/dalvikvm(1838): GC_EXPLICIT freed 42K, 54% free 2512K/5379K, external 0K/0K, paused 42ms
10-29 11:45:24.420: DEBUG/dalvikvm(541): GC_EXPLICIT freed 90K, 47% free 5046K/9351K, external 35K/547K, paused 98ms
10-29 11:45:24.420: DEBUG/VoldCmdListener(171): asec unmount smdl2tmp1 force
10-29 11:45:24.450: WARN/ActivityManager(541): No content provider found for:
10-29 11:45:24.460: DEBUG/VoldCmdListener(171): asec mount smdl2tmp1 {} 1000
10-29 11:45:24.550: DEBUG/VoldCmdListener(171): asec path smdl2tmp1
10-29 11:45:24.560: DEBUG/PackageParser(541): Scanning package: /mnt/asec/smdl2tmp1/pkg.apk
10-29 11:45:24.630: WARN/PackageParser(541): Exception reading res/drawable/icon.png in /mnt/asec/smdl2tmp1/pkg.apk
10-29 11:45:24.630: WARN/PackageParser(541): java.lang.SecurityException: META-INF/ANDROID_.SF has invalid digest for lib/armeabi/libSDL_mixer.so in /mnt/asec/smdl2tmp1/pkg.apk
10-29 11:45:24.630: WARN/PackageParser(541):     at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:130)
10-29 11:45:24.630: WARN/PackageParser(541):     at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:357)
10-29 11:45:24.630: WARN/PackageParser(541):     at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)
10-29 11:45:24.630: WARN/PackageParser(541):     at java.util.jar.JarFile.getInputStream(JarFile.java:389)
10-29 11:45:24.630: WARN/PackageParser(541):     at android.content.pm.PackageParser.loadCertificates(PackageParser.java:369)
10-29 11:45:24.630: WARN/PackageParser(541):     at android.content.pm.PackageParser.collectCertificates(PackageParser.java:540)
10-29 11:45:24.630: WARN/PackageParser(541):     at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:6144)
10-29 11:45:24.630: WARN/PackageParser(541):     at com.android.server.PackageManagerService.access$2300(PackageManagerService.java:143)
10-29 11:45:24.630: WARN/PackageParser(541):     at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4829)
10-29 11:45:24.630: WARN/PackageParser(541):     at android.os.Handler.handleCallback(Handler.java:587)
10-29 11:45:24.630: WARN/PackageParser(541):     at android.os.Handler.dispatchMessage(Handler.java:92)
10-29 11:45:24.630: WARN/PackageParser(541):     at android.os.Looper.loop(Looper.java:130)
10-29 11:45:24.630: WARN/PackageParser(541):     at android.os.HandlerThread.run(HandlerThread.java:60)
10-29 11:45:24.630: ERROR/PackageParser(541): Package com.yourcompany.prueba2 has no certificates at entry res/drawable/icon.png; ignoring!
10-29 11:45:24.630: INFO/PackageHelper(541): Forcibly destroying container smdl2tmp1
10-29 11:45:24.720: DEBUG/dalvikvm(541): GC_EXPLICIT freed 164K, 46% free 5063K/9351K, external 35K/547K, paused 94ms
10-29 11:45:24.730: DEBUG/VoldCmdListener(171): asec destroy smdl2tmp1 force
10-29 11:45:24.860: DEBUG/dalvikvm(541): GC_EXPLICIT freed 27K, 47% free 5044K/9351K, external 35K/547K, paused 87ms
10-29 11:45:27.940: DEBUG/dalvikvm(1273): GC_EXPLICIT freed 9K, 54% free 2521K/5379K, external 0K/0K, paused 53ms
10-29 11:45:32.970: DEBUG/dalvikvm(1309): GC_EXPLICIT freed 83K, 53% free 2744K/5767K, external 923K/1188K, paused 79ms
10-29 11:45:34.420: INFO/InstallAppProgress(1166): Finished installing com.yourcompany.prueba2
10-29 11:45:38.979: INFO/wpa_supplicant(618): CTRL-EVENT-SCAN-RESULTS  Ready
10-29 11:45:44.060: DEBUG/dalvikvm(1536): GC_EXPLICIT freed 5K, 50% free 2997K/5959K, external 2164K/2469K, paused 67ms
10-29 11:45:49.060: DEBUG/dalvikvm(1166): GC_EXPLICIT freed 117K, 52% free 2655K/5511K, external 916K/1136K, paused 59ms
10-29 11:45:54.050: DEBUG/dalvikvm(962): GC_EXPLICIT freed 47K, 53% free 2564K/5379K, external 0K/0K, paused 53ms
10-29 11:45:55.490: INFO/wpa_supplicant(618): CTRL-EVENT-SCAN-RESULTS  Ready


I tried in every way and always the same. If I remove "icon.png" error appears elsewhere.   :rant:
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: MrTAToad on 2011-Oct-29
What JDK are you using ?
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: msx on 2011-Oct-29
I'm using JDK v. 1.7.0.
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: MrTAToad on 2011-Oct-29
Ahh - apparently that causes packaging problems :)
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: msx on 2011-Oct-29
Oh my good  :rant:
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: msx on 2011-Oct-31
You were right. The latest version of JDK is problematic to sign. Works well with the previous version.

Thank you  :nw:
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: bigsofty on 2011-Oct-31
Handy advice.

People will probably download the latest JDK version, as I did too, maybe this should be made a sticky while the 1.6 JDK is a pre-requisite for signing?
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: Hatonastick on 2011-Oct-31
Oh... I'm using the latest too.  Not that I've had to sign anything yet, but still.  Time to download the previous version then.
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: Kitty Hello on 2011-Oct-31
What box did I open with this stupid Android devices...  :|
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: msx on 2011-Oct-31
Pandora's box!  :rant:
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: Crivens on 2011-Oct-31
Heh, yeah, it's bad enough with multiple iDevices, but Android is a whole massive list of different hardware and OS configurations. Sucks considering it's massive now.

Cheers
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: Hatonastick on 2011-Oct-31
*shrug* I'm probably the only person here then who actually prefers Android.  I certainly have more interest in programming for it than iDevices.  :|  Plus the only iDevice I have sits around unused while my two Android devices get played with the most.  I just hope that whatever issues there are can be ironed out.
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: MrTAToad on 2011-Oct-31
The good thing about Android is that its cheaper to develop for...
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: Crivens on 2011-Oct-31
Not as cheap as WebOS!  >:D :whip:

Cheers
Title: Re: "Package file was not signed correctly" when installing from Market
Post by: MrTAToad on 2011-Nov-01
Quite true ! :-*