alemures / gcm-xmpp Goto Github PK
View Code? Open in Web Editor NEWConnects to GCM servers using a XMPP protocol
Connects to GCM servers using a XMPP protocol
I was getting ECONNRESET for a long time and didn't know from which module.
Then I added "longjohn" (http://npmjs.com/longjohn) in project and got this:
Error: read ECONNRESET at exports._errnoException (util.js:1007:11)
at TLSWrap.onread (net.js:563:26)
---------------------------------------------
at Client._addListeners (/home//node_modules/gcm-xmpp/lib/Client.js:155:19)
at Client.connect (/home//node_modules/gcm-xmpp/lib/Client.js:128:8)
at new PushHelper (/home//modules/PushHelper.js:86:17)
at Function.PushHelper.instance (/home//modules/PushHelper.js:95:21)
at new module.exports (/home//modules/API.js:84:31)
at Function.API.instance (/home//modules/API.js:123:21)
at /home//modules/nodeRPC.js:37:19
I suppose, gcm-xmpp doesn't handle "error" event somewhere.
At least I had same issue with websocket implementation and solved by this:
socket.on('error', function(event) {
if ('ECONNRESET' != event.code) {
// log error
}
});
Also not sure will gcm-xmpp send push notification again if this error happened.
If not - I think it should, else notification will be lost.
GCM was deprecated and no longer works, we should upgrade this tool to work with FCM.
https://developers.google.com/cloud-messaging
https://firebase.google.com/docs/cloud-messaging/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.