Push notification on Apple devices

Description

Hi. We’ve made a custom build of the RC client for Apple devices and generated all certificates/keys that work in test app that does pushes messages to our phones.
Then we set up our RC server (snap 3.6.2) to use these keys instead of push gateway.
But when I press send test push message I get no push but this records in server log:

I20201023-15:57:44.125(3) Push ➔ debug Sending notification { createdAt: 2020-10-23T12:57:44.123Z, createdBy: ‘’, sent: false, sending: 0, from: ‘push’, title: ‘@testuser’, text: ‘This is a push test message’, userId: ‘someuserid’, sound: ‘default’, apn: { text: ‘@testuser:
This is a push test message’ } }
I20201023-15:57:44.126(3) Push ➔ debug send message “@testuser” to userId someuserid
I20201023-15:57:44.127(3) Push ➔ debug send to token { apn: ‘someAPN’ }
I20201023-15:57:44.131(3) Push ➔ debug send to token { apn: ‘someAPN’ }
I20201023-15:57:44.133(3) Push ➔ debug Could not send notification id: “undefined”, Error: Cannot read property ‘send’ of undefined
I20201023-15:57:44.134(3) Push ➔ debug TypeError: Cannot read property ‘send’ of undefined
at sendAPN (app/push/server/apn.js:48:16)
at PushClass.sendNotificationNative (app/push/server/push.js:87:5)
at app/push/server/push.js:203:16
at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1138:16)
at Cursor. [as forEach] (packages/mongo/mongo_driver.js:918:44)
at PushClass.sendNotification (app/push/server/push.js:196:35)
at PushClass.send (app/push/server/push.js:320:9)
at MethodInvocation.push_test (server/lib/pushConfig.js:56:8)
at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:67:34)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
at packages/ddp-server/livedata_server.js:719:19
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at packages/ddp-server/livedata_server.js:717:46
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at packages/ddp-server/livedata_server.js:715:46
at new Promise ()
at Session.method (packages/ddp-server/livedata_server.js:689:23)
at packages/ddp-server/livedata_server.js:559:43

Server Setup Information

  • Version of Rocket.Chat Server: 3.6.2
  • Operating System: Ubuntu 18
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version:
  • MongoDB Version: 3.6.14
  • Proxy: nginx
  • Firewalls involved:

We are facing the excact same Problem, have you found a solution to this?

We are facing this problem too. Any update?

No… What server version do you run? I think that may be it is old snap server bug and we should switch to local/docker version.

We are facing the same problem, our server version is 3.8.1

Snap 3.8.1 was delivered yesterday or so.
Does it still have problems?

Yes, we still get this error

I20201123-13:04:28.151(1) Push ➔ debug Sending notification { createdAt: 2020-11-23T12:04:28.150Z, createdBy: ‘’, sent: false, sending: 0, from: ‘push’, title: ‘Administrator’, text: ‘Hello World’, userId: ‘W4QNfnLJTHrhuqtPK’, payload: { host: ‘outHost’, messageId: ‘P5MB3ehrQyanv5brQ’, notificationType: ‘message’, rid: ‘W4QNfnLJTHrhuqtPKraRipWRJH6GQNmB2i’, sender: { _id: ‘raRipWRJH6GQNmB2i’, username: ‘admin’ }, senderName: ‘Administrator’, type: ‘d’ }, badge: 3, sound: ‘default’, notId: 1243802258, apn: { category: ‘MESSAGE’ }, gcm: { image: ‘outHostFavicon’, style: ‘inbox’ } }
I20201123-13:04:28.151(1) Push ➔ debug send message “Administrator” to userId W4QNfnLJTHrhuqtPK
I20201123-13:04:28.156(1) Push ➔ debug send to token { apn: ‘someAPN’ }
I20201123-13:04:28.159(1) Push ➔ debug send to token { apn: ‘someAPN’ }
I20201123-13:04:28.161(1) Push ➔ debug Could not send notification id: “undefined”, Error: Cannot read property ‘send’ of undefined
I20201123-13:04:28.162(1) Push ➔ debug TypeError: Cannot read property ‘send’ of undefined
at sendAPN (app/push/server/apn.js:48:16)
at PushClass.sendNotificationNative (app/push/server/push.js:87:5)
at app/push/server/push.js:208:16 at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1138:16)
at Cursor. [as forEach] (packages/mongo/mongo_driver.js:918:44)
at PushClass.sendNotification (app/push/server/push.js:201:35)
at PushClass.send (app/push/server/push.js:325:9)
at PushNotification.send (app/push-notifications/server/lib/PushNotification.js:70:15)
at NotificationClass.push (app/notification-queue/server/NotificationQueue.ts:95:20)
at app/notification-queue/server/NotificationQueue.ts:67:12
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

I also tried to downgrade to 3.7 but nothing happen, still can’t make the push notification run