Socket hang up, have tested all certificates and device tokens for APN
See original GitHub issueOk, I feel like we are so close here, but end up with socket hang up. I have tested the certificates using openssl on the command line, and manually sent a notification to my phone using the device token obtained looking at the output of Push.debug = true
. On the logs, it is claiming Push: APN configured
. It seems like everything should be in the clear, but when I call a test push from the server with the code:
Push.send({
from: 'push',
title: 'Hello',
text: 'World',
query: {},
});
Debug output seems promising
Push: Sent message "Hello" to 1 ios apps 0 android apps
Then there is a socket hang up,
Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1054:19)
at TLSSocket.g (events.js:260:16)
at emitNone (events.js:72:20)
at TLSSocket.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:923:12)
at nextTickCallbackWith2Args (node.js:458:9)
at process._tickCallback (node.js:372:17)
It would seem there is an issue calling the APN server, I’ve double checked to ensure the production/development mismatch is not an issue as well. The app is deployed on a Digital Ocean droplet using mup. This has been royally frustrating, and I greatly appreciate any insight.
Issue Analytics
- State:
- Created 7 years ago
- Comments:29 (2 by maintainers)
Same problem here. Certificates still valid and was working without any problems. From one day to another, it broke. Using DigitalOcean too.
@raix anyway not to take the whole server down if a certificate expires? Maybe use
try/catch
I have not looked at the code or if this was even possible yet… sorry was frantically trying to get my server back in business.