Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

APNS: Failed to validate certificate chain for courier.sandbox.push.apple.com - didRegisterForRemoteNotificationWithDeviceToken is not being called

I've implemented apns in my applicaton and it was working till yesterday without any problem. Today suddenly it stopped working and the following method is not being called:

-(void) application:(UIApplication) applicaton didRegisterForRemoteNotificationWithDeviceToken:(nonnull NSData *) deviceToken;

I didn't find any valid reason. My iOS version is 9.3.2;

In device log I see the following error message:

Failed to validate certificate chain for courier.sandbox.push.apple.com

I factory reset the device but it didn't work.

Interestingly, the apns works on my other device with same iOS version.

More interestingly, on the same device my another Test Push Application (same code copy and pasted) works fine.

Does anybody have any idea to solve this issue?

Thanks in advance.

like image 514
farhad rubel Avatar asked Jul 19 '16 08:07

farhad rubel


1 Answers

Similar issue happened to me today as well on 3 test phones, all running iOS 9.3.2. One is an iPhone5 and the other is an iPhone 6.

The following insights may help avoid the problem, until fixed:

  1. I saw that the problem only occur when signing the app with a development certificate. On production environment everything seemed to work as expected (both for regular APNS and for VoIP APNS).

  2. The problem is reproducible only on one of our apps. A different app, even if signed as development, worked as expected (i.e. didRegisterForRemoteNotificationWithDeviceToken was called by the system).

  3. The problem was not reproducible when testing the problematic app on an iOS 8.4.1 phone, both for regular APNS and for VoIP APNS.

Update for July 20, 2016: It seems that this was a temporary issue in APNS Sandbox environment, everything went back to normal today.

like image 99
AmitW Avatar answered Oct 17 '22 04:10

AmitW