oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
320 stars 521 forks source link

WorkManager needs to be updated to at least 2.7.0 to start working on SDK 31 #4751

Open BenHenning opened 1 year ago

BenHenning commented 1 year ago

The investigation into #4750 revealed that our current version of WorkManager (2.4.0) doesn't work on SDK 31 due to changes in PendingIntent policy. 2.7.0 does work, however it requires updating to Kotlin 1.5.0 SDKs which affect the app more broadly than simply updating the work manager dependencies. Also, for reasons I'm not fully sure of, AndroidX work started depending on Kotlin coroutines jvm (instead of just Android), which leads to an issue with Android desugaring (since it depends on sun.misc classes that don't exist in the Android world). I have fixes for these, but I'll probably wait to introduce them until migrating to Kotlin 1.6 (or even 1.7).

seanlip commented 1 year ago

Possibly related: it looks like 86.6% of our current crashes are arising due to java.lang.IllegalArgumentException in android.app.PendingIntent.checkFlags. This affects the current version of the app as well as the two prior versions.

BenHenning commented 1 year ago

It's odd that it's affecting those versions since we're supposed to be disabling WorkManager on newer versions of Android. These might not be user-facing crashes, but it's worth reprioritizing this, anyway. It does, however, block on updating Kotlin so it may be a few weeks before we can address this.