Comments (21)
Same issue as #44.
@bubuzzz Updating to node-apn 3.x will result in the library only being compatible with node 8.8.x+. Hence this should be considered rather carefully. Are there other known fixes for node-apn 2.x ? Like #55 ?
from node-pushnotifications.
Possible solutions:
- Use certs instead of tokens
- Use @jpike88 fork: https://github.com/streaka/node-pushnotifications-http2. It uses node-apn-http2 which is a young library inspired on node-apn. Don't know how it works. It requires node > 8.8.1+, otherwise it will break
Waiting for node-apn/node-apn#518 to be solved... Right now it seems there is no interest on solving it.
from node-pushnotifications.
@derwaldgeist We upgraded to a fork of node-apn that should be maintained more actively than the original one. I assume the issue is resolved until we hear otherwise :)
from node-pushnotifications.
Just a reminder that I have a fork of this repo running with node-apn-http2 builtin... running with zero issues. Considering this issue is still open and people are trying to modernize, feel free to use this instead. And of course, it requires node 8.8.1+.
@appfeel appears to be off the grid right now, so if anyone wants an alternative that is proven to work in production:
npm install node-pushnotifications-http2
https://github.com/streaka/node-pushnotifications-http2
from node-pushnotifications.
@jpike88 : I am using Lambda + node v8.10. I used node-pushnotifications-http2. However I am facing the same issue. Is it working for you?
from node-pushnotifications.
That fork I linked works with no issues.
from node-pushnotifications.
@jpike88 is it possible to adapt modifications to this plugin? could you point us where is the memory leak? Thanks!
from node-pushnotifications.
I still don't know exactly what the nature of the memory leak is, all I know is that the native version of http2 seems to have fixed it
from node-pushnotifications.
Hello good people,
I ran into similar issues, memory leaks with event emitters preventing my script from exiting, hence leading to issues when running the script multiple times
I was wondering if you had issues when running node-apn with a nodejs server that keeps running? Or does it happen when closing only?
from node-pushnotifications.
Any updates on this? The memory leaks are still present.
from node-pushnotifications.
If you want a quick fix use this
https://github.com/streaka/node-pushnotifications-http2
from node-pushnotifications.
@jpike88 Do you plan on catching up your fork and publishing?
from node-pushnotifications.
Nope, works like a charm in heavy production environments. ‘if it ain’t broke’...
If there’s a big incentive for me to upgrade it I’ll take a look but it handles iOS and Android notifications fine
from node-pushnotifications.
There have been many bug fixes and issues addressed since May-6 2017 (the date of the last merged commit in the -http2 fork). In particular for me, #58.
from node-pushnotifications.
@jpike88 can you please open issues for your fork?
from node-pushnotifications.
Done.
@miqmago The fork just uses the native http2 library bundled with node 8.8.1+, which seems to have eliminated the memory leak warning. Not sure how it works either, it was initially just an experiment but it's been on production for quite a while now, no issues.
from node-pushnotifications.
With version 1.2.0 we migrated to https://www.npmjs.com/package/@parse/node-apn which is an actively maintained fork of node-apn.
Does the memory leak still persist with the new release?
from node-pushnotifications.
good question! I'll move back to main branch now and see how it flies
from node-pushnotifications.
@jpike88 any update on this?
from node-pushnotifications.
Sorry, I've been too busy, I got part way in and then some business shit hit the fan and I haven't touched it since.
Feel free to give it a go... bear in mind that my fork only touched the library's code very lightly, I probably don't have any deeper understanding of the code than you.
from node-pushnotifications.
Has this already been resolved? I'm a bit confused because package.json
does in fact reference node-apn
version 3.1.0.
from node-pushnotifications.
Related Issues (20)
- Android GCM Weird behavior v1.6.2 HOT 8
- Getting `Mismatchsenderid` error with firebase token HOT 6
- sendAPN handling of received token in success case inconsistent with other cases and providers HOT 1
- error when using a long expiry (from firebase cloud messaging) HOT 1
- rich push notifications on Android: possible values for data.style?
- Question: Increase Badge by 1 for thousands of users HOT 1
- Deeplink seems not working HOT 2
- Support for data-only messages on Android HOT 3
- Cannot create PushNotification instance HOT 2
- Android High priority on silent push. HOT 5
- Update node-forge to fix security vulnerabilities HOT 3
- JSON value '<null>' of type NSNull cannot be converted to NSString
- Unclear how to specify API key for gcm/fcm HOT 2
- Open handles after sending an APN notification HOT 2
- why my apn notification is seen as webPush ? HOT 1
- retriedResults undefined HOT 1
- iOS Simulator Push Tokens incorrectly identified as GCM tokens HOT 4
- Not all users receive push notifications HOT 2
- apn write failed: GOAWAY: PROTOCOL_ERROR Stream 5 does not exist
- Update typescript definitions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-pushnotifications.