-
Notifications
You must be signed in to change notification settings - Fork 306
Dart SDK change breaks background notifications #1119
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
Comments
This makes a good example of why it'd be valuable for us to have end-to-end testing for notifications: |
gnprice
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Dec 9, 2024
Fixes zulip#1119. With Flutter from main, in release mode, the app would no longer show notifications on Android when it was in the background. This error message appears in logcat: ``` DartVM E ERROR: To access 'package:zulip/notifications/receive.dart::NotificationService' from native code, it must be annotated. ERROR: See https://github.com/dart-lang/sdk/blob/master/runtime/docs/compiler/aot/entry_point_pragma.md ``` It looks like the relevant upstream commit is probably this one: dart-lang/sdk@9b06e26 AFAICT those docs don't actually say that we should need to annotate the class. We already do annotate the static *method* on this class which we ask native code to call, namely `_onBackgroundMessage`. At least the error message is nice and clear, though.
shivanshsharma13
pushed a commit
to shivanshsharma13/zulip-flutter
that referenced
this issue
Dec 13, 2024
Fixes zulip#1119. With Flutter from main, in release mode, the app would no longer show notifications on Android when it was in the background. This error message appears in logcat: ``` DartVM E ERROR: To access 'package:zulip/notifications/receive.dart::NotificationService' from native code, it must be annotated. ERROR: See https://github.com/dart-lang/sdk/blob/master/runtime/docs/compiler/aot/entry_point_pragma.md ``` It looks like the relevant upstream commit is probably this one: dart-lang/sdk@9b06e26 AFAICT those docs don't actually say that we should need to annotate the class. We already do annotate the static *method* on this class which we ask native code to call, namely `_onBackgroundMessage`. At least the error message is nice and clear, though.
I have got the same issue on state restoration and adding the pragma on the class fixed the issue for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On upgrading to Flutter from current main, and running in release mode, the app no longer shows notifications on Android when it was in the background. This burst of error messages appears in logcat:
It looks like the relevant upstream commit is probably this one:
dart-lang/sdk@9b06e26
which is also the latest commit to touch that linked docs page.
AFAICT those docs don't actually say that we should need to annotate the class. We already do annotate the static method that we ask native code to call:
Well, at least the error message is nice and clear, though. We'll annotate the class too.
The text was updated successfully, but these errors were encountered: