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

Will not receive push notifications in real time #2

Open
LipperLi opened this issue Sep 4, 2024 · 4 comments
Open

Will not receive push notifications in real time #2

LipperLi opened this issue Sep 4, 2024 · 4 comments
Assignees

Comments

@LipperLi
Copy link

LipperLi commented Sep 4, 2024

Hello, I've recently integrated FCM notifications in Electron and it's been a pleasure to use this new package you've developed, in the process of using it I've come across an issue where I won't receive real-time pushes, I listen to the NOTIFICATION_RECEIVED event but there won't be any notifications, but when I reopen it next time the previous notifications will come out of the NOTIFICATION_RECEIVED out, I'm not sure if it's a problem with my usage, but this has been bothering me for a long time and I'm looking forward to getting your help, thank you very much.

@rixcian
Copy link
Owner

rixcian commented Sep 5, 2024

Hello, thank you for using this package <3

Can you provide your repo/project or just a piece of code with demonstration how you use it?

Or you can try to debug it with Wireshark on your own.

  1. Install and open "Wireshark"
  2. Select the correct network interface (e.g. "Ethernet 3", "WiFi", etc.) you're connected to the Internet
  3. In the top search/filter bar type "tcp.port == 5228"
  4. Open your Electron application
  5. You should see traffic coming from/to "142.250.102.188" (mtalk.google.com) - this means you're correctly connected for receiving notifications
  6. When you send a notification to your Electron application, new packet with "Info" = "Application Data" should appear in the Wireshark

Here's a video demonstration of the debug process with Wireshark: https://streamable.com/h49mqa

If you have any other questions, don't hesitate to post them here. Thanks <3

@rixcian rixcian self-assigned this Sep 5, 2024
@goopterbiz
Copy link

We are having same problem as well.

  1. No notification received after running the app for a long time, then after restart the app, the previous push notifications are received;
  2. when the machine that runs the app changes to a different network (i.e. switch from one wifi to another one), it stops receiving notification, but the queued notifications can be received when switching back to the original network. Not sure if this is a bug to be fixed in this package or should be handled on app level.

@rixcian
Copy link
Owner

rixcian commented Oct 7, 2024

Thank you for a deeper debug, I'll look into it. ❤️

@rixcian
Copy link
Owner

rixcian commented Oct 8, 2024

Hey @goopterbiz and @LipperLi,

I released a new version (1.1.0), where the behavior described by @goopterbiz should be fixed.

Please update the package to the latest version and test it yourself. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants