I am trying to follow steps mentioned at http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html site to develop a sample push service for aws sns. I keep getting the below mentioned error
===========================================
Caught an AmazonServiceException, which means your request made it to Amazon SNS, but was rejected with an error response for some reason. Error Message: Request could not be completed (Service: AmazonSNS; Status Code: 500; Error Code: InternalError; Request ID: a630491b-19c2-58cf-8081-05477accfdda) HTTP Status Code: 500 AWS Error Code: InternalError Error Type: Service Request ID: a630491b-19c2-58cf-8081-05477accfdda
Can someone please help me with this? I know all the credentials are correct because when I try to use a name of my existing application, it tells me that an app with the same name already exists.
I was able to fix it. I realised that the .pem file provided by Apple contained multiple certificates, so I extracted the correct certificate and everything is working great now.
Instead of obtaining the App Private Key like that:
openssl pkcs12 -in myapnsappprivatekey.p12 -out myapnsappprivatekey.pem -nodes -clcerts
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html#private-key-apns
Use:
openssl pkcs12 -in myapnsappprivatekey.p12 -out myapnsappprivatekey.pem -nodes -nocerts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With