Closed amangeot closed 6 years ago
Hello @amangeot , it could be related to #70. Btw. your APN settings are not quite correct, due to a mistake I made in the README, which has since been corrected.
The production
key should be outside the token
object.
apn: {
token: {
key: './src/pushNotifications/certificates/APNsAuthKey_KEYID.p8',
keyId: 'KEYID',
teamId: 'TEAMID',
},
production: __PROD__,
}
Thank you, I'll update my settings.
Regarding node-apn v3 I'm not in a big hurry to update my node versions as we run multiple projects and all sort of unexpected things may happen though that's one way to go!
I ran the script on my machine, and the script will not exit after finishing. I received these errors which I suspect come from this package but I also have a database connection using pg-promise
:
(node:13712) Warning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit
(node:13712) Warning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit
Do you know if we should force closing the application with process.exit(0) or something similar to kill / close the push notifications tooling?
Duplicate of https://github.com/appfeel/node-pushnotifications/issues/70, please reopen if it's not.
Possible solutions:
Waiting for https://github.com/node-apn/node-apn/issues/518 to be solved...
I am facing the exact issue in version 2.2.0
.
(node:12020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit (node:12020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit (node:12020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit (node:12020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit (node:12020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit (node:12020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit
Please reffer to #70
Hello, I'm running a job every hour that sends weather alerts to our users when necessary. When using token instead of certificates for APN authentication, the memory is not released after running the job:
Here are my settings for token authentication. This was pushed in production where I wrote "Token" on the screenshot above. "Restart" simply is a restart of the server.
This is running v1.0.21, on Amazon Linux AMI release 2017.03, with node v6.11.2
I'm not sure if I'm misusing the package or there are some memory leaks.
Thank you for releasing this package,