parse-community / parse-community/parse-server-push-adapter

APNS VError: apn write failed: Not receiving Ping response after 150000 ms

Open
#90 40 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
96
Forks
108
PR merge metrics
No merged PRs in 30d

Description

I run parse server 2.5.3 with push adapter 2.0.0.

After a lot of errors in the console APNS error transmitting to device XXXXXXXXXXXXXX with status 400 and reason BadDeviceToken I see APNS connection failing.

Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS VError: apn write failed: Not receiving Ping response after 150000 ms 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at Stream.stream.on.err (/app/node_modules/apn/lib/client.js:105:21) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at emitOne (events.js:115:13) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at Stream.emit (events.js:210:7) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at _connection._streamIds.forEach (/app/node_modules/apn/lib/protocol/endpoint.js:155:16) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at Array.forEach (native) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at Endpoint.close [as _close] (/app/node_modules/apn/lib/protocol/endpoint.js:139:33) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at emitOne (events.js:120:20) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at TLSSocket.emit (events.js:210:7) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at _handle.close (net.js:549:12) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS     at TCP.done [as _onclose] (_tls_wrap.js:350:7) 
Jul 20 11:03:31 parse-server app/web.1: node-pre-gyp ERR! parse-server-push-adapter APNS  APNS error transmitting to device %s with error %s

This causes push notifications to not be delivered.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the APNS failure with Parse Server 2.5.3 and push adapter 2.0.0, then inspect the logged paths in node_modules/apn/lib/client.js and node_modules/apn/lib/protocol/endpoint.js. Compare the BadDeviceToken errors with the missing Ping response; done means push notifications no longer fail with this connection timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
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.