erick2109 / auto-update-apk-client

Automatically exported from code.google.com/p/auto-update-apk-client
0 stars 0 forks source link

Parse Error #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When an update is available instead of installing the new package, the 
following error message appears:

Parse Error:
There is a problem parsing the package.

The notification works fine but after pressing "Select to Install" it fails. 
Installing the new package manually, either via the download link 
http://www.auto-update-apk.com/download/<app-name> or via eclipse, works fine.

Original issue reported on code.google.com by wisma...@gmail.com on 25 Jun 2012 at 4:46

GoogleCodeExporter commented 8 years ago
Logcat shows this:

V/AutoUpdateApk(17984): got a reply from update server
V/AutoUpdateApk(17984): got a package from update server
I/AutoUpdateApkActivity(17984): Got update!
V/AutoUpdateApk(17984): update check finished in 3354ms
V/AutoUpdateApk(17984): md5sum: 0e74ce208babf86c88c6200fb3191fe9
I/ActivityManager(  284): Starting: Intent { act=android.intent.action.VIEW 
dat=file:///data/data/<packageName>/files/<AppName>.apk 
typ=application/vnd.android.package-archive 
cmp=com.android.packageinstaller/.PackageInstallerActivity 
bnds=[0,327][480,423] } from pid -1
W/ActivityManager(  284): startActivity called from non-Activity context; 
forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { 
act=android.intent.action.VIEW 
dat=file:///data/data/<packageName>/files/<AppName>.apk 
typ=application/vnd.android.package-archive 
cmp=com.android.packageinstaller/.PackageInstallerActivity 
bnds=[0,327][480,423] }
W/PackageParser(17796): Skipping dir: 
/data/data/<packageName>/files/<AppName>.apk
W/PackageInstaller(17796): Parse error when parsing manifest. Discontinuing 
installation

I have no idea what should be wrong in the manifest. It works perfectly when 
installing normally.

Original comment by wisma...@gmail.com on 25 Jun 2012 at 8:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
could you please check if the original package has the same MD5 sum as shown in 
the log message?

also, it would be helpful to know, what kind of device and version of Android 
is used.

Original comment by lenik.terenin on 26 Jun 2012 at 12:37

GoogleCodeExporter commented 8 years ago
I think I just figured it out. I used whitespaces in the filename of the .apk 
file, this does not seem to work. The MD5 Sum was indeed correct though.

Thx anyway.

Original comment by wisma...@gmail.com on 26 Jun 2012 at 1:56

GoogleCodeExporter commented 8 years ago
Once there was a bug about whitespaces, it's supposed to be fixed now.

Please, make sure you're using the latest version of Android client source code.

Whitespaces should show up as %20 in the filenames on Android.

Original comment by lenik.terenin on 26 Jun 2012 at 5:46

GoogleCodeExporter commented 8 years ago
I just reproduced it again; I was using the latest version. Whitespaces are 
indeed replaced by %20 but that seemed to have caused that parsing error. 
Replacing the whitespaces with underscore solved the problem for me. 

Original comment by wisma...@gmail.com on 26 Jun 2012 at 10:37

GoogleCodeExporter commented 8 years ago
Thank you for detailed report, could you please also tell which android version 
do you use, since I've checked on ICS and %20 replacement worked fine. Then I 
can look into this issue more closely.

Original comment by lenik.terenin on 26 Jun 2012 at 1:07

GoogleCodeExporter commented 8 years ago
I'm using CyanogenMode-7.1.0 which is based on Android 2.3.7 on a HTC Desire.

Original comment by wisma...@gmail.com on 26 Jun 2012 at 2:01

GoogleCodeExporter commented 8 years ago
I have this problem too!

On my 2nd app, no problem, but my first one causes parsing issues while trying 
to update 

Original comment by markomar...@gmail.com on 27 Oct 2012 at 10:48

GoogleCodeExporter commented 8 years ago
Marko,

does your application by any chance have spaces or other funny characters in 
the file name?

Original comment by lenik.terenin on 27 Oct 2012 at 12:11

GoogleCodeExporter commented 8 years ago
No. But I fixed the issue.
After reinstalling the app, the problem is gone

Original comment by markomar...@gmail.com on 28 Oct 2012 at 11:20

GoogleCodeExporter commented 8 years ago
I'm still getting an error exception after the "parse error"-dialog:

java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:299)
        at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
        at java.util.concurrent.FutureTask.run(FutureTask.java:137)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
        at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.NullPointerException: println needs a message
        at android.util.Log.println_native(Native Method)
        at android.util.Log.e(Log.java:297)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk.log(AutoUpdateApk.java:499)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk.Log_e(AutoUpdateApk.java:483)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk.Log_e(AutoUpdateApk.java:482)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk$checkUpdateTask.doInBackground(AutoUpdateApk.java:330)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk$checkUpdateTask.doInBackground(AutoUpdateApk.java:1)
        at android.os.AsyncTask$2.call(AsyncTask.java:287)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
        ... 4 more
java.lang.NullPointerException: println needs a message
        at android.util.Log.println_native(Native Method)
        at android.util.Log.e(Log.java:297)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk.log(AutoUpdateApk.java:499)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk.Log_e(AutoUpdateApk.java:483)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk.Log_e(AutoUpdateApk.java:482)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk$checkUpdateTask.doInBackground(AutoUpdateApk.java:330)
        at de.dab_server.zugarchiv.utils.AutoUpdateApk$checkUpdateTask.doInBackground(AutoUpdateApk.java:1)
        at android.os.AsyncTask$2.call(AsyncTask.java:287)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
        at java.util.concurrent.FutureTask.run(FutureTask.java:137)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
        at java.lang.Thread.run(Thread.java:856)

LogCat:
--------- beginning of /dev/log/main
03-13 14:21:53.145 D/dalvikvm(26247): Late-enabling CheckJNI
03-13 14:21:53.185 I/dalvikvm(26247): Turning on JNI app bug workarounds for 
target SDK version 10...
--------- beginning of /dev/log/system
03-13 14:21:53.240 W/ActivityThread(26247): Application de.dab_server.zugarchiv 
can be debugged on port 8100...
03-13 14:21:53.280 D/ACRA    (26247): ACRA is enabled for 
de.dab_server.zugarchiv, intializing...
03-13 14:21:53.300 D/ACRA    (26247): Using default Report Fields
03-13 14:21:53.300 D/ACRA    (26247): Looking for error files in 
/data/data/de.dab_server.zugarchiv/files
03-13 14:21:53.300 D/ACRA    (26247): Looking for error files in 
/data/data/de.dab_server.zugarchiv/files
03-13 14:21:53.315 V/MyBackupAgent(26247): onCreate()
03-13 14:21:53.320 V/BackupServiceBinder(26247): doBackup() invoked
03-13 14:21:53.325 D/BackupHelperDispatcher(26247): handling existing helper 
'Zugarchiv' de.dab_server.zugarchiv.MyBackupAgent$DbBackupHelper@41fd8b68
03-13 14:21:53.325 D/BackupHelperDispatcher(26247): handling existing helper 
'default_prefs' android.app.backup.SharedPreferencesBackupHelper@41fd8548
03-13 14:28:01.195 D/dalvikvm(29057): Late-enabling CheckJNI
03-13 14:28:01.255 I/dalvikvm(29057): Turning on JNI app bug workarounds for 
target SDK version 10...
03-13 14:28:01.355 W/ActivityThread(29057): Application de.dab_server.zugarchiv 
can be debugged on port 8100...
03-13 14:28:01.440 D/ACRA    (29057): ACRA is enabled for 
de.dab_server.zugarchiv, intializing...
03-13 14:28:01.465 D/ACRA    (29057): Using default Report Fields
03-13 14:28:01.470 D/ACRA    (29057): Looking for error files in 
/data/data/de.dab_server.zugarchiv/files
03-13 14:28:01.470 D/ACRA    (29057): Looking for error files in 
/data/data/de.dab_server.zugarchiv/files
03-13 14:28:01.800 D/dalvikvm(29057): GC_FOR_ALLOC freed 200K, 6% free 
12235K/12999K, paused 33ms, total 33ms
03-13 14:28:01.805 I/dalvikvm-heap(29057): Grow heap (frag case) to 13.765MB 
for 1334016-byte allocation
03-13 14:28:01.820 D/dalvikvm(29057): GC_CONCURRENT freed 1K, 6% free 
13537K/14343K, paused 2ms+2ms, total 15ms
03-13 14:28:01.855 D/dalvikvm(29057): GC_FOR_ALLOC freed 0K, 6% free 
13537K/14343K, paused 14ms, total 14ms
03-13 14:28:01.875 I/dalvikvm-heap(29057): Grow heap (frag case) to 18.852MB 
for 5336016-byte allocation
03-13 14:28:01.895 D/dalvikvm(29057): GC_CONCURRENT freed 0K, 5% free 
18748K/19591K, paused 3ms+1ms, total 20ms
03-13 14:28:01.895 D/dalvikvm(29057): WAIT_FOR_CONCURRENT_GC blocked 3ms
03-13 14:28:03.875 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:04.030 D/Version.Check(29057): Dev: true; R: true,F: false
03-13 14:28:04.030 V/Settings(29057): default_br: 
03-13 14:28:05.385 D/Version.Check(29057): Dev: true; R: true,F: false
03-13 14:28:06.370 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:06.450 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:06.530 D/dalvikvm(29057): GC_FOR_ALLOC freed 1770K, 12% free 
18863K/21255K, paused 42ms, total 42ms
03-13 14:28:07.815 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:08.910 V/AutoUpdateApk(29057): got a reply from update server
03-13 14:28:09.890 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:09.890 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:10.500 V/AutoUpdateApk(29057): got a package from update server
03-13 14:28:10.765 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:11.905 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:11.905 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:12.590 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:12.860 V/AutoUpdateApk(29057): got a reply from update server
03-13 14:28:13.565 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:13.570 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:14.565 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:15.565 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:15.570 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:16.220 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:17.030 V/AutoUpdateApk(29057): got a package from update server
03-13 14:28:17.200 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:17.205 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:17.865 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:17.930 D/dalvikvm(29057): GC_CONCURRENT freed 632K, 6% free 
20194K/21447K, paused 12ms+8ms, total 42ms
03-13 14:28:17.935 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:17.940 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@427dd6c0
03-13 14:28:17.945 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:17.945 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@427b1b18
03-13 14:28:17.950 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:17.950 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@427539f8
03-13 14:28:17.950 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:17.950 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@420b4040
03-13 14:28:17.955 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:17.955 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@420f3b68
03-13 14:28:18.730 V/AutoUpdateApk(29057): got a reply from update server
03-13 14:28:18.945 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:18.945 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:19.565 V/AutoUpdateApk(29057): checking if there's update on the 
server
03-13 14:28:21.770 E/AutoUpdateApk(29057): Connect to .. timed out
03-13 14:28:21.775 V/AutoUpdateApk(29057): update check finished in 9184ms
03-13 14:28:21.775 V/AutoUpdateApk(29057): no reply from update server
03-13 14:28:24.495 V/OptionMenu(29057): Mehr => do nothing...
03-13 14:28:24.495 D/AbsListView(29057): Get MotionRecognitionManager
03-13 14:28:24.805 E/AutoUpdateApk(29057): Connect to .. timed out
03-13 14:28:24.805 V/AutoUpdateApk(29057): update check finished in 3030ms
03-13 14:28:24.805 V/AutoUpdateApk(29057): no reply from update server
03-13 14:28:25.100 V/AutoUpdateApk(29057): got a reply from update server
03-13 14:28:26.005 V/AutoUpdateApk(29057): got a reply from update server
03-13 14:28:29.475 V/AutoUpdateApk(29057): got a package from update server
03-13 14:28:30.890 D/dalvikvm(29057): GC_FOR_ALLOC freed 980K, 8% free 
20963K/22727K, paused 31ms, total 31ms
03-13 14:28:30.890 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:30.895 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@427ef0b0
03-13 14:28:30.895 D/AbsListView(29057): [unregisterDoubleTapMotionListener]
03-13 14:28:30.895 I/MotionRecognitionManager(29057):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@420cec30
03-13 14:28:31.335 V/AutoUpdateApk(29057): got a package from update server
03-13 14:28:31.500 D/Version.Check(29057): Dev: true; R: true,F: false
03-13 14:28:31.850 V/AutoUpdateApk(29057): got a reply from update server
03-13 14:28:32.290 I/Choreographer(29057): Skipped 35 frames!  The application 
may be doing too much work on its main thread.
03-13 14:28:33.025 V/AutoUpdateApk(29057): update check finished in 25206ms
03-13 14:28:33.125 V/AutoUpdateApk(29057): md5sum: 
7683b86c7f3122f4fd8fcc20b40f24c8
03-13 14:28:39.370 V/AutoUpdateApk(29057): update check finished in 14564ms
03-13 14:28:39.370 W/dalvikvm(29057): threadid=15: thread exiting with uncaught 
exception (group=0x413442a0)
03-13 14:28:39.375 E/ACRA    (29057): ACRA caught a RuntimeException exception 
for de.dab_server.zugarchiv. Building report.
03-13 14:28:40.375 I/ACRA    (29057): READ_LOGS granted! ACRA can include 
LogCat and DropBox data.
03-13 14:28:40.400 D/ACRA    (29057): Retrieving logcat output...

Original comment by i...@daniel-baran.de on 13 Mar 2013 at 1:39

GoogleCodeExporter commented 8 years ago
Daniel,

> 03-13 14:28:10.500 V/AutoUpdateApk(29057): got a package from update server
> 03-13 14:28:10.765 V/AutoUpdateApk(29057): checking if there's update on the 
server
> 03-13 14:28:24.805 V/AutoUpdateApk(29057): update check finished in 3030ms
> 03-13 14:28:24.805 V/AutoUpdateApk(29057): no reply from update server
> 03-13 14:28:25.100 V/AutoUpdateApk(29057): got a reply from update server
> 03-13 14:28:26.005 V/AutoUpdateApk(29057): got a reply from update server
> 03-13 14:28:29.475 V/AutoUpdateApk(29057): got a package from update server

this looks very strange, like several different threads are trying to get 
updates at the same time. could you please check you have instantiated the 
AutoUpdateAPK class preferably in Application subclass or in Activity that has 
only one copy running at the same time?

Original comment by lenik.terenin on 14 Mar 2013 at 6:36

GoogleCodeExporter commented 8 years ago
In Launcher-Class I initialized the updater. I want to start the Updater 
manually from the context-menü. What can I do to check, if an Update-check is 
already running? aua.updateRunning()?

    private AutoUpdateApk aua;

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
[...]
        // Updater
        aua = new AutoUpdateApk(getApplicationContext());
        aua.setIcon(R.drawable.ic_update);
        aua.enableMobileUpdates();
}
[...]
public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case R.id.iUpdate:
            aua.checkUpdatesManually();
            break;
[...]

Original comment by i...@daniel-baran.de on 18 Mar 2013 at 12:07

GoogleCodeExporter commented 8 years ago
What was the resolution for this error?  I am getting the same behavior but I 
don't see a resolution in this thread. 

Thanks,
Matt

Original comment by maswaf...@gmail.com on 19 Jul 2014 at 10:19

GoogleCodeExporter commented 8 years ago
Matt,

please check to see if your .apk file name contains spaces and other funny 
characters besides [A-Za-z0-9_.] ? Replacing spaces with underscores should fix 
the problem. Otherwise, please, tell us the Android version you're using?

Original comment by lenik.terenin on 20 Jul 2014 at 12:49

GoogleCodeExporter commented 8 years ago
Hello,
I have the same problem which says "There is a problem parsing the package". I 
get this error after i select the notification which is been triggered. There 
are no blank spaces or unwanted characters in the file name. Sometimes i get 
this error only for the first time after i install the application, but works 
well from the second time. Any workaround for this would be of great help.
I am testing in android 4.0.4.

Thanks in advance.

Original comment by nikhil.e...@gmail.com on 1 Dec 2014 at 4:04