Follow

Troubleshooting

Troubleshooting

If you see unexpected behavior while you are integrating the Kahuna SDK with your app, you can learn more about the problem by turning on debug logging in the SDK. Debug logs provide the best view of what is happening in the SDK. You can see batches transferring to the server, and look at detailed information such as push tokens and Secret Key information.

To enable debug logging, make the following method call in your app.

iOS
Kahuna.setDebugMode(true);
Android
Kahuna.getInstance.setDebugMode(true);

Make sure to remove debug logging before you submit your application to production.

Data Tracking

Common issues that arise with tracking data include:

  • Incorrect Kahuna Secret Key
  • No network connectivity
  • SDK not initialized properly
  • Invalid parameters passed to a Kahuna SDK method call

Push Notifications

If you send test push notifications but you do not see the notifications on your device, check for the issues described below.

User Not Push Enabled

Identify the target user of the push. Go to the Kahuna Dashboard, then search for the user by name, email, or other user credential.

If your app doesn't send user credentials, use the device ID. Enable debug logging in the SDK to print out the Kahuna device ID. Because this value is also a valid user credential, you can use it to search for the device.

After you identify your user or device in the Dashboard, look at their push enablement state by navigating to their mini user profile. An icon at the top of the mini user profile pane indicates push enablement.

Push is enabled.

Push is disabled.

In addition, if push is enabled, the Push All buttons appear below the message text box.

Push enablement icon

Message text box

Buttons

Note: The Send In-App button appears even if push is not enabled; In-App messaging and push notifications are separate channels.

iOS and Cordova - No Apple Push Notification Service (APNS) Certificate

If you have not provided your APNS push certificate to Kahuna, your users cannot receive push notifications.

To provide your APNS push certificate

  1. In the Kahuna application, click on the top bar, then click Settings to open the Settings page.
  2. Scroll down to the Push Authorization section.
  3. In the Apple Push Certificates area, drag and drop the certificate you downloaded from the iOS Provisioning Portal.
Android and Cordova - No GCM or FCM Server Key

If you have not provided your Google Cloud Messaging (GCM) or Firebase Cloud Messaging (FCM) Server Key to Kahuna, your users cannot receive push notifications.

To provide your Server Key

  1. In the Kahuna application, click on the top bar, then click Settings to open the Settings page.
  2. Scroll down to the Push Authorization section.
  3. In the Android GCM/FCM Server Key box, enter the Server Key.
No Push Token from Target Device

The target device must provide a push token to Kahuna. To check for the token, enable Debug logs in the iOS SDK and wait for the Kahuna SDK to flush an event batch to the server. If the SDK has a push token, the batch has a push_token parameter for your device. If you don’t see a push token, ensure your device has been provisioned correctly.

Note: You cannot test push notifications on the iOS Simulator. Also, you must allow push notifications in the iOS push notification dialog when it appears.

User Is Push Ready but Isn't Receiving Messages

If you find your user in the Kahuna Dashboard and you can compose and send a message, try using the Send All option instead of Send Optimally. If your test user has multiple devices, it is possible the most optimal device is not the test device. Send All broadcasts the message to all of the user’s devices.

iOS and Cordova - Build Type Does not Match Account Environment

Your Xcode build type must match your Kahuna Account Environment. You can only test development builds in your sandbox environment. You can only test release or ad hoc builds in your production environment.

iOS and Cordova - App Is In The Foreground

iOS push notifications are not displayed if your app is already in the foreground.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments