Saturday, 10 June 2017

Cannot send iOS push notification anymore

I send my iOS push notification by node.js, that worked fine for me for months until yesterday.

The node.js source code is from https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/ tutorial.

I added the output of the error object console.dir(result, { depth: null }); and that is what I receive:

hackmac:apns jan$ node test.js 
{ sent: [],
  failed: 
   [ { device: 'a1c8034d033782a9ec7d3d93db484a3d7616a21650ac20affddcac1b49380c07',
       error: 
        { VError: endpoint error: connect ECONNREFUSED 62.138.239.45:443
            at EventEmitter.endpoint.on.err (/Volumes/RAID/Users/jan/Xcode/Notifs123/apns/node_modules/apn/lib/protocol/endpointManager.js:69:32)
            at emitOne (events.js:96:13)
            at EventEmitter.emit (events.js:188:7)
            at EventEmitter.error [as _error] (/Volumes/RAID/Users/jan/Xcode/Notifs123/apns/node_modules/apn/lib/protocol/endpoint.js:99:10)
            at emitOne (events.js:101:20)
            at TLSSocket.emit (events.js:188:7)
            at emitErrorNT (net.js:1277:8)
            at _combinedTickCallback (internal/process/next_tick.js:80:11)
            at process._tickCallback (internal/process/next_tick.js:104:9)
          jse_shortmsg: 'endpoint error',
          jse_cause: 
           { Error: connect ECONNREFUSED 62.138.239.45:443
               at Object.exports._errnoException (util.js:1018:11)
               at exports._exceptionWithHostPort (util.js:1041:20)
               at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
             code: 'ECONNREFUSED',
             errno: 'ECONNREFUSED',
             syscall: 'connect',
             address: '62.138.239.45',
             port: 443 },
          jse_info: {},
          message: 'endpoint error: connect ECONNREFUSED 62.138.239.45:443' } } ] }
hackmac:apns jan$


I did not found an expiration date for my certificate. I think the issue is somewhere else?



via Jan

No comments:

Post a Comment