Push Troubleshooting Guide

Are you having problems with sending push notifications to “All Users”, “Targeted Users”, or “Test Devices”? This document will try help you resolve some common problems with push notifications.

1. Diagnose Current State

To begin the process of finding the right solution to your problem, you should answer the following questions about the send failures:

Check if the failure happens:

  1. ( always / sometimes )
  2. to ( all / specific ) devices
  3. to ( all / iOS / Android ) OS
  4. to ( all versions / certain version ) of specific OS? (ex> iOS 8+, Android 2.3.4)

From here, you can narrow down the possible causes of your problem.

2. Dashboard Error Code

You can see the reason for the error in both ‘Test Devices’ and ‘Report for Push Notifications’.

  1. Go to App Settings -> Test Devices. And press the "SEND" button next to the device that has ran your push enabled game. If the push was successful, you will see a 'success' message flash on the screen. You will also see the push notification pop up on the device. If it was not successful, you will see an error message flash on the screen.

  2. If the delivery rate for push sending is less than 100%, you can see the number of bounced pushes and the reasons by mousing over the "?" next to the "Delivery Rate".

3. Error Codes and Solutions

iOS

**ERROR CODE****Solution**
8The app has been already uninstalled from this device. Try installing the game on the device and make sure push notification has been enabled on the device.
UnexpectedErrorSending failed due to an error that occurred in the APNS server.
CERT\_EXPIREDPush Certificate has been expired.Please renew the certificate in \[App Settings > Push\] page. [How to configure Push Certificates](https://dev.tapjoy.com/faq/how-to-configure-push-certificates/)
CERT\_NOT\_PRESENTPush Certificate does not exist.Please check \[App Settings > Push\] page. [How to configure Push Certificates](https://dev.tapjoy.com/faq/how-to-configure-push-certificates/)
SSLErrorInvalid certificate has been uploaded.Please make sure the cert file is for the production environment.

Do not use a passphrase to any files.
How to configure Push Certificates

NoPushToken(Test Devices page only)There is no push token for this device. Make sure that you have installed push integrated app. [Debug Mode & Developer Console](https://dev.tapjoy.com/sdk-integration/ios/getting-started-guide-publishers-ios/#debug_mode_developer_console)

Checklist

  • Can you see ‘notifications’ in your device’s [Settings > YOUR_APP_NAME] menu?
  • If you can’t see, please check ‘Registering for remote notifications’ section of Getting Started Guide.
  • Did you include push services when you created your provisioning?
  • Did you add code for registering remote notifications for iOS 7, iOS 8+ respectively?
  • See ‘Registering for remote notifications’ section of Getting Started Guide.
  • Is the certificate for the production environment? Tapjoy does not currently accept development push certificates.
  • Did you build your app with ad-hoc provisioning and set code signing identity to ‘distribution’? If you are using a development build, you will not be able to send pushes to that build with a production push certificate.

Android

**ERROR CODE****Solution**
NotRegistered DEVICE\_UNREGISTEREDThe app has been already uninstalled from this device. Try installing the game on the device and make sure push notification has been enabled on the device.
MismatchSenderId BAD\_REGISTRATION‘GCM Sender ID’ in your code does not pair with the API key entered in the Tapjoy Dashboard. [How to find sender ID and api key for GCM](https://dev.tapjoy.com/faq/how-to-find-sender-id-and-api-key-for-gcm/)[Multiple Push Providers](https://dev.tapjoy.com/faq/multiple-push-providers/)
UnexpectedErrorSERVICE\_UNAVAILABLE Sending failed due to an error occurred in the GCM server.
NoPushToken(Test Devices page only)There is no push token for this device. Make sure that you have installed push integrated app. Please also check if you entered correct device id in \[App Settings > Test Devices\] page. You can find your device id in developer console. [Debug Mode & Developer Console](https://dev.tapjoy.com/sdk-integration/android/getting-started-guide-publishers-android/#debug_mode_developer_console)
InvalidRegistrationInvalid token format.Please email your account manager for more information about this issue.
CERT\_NOT\_PRESENTPush Certificate does not exist.Please check \[App Settings > Push\] page. [How to find sender ID and api key for GCM](https://dev.tapjoy.com/faq/how-to-find-sender-id-and-api-key-for-gcm/)

Checklist

  • Do you have multiple push providers? (3rd party or your own push server)
  • Please refer to Multiple Push Providers.
  • Did you enable GCM for your project in Google developer console?
  • Did you allow any IP for your api key in Google developer console?

Troubleshooting Dashboard Issues

  • If you are unable to save your api_key and sender id in the Tapjoy Dashboard please verify that the api key has been enabled.
  • You can also run the following script to verify your api_key is registered correctly with GCM.
  • api_key=curl –header "Authorization: key=$api_key" \ –header Content-Type:"application/json" \ https://gcm-http.googleapis.com/gcm/send
    -d "{"registration_ids":["ABC"]}"
  • A 401 response indicates your server key is not valid.
  • More details about this issue on google’s docs: https://developers.google.com/cloud-messaging/http

4. FCM API Key Security Restrictions

Recently, Google is not accepting none-restrict api key on the GCM side. If you get the error message when you try to save api key and sender id on the ltv dashboard, you have to import your google project on the firebase console.

  • Visit firebase console and click "IMPORT GOOGLE PROJECT".
  • Select you google project and import.
  • click the setting icon and select "Project Setting" menu.
  • Select "Could Messaging" tab and use API key and sender id on the page for the ltv dashboard push.
  • If you have unlisted problem, please send us a description of your issue through Contact Support with detailed information about your problem.