-
Notifications
You must be signed in to change notification settings - Fork 4k
🐛 [firebase_messaging] v8.0.0-dev.2 onMessage is fired twice #3991
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
@lazylazyllama |
True, but this issue is very old and is about the old firebase_messaging version. Which is weird, because the old version worked perfectly fine for me. I only experienced this issue specifically in the 8.0.0+ versions. |
@lazylazyllama which platform are you seeing this behavior on? |
Android |
Ok thanks, I'll try see if we can reproduce this. |
Please can you try |
I just tried it, but sadly the issue is still there |
Could you share your dart code? Thanks |
Hey @lazylazyllama. 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! |
I'll try to build a reproducible example within the next week. Sadly I'm very busy right now, and the codebase in which I encountered this problem is way to complicated to just upload it here .. considering business logic etc. Also while playing around a bit last week I was able to reproduce that this issue does not occur after I stripped down my application down to the very basics, so it's quite a complicated thing to figure out what actually is causing the problem. But I'll figure it out. I just can't say when I will find time. If this issue gets closed I'll just open a new one, as soon as I have a reproducible example :) |
@lazylazyllama I was facing this issue also, and realized via VSCode widget Inspector, that two instances of the same widgets were present in the widget tree (i.e. my home page), and each one of them was triggered by firebase messages. Maybe you're in a similar situation with your app. I had misconfigured my splash screen page to push my home page on top of my root page (which actually is my home page) and that was my mistake. Hope that helps |
@pureimpro actually this is exactly what was going on at my side aswell :O thank you very very much :) You saved quite a lot of time :) I was using a custom static method called I fixed it by adding a flag to check, if |
Bug report
Since I updated to firebase_messaging v8.0.0-dev.1 or dev.2 its the same..
onMessage
is fired twice, when I get a message.Steps to reproduce
Use the firebase_messaging example with v8.0.0 and receive a message.
Expected behavior
onMessage
should only be called once.The text was updated successfully, but these errors were encountered: