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

[firebase_messaging] onBackgroundMessage stops triggering after app restart. #1709

Closed
Eddydpyl opened this issue Dec 23, 2019 · 2 comments
Closed
Labels
type: bug Something isn't working

Comments

@Eddydpyl
Copy link

Describe the bug
On Android, when the application is first launched and then closed, so as to test that onBackgroundMessage is indeed called when a data message is sent, everything works fine. After the application is opened a second time (and therefore the configure method is also called a second time), then closed once again, onBackgroundMessage is never again triggered.

To Reproduce
Steps to reproduce the behavior:

  1. Open an application with firebase messaging configured to handle background data messages.
  2. Close the application and send a data message, everything works fine.
  3. Open the application once again, and then close it.
  4. Send another data message, it won't be received.

Additional context

  • This has been tested both on a Moto G5 plus real device, and in a Nexus 5X emulator.
  • Firebase messaging is configured in the initState method of a Widget, every time the app launches.
  • No errors appear to be thrown, though I might have missed it (the abnormal behavior happens when the app is no longer connected to my PC after all).
@Eddydpyl Eddydpyl added the type: bug Something isn't working label Dec 23, 2019
@Eddydpyl
Copy link
Author

Flutter doctor output:

[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.535], locale en-150)
• Flutter version 1.9.1+hotfix.6 at D:\Programs\flutter
• Framework revision 68587a0916 (3 months ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at D:\Programs\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

@iapicca
Copy link

iapicca commented Dec 27, 2019

Hi @Eddydpyl
I see there's an open issue addressing the case you described.
Please follow up on that issue,
I'm closing the current one as duplicate.
If you disagree please write in the comments
and I will reopen it.
Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants