Closed Tudmotu closed 6 years ago
Given the message ‘certificate revoked’ i’d Double check That your certificate is still valid.
My p12 certificates? I created them a couple of days ago and they are valid for a year (or at least that's what Keychain says).
Is there a way to confirm their validity? When I use NWPusher notifications are sent correctly, and the device receives them.
Hi @flovilmart, seems like I figured it out.
After hours of searching, found the alert certificate revoked
error mentioned in a PN troubleshooting page on Apple's website.
So it seems Parse was using the wrong certificate or something. Not sure.
But figuring this out lead me to this issue on prase-server repository, and thanks to @liltimtim my issue seems to have been resolved. Didn't test with a prod release yet, but I hope it will work for that as well.
So to fix this issue I changed my Parse configuration to:
var api = new ParseServer({
...
push: {
ios: {
pfx: '<path-to-prod.p12>',
password: APNS_PASSPHRASE,
topic: '<topic>',
production: process.env.NODE_ENV === 'production'
}
}
});
Use only the "omni certificate", and change the production
flag according to the environment.
Thank you for this awesome project! 😃
@Tudmotu glad to have helped. Push notifications are... tricky sometimes.
Haha, yeah. Thank you very much for the effort investigating these issues! 😃
Just a quick reminder that you should probably not rely on NODE_ENV === 'production'
to set production
to true or false.
Why not? I am running everything in containers so I set the environment variables explicitly. Does it matter?
NODE_ENV=production is used by many frameworks to enable performance improvements, so this may not reflect what you want.
OK got it, thanks! I will maybe use some other name :+1:
Hi :slightly_smiling_face: I have an issue that I've been trying to figure out for hours. I'm using Parse Server 2.7.4 and I don't seem to be able to send push notifications, I get the following error:
Here is a partial stack:
My Parse configuration: