Question

Currently, I have one app publishes in the appStore and I don't know exactly why the push notifications are not working. Something is wrong with the .p12 file in my server because when my server try to generate a push and send it to Apple Environment, I can see next error in my log:

02-27 11:42:11,868 [IOSPushNotificationSender] ERROR javapns.notification.PushNotificationManager - Delivery error: javapns.communication.exceptions.InvalidCertificateChainException: Invalid certificate chain (Received fatal alert: certificate_unknown)!  Verify that the keystore you provided was produced according to specs...

2013-02-27 11:42:11,874 [IOSPushNotificationSender] ERROR camMan.server.mobile.ApplePNSSender - javapns.communication.exceptions.InvalidCertificateChainException: Invalid certificate chain (Received fatal alert: certificate_unknown)!  Verify that the keystore you provided was produced according to specs...

Ok, I've tried to generate a new .p12 file but I don't remember exactly which one was the original certificate (.cer).

I've tried to download the (.cer) from the provisioning profile but when I open it with keychain access, this certificate hasn't got any private key.

So, I am lost, I don't know what can I do...Can I generate a new .p12 file without to have to modify any certification or whatever in my app? I don't want to upload a new version of my app in appStore...only I need to know how generate or download or whatever to set a new and valid .p12 file and send again push notifications.

Also I've checked all the settings in provisioning portal and everything is Enabled,Active like others apps that I have...so I think the only problem is the .p12

Also I still have the same key/paswoord of the p.12...only I've lost the CSR (.cer).

Was it helpful?

Solution

It sounds like the private key is missing on your machine - either it was deleted, or it belongs to another Mac.

In either case, you can simply revoke the existing vert and create a new one by uploading a new CSR (created by the Keychain Access app on your Mac).

OTHER TIPS

Without a private key, your certificates and provisioning files are worthless. Revoke them all, delete them all, and regenerate new certificates and provisions after carefully re-reading Apple's documentation on the topic. You must modify the Build settings in your Xcode projects to use the new ones if it doesn't do this automatically. This won't affect apps already approved and in the App Store.

Since you had push notifications working during development phase are probably familiar with the procedure of installing certificate to your server.

You can create and install a new certificate whenever you want if you lost your old files.

Two things you have to keep your eye on:

development phase:

you are using Development Push SSL Certificate

your target server is: gateway.sandbox.push.apple.com

production phase:

you are using Production Push SSL Certificate

your target server is: gateway.push.apple.com

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top