Unable to update Fdroid Client
Hello all. I am running Fdroid 0.95.1 and Android 2.3.7. I have been trying to upgrade to Fdroid v 0.96, or at least any of the alfas, but every time i try any Fdroid version newer than 0.95.1 it crashes when i tap the 'upgrade repos' button. Yes i have tried clearing the Fdroid data/cache, but to no avail. Here is the crash log. the crash is towards the bottom. http://paste.ubuntu.com/12437234/
Thanks! -Sydney
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Owner
It looks like this is the crash in question:
ntime(23452): FATAL EXCEPTION: main 09-16 22:46:29.580 E/AndroidRuntime(23452): java.lang.RuntimeException: Unable to create service org.fdroid.fdroid.UpdateService: java.lang.IllegalArgumentException: contentIntent required: pkg=org.fdroid.fdroid id=0 notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x2) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2076) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.ActivityThread.access$2500(ActivityThread.java:123) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.os.Handler.dispatchMessage(Handler.java:99) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.os.Looper.loop(Looper.java:130) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.ActivityThread.main(ActivityThread.java:3835) 09-16 22:46:29.580 E/AndroidRuntime(23452): at java.lang.reflect.Method.invokeNative(Native Method) 09-16 22:46:29.580 E/AndroidRuntime(23452): at java.lang.reflect.Method.invoke(Method.java:507) 09-16 22:46:29.580 E/AndroidRuntime(23452): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 09-16 22:46:29.580 E/AndroidRuntime(23452): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) 09-16 22:46:29.580 E/AndroidRuntime(23452): at dalvik.system.NativeStart.main(Native Method) 09-16 22:46:29.580 E/AndroidRuntime(23452): Caused by: java.lang.IllegalArgumentException: contentIntent required: pkg=org.fdroid.fdroid id=0 notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x2) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.os.Parcel.readException(Parcel.java:1326) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.os.Parcel.readException(Parcel.java:1276) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:274) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.NotificationManager.notify(NotificationManager.java:133) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.NotificationManager.notify(NotificationManager.java:104) 09-16 22:46:29.580 E/AndroidRuntime(23452): at org.fdroid.fdroid.UpdateService.onCreate(UpdateService.java:163) 09-16 22:46:29.580 E/AndroidRuntime(23452): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2066)
- username-removed-24982 Milestone changed to 0.97
Milestone changed to 0.97
- Owner
So this crash happens when running 0.96 or 0.95.1?
- Owner
Looks like its happening starting in 0.96, and its because of this bug: https://code.google.com/p/android/issues/detail?id=181655
I think it'll be a quick fix, then this should go into a v0.96.1. Basically, on Android older than
android-11
, this needs to be set to something: https://developer.android.com/reference/android/app/Notification.html#contentIntentEdited by username-removed-24982 - Author
@eighthave It happens when running 0.96. I have no issues with 0.95.1.
- Owner
Yes, this sounds like it's emportant enough on its own for a hotfix.
- username-removed-22388 Milestone changed to 0.96.1
Milestone changed to 0.96.1
- Owner
We could do a temporary workaround until NotificationCompat is fixed, like in https://stackoverflow.com/questions/20032249/is-setcontentintentpendingintent-required-in-notificationcompat-builder
But I'm wondering, why doesn't this happen with the other notifications we use, like the "there are updates available" one?
- Owner
yeah, that fix looks good.
- Owner
With the "updates available" notification, it has an Intent set since clicking on it takes you to FDroid.
- Owner
Turns out @pserwylo already fixed this in d672983a902cf2ab440ca84aa487dfe14c48aa4e. I'll backport the fix.
- Owner
@sydneyjd could you try 0.97-alpha3 and confirm that this is fixed there?
- Author
Ok, so i tried 0.97-alpha3 and i am able to update the Fdroid repos without it crashing. Everything seemed fine until i tried installing a program/s, then it crashes on me. http://paste.ubuntu.com/12547290/
Edited by username-removed-22388 - Owner
Looks like our DownloadManager code doesn't work on 2.3 if using HTTPS:
https://stackoverflow.com/questions/8106155/android-downloadmanager-and-ssl-https
Ping @tobykurien, do you think we could use a workaround for 2.3 and lower as suggested here? https://github.com/alvinsj/android-https-downloadmanager-demo
@sydneyjd thanks for confirming! Do not worry, the downloadmanager changes aren't in 0.96. I'll backport the fix for the notification and release 0.96.1 by this weekend. Apologies for the inconvenience.
- username-removed-22388 mentioned in issue #432 (closed)
mentioned in issue #432 (closed)
- Owner
@sydneyjd just released 0.96.1 with the backported fix, should be out within a day. I've opened #432 (closed) to make sure the https issue is fixed before 0.97 is released.
Thanks again for your help!
- username-removed-22388 Status changed to closed
Status changed to closed
- Author
Your welcome. :) Hopefully i can help with bug reports more.
@mvdan I don't think we should bother with using a work-around, I suggest simply change the
DownloaderFactory.canUseDownloadManager
to check forBuild.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD
instead- username-removed-210899 mentioned in issue #432 (closed)
mentioned in issue #432 (closed)
- Owner
0.96.1 was out a couple of days ago, everything should be fine now.
- Author
Works great!! Thanks guys!
- Owner
Thanks to you! And apologies for breaking stable :(