Push Notifications: Development not working
Description:
When developing an own whitelabeled App and trying to activate push notifications via APN in development mode not working.
Using a production iOS-App with a production APN device token (for example TestFlight) works fine!
Steps to reproduce:
- generate APN (production and development) Certificates and copy to the APN formula in settings
- disable production mode
- on restart: there is an error
certificate does not support configured environment, production: trueand APN isn't initialized
I tried to console.log the certificate and the environment informations in /app/bundle/programs/server/npm/node_modules/apn/lib/credentials/certificate/validate.js:
environment = { sandbox: true, production: false }
credentials = { [...], production: true }
so the credentials.production is always true, independant of the switch.
Instead setting the EndpointAddress.production in /app/bundle/programs/server/npm/node_modules/apn/lib/config.js manually to api.development.push.apple.com works.
Expected behavior:
Setting correctly to APN development mode when disabling production.
Actual behavior:
APN development not set correctly
Server Setup Information:
- Version of Rocket.Chat Server: 6.4.4
- Operating System: debian
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: enabled
- NodeJS Version: 14.21.3
- MongoDB Version: 5.0.22
can i work on this?
i have same issues, did you resolve it!? @dsjiern ds