How to resolve – Failed to validate credentials with APNS in Azure Notification Hub …

So this happened when I was in the midst of moving one of my Azure Notification Hubs into a new one, where during the configuration I removed the APNS certificate (p12 file) from the old Azure Hub and tried uploading to the new Azure Hub, but during the upload there was some network interference and it didn’t get uploaded and I refreshed the page.

So then I tried again, I got to be honest the internet connection was pretty messed up that day, and the above same scenario happened two more times and I wasn’t able to upload the file. Then after yelling at the Network admin, and getting the connection fixed up, I tried reuploading the p12 file.

Then suddenly this error popped up…

Failed to validate credentials with APNS. Error is Authentication failed because the remote party has closed the transport stream…

Below is a screenshot of the weird moment I experienced.


The reason why I called it was weird because, there shouldn’t be any issue with the p12 file as I had generated it accordingly and I also had used it before. So I dived into the issue online.

After going through some posts, I couldn’t find anyone who’s had the same above issue, and even they had similar issues, they were able to fix it by regenerating the p12 file as they had missed some steps during the previous creation. So just like that I was clueless…

So I assumed that this must be coming from the APNS authentication service end, which should probably be some unexpected error. And also could be the cause of me trying to upload the same p12 file several time and got interrupted in the middle of the upload due to the network connectivity issues.

So what I did was I waited for about 15 minutes, hoping for the APNS service to clear out the logged error and stop my upload from being rejected, cleared the web browser cache in case if some cookies were messing it up, and changed my IP Address, as if by any chance they were tracking the upload client through the IP address, so with a new IP it would be considered as a fresh upload. Then I tried uploading, guess what ? it worked like a charm !😀

It seemed to be my above assumption was right, and probably I was being kicked out by the APNS service for continually failing the file upload.

So I just put up this blog post if by any chance someone experiences the same issue and had no clue what to do, and this is how I resolved it…😀

Hope this was helpful for any of your fellow awesome developers out there…

Cheers !😀 Stay Awesome ! ^_^


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s