MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
199 stars 75 forks source link

Notifications not received until reconnection due to ECONNRESET socket error #50

Open raine opened 3 years ago

raine commented 3 years ago

Hi,

I'm using push-receiver to listen to notifications from a service that uses expo.io to send notifications to iOS and Android clients. I have an iOS device receiving the same notifications at the same time and have noticed that often push-receiver does not immediately get the notification that appears on the iOS device.

I've set up some logging in client.js and enabled DEBUG statements in parser, and it appears the socket keeps reconnecting because of ECONNRESET error around every minute or so.

Any ideas? Thanks!

Debug log: fcm.log

marutichintan commented 2 years ago

Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -104, code: 'ECONNRESET', syscall: 'read' } i have check the log generally disconnect at after 1651 sec. is anything to do with linux ??