Meteor-Community-Packages / Meteor-Community-Packages/raix-push

Socket hang up, have tested all certificates and device tokens for APN

Open
#270 29 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
505
Forks
191
PR merge metrics
No merged PRs in 30d

Description

Ok, 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.

Contributor guide

Open the contributing guide

Research direction

Start with the Push.send call and the debug output showing APN configuration, then reproduce the socket hang up in the deployed server environment. Check the APN connection path against the certificate, device token, and production/development settings described in the report. Done means identifying and documenting the cause of the failed APN connection or confirming a reproducible library bug.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.