Troubleshooting Push Notifications

The following is a list of things to check if you’re having trouble getting set up with push notifications.

  1. Make sure your certificates are configured correctly. You should have followed the procedure outlined in our documentation for APNs, GCM, or FCM. Take particular note that the APNs certificate that you receive directly from Apple is in the .cer format, and needs to be extracted via keychain (as a .p12 file) and converted to a .pem file.

  2. For APNs certificates, ensure that the Environment is set correctly. It should be set to Development for all cases except if your app is actually live on the app store – even if you have a Production certificate from Apple.

  3. Check your server and client are both successfully connecting to Pusher. You should make sure you can trigger a WebSocket event on your server and receive it on the client. See our quick start guide for iOS or Android.

  4. Ensure your client is successfully subscribing to your interest. If no clients are subscribed to a given interest then the call to .notify on the server won’t send any requests – and no request will be sent to your webhook_url for debugging. See the iOS, Android (GCM), or Android (FCM) guides concerning configuring your clients to subscribe to interests; as well as the corresponding guides on sending notifications from your server: iOS, Android (GCM), or Android (FCM).

  5. Watch for errors in the Push Notifications tab of the debug console, or by adding a webhook_url to your .notify call. See iOS, Android (GCM), or Android (FCM) for details on setting up a webhook endpoint.

  6. If you are using APNs, also see Apple's troubleshooting guide.

You can also try adding logging on your client to see if this throws up any errors. Detailed logging can easily be enabled on iOS by including the function

func debugLog(message: String) {
    print(message)
}

in your swift code, or

- (void)debugLogWithMessage:(NSString *)message {
    NSLog(@"%@", message);
}

in your Objective-C.

Errors you might run in to and what to do about them

  • The server says you have 0 subscribers when you try to trigger a notification: Your client isn't managing to subscribe to the interest. You should make sure your client is successfully registering for notifications, and subscribing to the same interest that you're trying to post notifications to.

  • The server responds with "error":"Computed signature did not match auth_signature": The secret you are instantiating your Pusher object with is incorrect – double check that it is the same as the one listed in App Keys on the dashboard.

  • The server responds with "error":"Invalid notification parameters": The body of your notification request is badly formed, there should be more information in the error message detailing precisely what is wrong.

  • The server responds with "error":"Cannot find app for given key": Make sure your app key is right, that you are specifying the correct cluster if you are on any cluster other than MT1 (US-EAST-1), and that push notifications are enabled for your app in the dashboard (i.e. you have correctly uploaded the appropriate keys/certificates).

  • When registering for APNS, the server responds with "Expected 2xx response to registration request; got 403 with response":  
    If it also mentions remote error: tls: internal error, make sure that you've exported the right certificate (the App certificate, not the Developer certificate - in the Apple Developer portal and Keychain application you should see that it includes either Apple Push Services or APNS Development Push iOS in the labelKeychain app. 
Was this article helpful?
0 out of 1 found this helpful
Haven't found what you were looking for?
Submit a ticket