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

onBackgroundEventReceived is called when app goes in foreground #1802

Open
1 task done
flodaniel opened this issue Dec 4, 2023 · 3 comments
Open
1 task done

onBackgroundEventReceived is called when app goes in foreground #1802

flodaniel opened this issue Dec 4, 2023 · 3 comments
Labels
bug Something isn't working Stale

Comments

@flodaniel
Copy link
Contributor

Which packages are you using?

stream_chat_flutter, stream_chat_persistance, stream_chat_localizations

On what platforms did you experience the issue?

Android

What version are you using?

stream_chat_flutter: 6.12.0
stream_chat_localizations: 5.12.0
stream_chat_persistence: 6.10.0

What happened?

I receive a message.new event in onBackgroundEventReceived when i should not as the app is in foreground.
I also receive old message.new events, so that even if i have the chat view open, seeing a message from another user, as soon as the app goes to the background, i get the message.new event from that message.

Steps to reproduce

1. Go to the chat view
2. Receive a message from another user
3. Background and foreground the app
4. Message.new event is received even though the app is in foreground.

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@flodaniel flodaniel added the bug Something isn't working label Dec 4, 2023
@flodaniel
Copy link
Contributor Author

Just noticed that version 7 was published today. Sadly still reproducable on v7.

@flodaniel
Copy link
Contributor Author

We used the onBackgroundEventReceived to show push notifications for the time where the app was in the background but the websocket was still connected. I am not certain what changed, but the push notifications now show either way. This means this bug is no longer blocking for is.

I would still consider it a bug as onBackgroundEventReceived should only receive those events that are coming in while the app is in the background.

Copy link

This issue is stale because it has been open for 20 days with no activity.

@github-actions github-actions bot added the Stale label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant