Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification delayed after upgrading flutter_local_notifications with desugaring from Google Play Store #162

Closed
iqfareez opened this issue Dec 3, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@iqfareez
Copy link
Member

iqfareez commented Dec 3, 2022

Background

In September, I upgraded flutter_local_notifications package to its latest (version 11.0.0) from version 9.9.0 and released the app in September Update.

Not long after that, I received an email from crashlytics alerting me about a trending issue causes by FlutterLocalNotificationsPlugin.java. Also, one user complained about the notification getting delayed on his/her phone. This issue is recorded in #142

What went wrong is, version 10.0.0 of the plugin's has switched the implementation of zonedSchedule() to using desugaring instead of the ThreeTen Android Backport library. There are required steps that I should make in Android Setup but I missed that.

Because I didn't have much time to make changes and test it out, I reverted this app to its previous version and republish the hotfix.

...

In November, I make another attempt to upgrade the plugin to its latest release, version 12.0.3. This time I did not forgot to read the README and add missing requirement to Gradle file etc. I published a pre-release version to test it out to see if issue in #142 reoccur again.

Fortunately, no issues were found during the testing, Notification & azan is working like charms. So, I'm confident enough to make a new production release on the Google Play Store. [View releases]

I downloaded the app from Google Play Store. However, since yesterday, I noticed that sometimes the notification is delayed by a few minutes (just like what happened in #142). I'm so confused (and flabbergasted) because the delay doesn't happen, not even once while testing. Surprisingly, no users have reported anything to me.

Triage report

I downloaded the same releases (.apk) from GitHub while keeping the app from Play Store side by side. (Had to use APK Editor to change the package name so it doesn't cause conflict)

Version 2.7.1
Time notification should appear: 7.03 pm
Device: Redmi Note 11
Android version: 11

The time on the top displays when the notification is showing

Sideload APK Play Store
IMG_20221203_191239.jpg Screenshot_2022-12-03-19-06-42-559_com.miui.home.jpg

We can see that the sideloaded is OK ✅ while the Play Store app is NOT OK ❌

Since this doesn't happen in previous release, I blame the desugaring migration of the plugin.

But things are getting more confusing when I ran this test on another device, YES Altitude 4, running Android 11. I installed the Play Store version, but it works as expected (the azan was on time).

Conclusion

To reproduce this issue, you:

There are several issues on notification delayed on other phones, as reported in #115 etc. But those issues were not reproduced by me. So I'm not sure those issues are related to this one or not.

@iqfareez iqfareez added the bug Something isn't working label Dec 3, 2022
@iqfareez iqfareez changed the title Notification delayed after upgrading to fln v12 Notification delayed after upgrading to flutter_local_notifications to v12 Dec 3, 2022
@iqfareez iqfareez changed the title Notification delayed after upgrading to flutter_local_notifications to v12 Notification delayed after upgrading flutter_local_notifications with desugaring from Google Play Store Dec 3, 2022
@iqfareez
Copy link
Member Author

iqfareez commented Dec 5, 2022

Looks like this issue has been solved by itself (Alhamdulillah). Idk. After I uninstalling and reinstalling the app from the Google Play Store (even though I already did the same for a few times before that), the notification is shown on time (I was shocked and relieved at the same time). Closing for now, and hopefully all notification issues like in #131, #115, #113 and many more will be resolved (Inshallah).

@iqfareez iqfareez closed this as completed Dec 5, 2022
@iqfareez
Copy link
Member Author

iqfareez commented Dec 5, 2022

Looks like this issue has been solved by itself (Alhamdulillah). Idk. After I uninstalling and reinstalling the app from the Google Play Store (even though I already did the same for a few times before that), the notification is shown on time (I was shocked and relieved at the same time). Closing for now, and hopefully all notification issues like in #131, #115, #113 and many more will be resolved (Inshallah).

@iqfareez iqfareez closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant