🐛 [firebase_messaging] Notification is not displayed when in background
Bug report
In android release mode, when compiled with the following options:
flutter build apk --release --split-debug-info=/tmp/sym --tree-shake-icons
In background, app cannot display notifications but logs this error:
Dart Unhandled Exception: NoSuchMethodError: No top-level getter '_firebaseMessagingCallbackDispatcher' declared.
My workaround: @pragma('vm:entry-point') void _firebaseMessagingCallbackDispatcher()
Flutter doctor
Click To Expand
[✓] Flutter (Channel stable, 2.10.3, on Manjaro Linux 5.15.28-1-MANJARO, locale fr_FR.utf8)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
@cturn-dev
Does it also occur in debug mode too ? ie, flutter build apk --debug --split-debug-info=/tmp/sym --tree-shake-icons.
Also, can you try the same on latest master and see if issue still persists ?
Does it also occur in debug mode too ? ie,
flutter build apk --debug --split-debug-info=/tmp/sym --tree-shake-icons.
No
Also, can you try the same on latest master and see if issue still persists ?
Tried latest master, same issue
@cturn-dev Can you provide us a minimal reproducible code sample that we can use and run to verify this ?
It looks similar to https://github.com/FirebaseExtended/flutterfire/issues/8305. Are you sending a notification message or a data message ? Can you provide a sample payload you are sending ?
Hey @cturn-dev. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@cturn-dev if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.