JPush Troubleshooting

When you are stuck with the JPush-based push notification implementation, See the following items:

  1. Are you using the correct access keys?

    The sender and receiver must be the same Kii application, meaning that they have to use the same AppID.

  2. Did you set the App Key and API MasterSecret on the Kii Cloud developer portal?

    You need to set the App Key and API MasterSecret you've got on the JPush console.

  3. Is the JPush library integrated with your mobile app?

    Make sure to download and integrate the JPush library in your mobile app project.

  4. Did you make the necessary changes in the AndroidManifest.xml file?

    Update the AndroidManifest.xml file by following the steps described in our tutorial. Also make sure that your updates for these items in the AndroidManifest.xml are correct:

  5. Package name at 5 locations

  6. JPush App Key at 1 location

  7. Did you set the development/production correctly?

    You need to select the correct environment. Make sure that you selected the correct environment in the following steps:

    • When you initialize the Kii Cloud push notification feature (some APIs will apply the production environment as default).
    • When sending a push message (e.g. sending from the developer portal or sending via API).
  8. Does your mobile app project have the Receiver class?

    Make sure that the Receiver class defined in the AndroidManifest.xml's <receiver> tag is implemented as a subclass of the android.content.BroadcastReceiver class. Also, make sure that the FQDN of this Receiver class is correct.

  9. Did you install your device properly?

    You need to install a device by executing the KiiUser.pushInstallation().install() method while a KiiUser is logged in. If you have not done this, add the device installation logic like the sample code.

    Then check to see the device installation succeeds. You should be able to find the registration ID being set in the regId. You might want to delete "if (regId.isEmpty()) {" from the sample code to force the re-registration so as to check the regId value.

  10. Are you using the correct bucket/topic scope?

    Make sure that the scope you've subscribed and the scope that triggered the push messages match.

    • If you are using the Push to App messages, double check if the bucket scope matches.
    • If you are using the Push to User messages, double check if the topic scope matches.

    For example, the following Android Push to App sample does not work properly because the subscription is made in the application scope while the updating is made in the user scope.

    • Subscribed topic: Kii.bucket("myBucket");
    • Updated topic: user.bucket("myBucket");
  11. Did you check the developer log?

    You might find some push-related information in the developer log.

    When an error occurs on a Kii Cloud API, the failure reason is sometimes recorded in the developer log. By inspecting the developer log, you might find some hints to resolve the issue.

    Here is an example of the message recorded in the developer log when the FCM payload exceeds 4096 bytes.

    2015-01-21T14:51:16.159+09:00 [ERROR] push.send description:Failed to send Push Message sender: origin:EXPLICIT messageID: type: succeeded-endpoints: failed-endpoints: exception:There are validation errors: payload - The size of the payload exceeds the maximum allowed for GCM messages: 4096 bytes.