Useful tips for the most common issues with push notifications

Certain settings can prevent your device from receiving push notifications. This guide will help you understand the most common causes and will present steps to troubleshoot the issue.

If you are configuring push notifications for the first time, check Integrate the SDK.

iOS

  • Double-check you have followed our step by step guide.
  • iOS Simulator cannot receive push notifications. You will need to use a real device.
  • iOS will not display push notifications for your app if is currently open. Make sure your app is closed or in background.
  • Make sure Do Not Disturb is turned off.
  • Make sure you have an active internet connection.
  • In your network settings, make sure TCP Port 5223 is open. APNS uses this port to deliver push notifications. If you are behind a firewall or your corporate network blocks certain ports, try switching to your cellular connection (4G or LTE).
  • If you have a proxy enabled or a root certificate to intercept and debug HTTP traffic, make sure they are disabled.
  • Restart your device.
  • You are trying to push to a device in debug mode, but you did not set the development flag.

Check your device is marked as Push Enabled

Run your app on your device. You should receive the notifications opt-in prompt. Tap OK.
In your app Dashboard, go to Settings -> Logs. Under Devices, look for your device. It should be marked as Push Enabled.

549549

If your device is not marked as Push Enabled, it means it's failing to register for push. This happens if the user declined the push notification prompt or if the provisioning profile is misconfigured.

Check your device is getting a push token

To verify your device is getting a token, add a break point to application:didRegisterForRemoteNotificationsWithDeviceToken: to be sure a token is being generated. If this is not hit, try adding one to application:didFailToRegisterForRemoteNotificationsWithError: and inspect the error.

If you see the device is getting a push token, but fails to register in the Device Logs, consider passing the token manually.

Your device is not present in the Device Logs

If your device initially registers as Push Enabled, then disappears from the logs when you send a push, you may have forgotten to mark it as a development device.

Check your Entitlements file

If you migrated your project from a previous version of Xcode, disable your Push Notifications capability, than enable it again. Certain versions of Xcode do not generate the entitlements.mobileprovision file correctly, and this will force Xcode to include it again in your build. See Push Notifications for iOS for more details.

  1. Build your app, then locate the .ipa file. Change its extension to .zip.
  2. Expand the .zip file and locate the Payload folder
  3. Make sure a file named embedded.mobileprovision exists inside the Payload folder
  4. Check that the APNS gateway setting exists and is set to production. To do so, check "Creating an .ipa file to check the entitlements of an iOS app store submission" on Apple Developer.

In-App links are not working

If you find your website links, such as those that do not use https, are not loading in our Full Screen Messages windows, you may need to disable App Transport Security. Remember, App Transport Security must be enabled before submitting your app to the App Store.

Android

  • Double-check you have followed our step by step guide.
  • Go to Settings -> Developer. Under Android, make sure you have entered your GCM details.
  • In your device, make sure you have Google Play installed and you are logged in.
  • If you are behind a firewall or your corporate network blocks certain ports, try switching to your cellular connection (4G or LTE).
  • If you have a proxy enabled or a root certificate to intercept and debug HTTP traffic, make sure they are disabled.
  • Restart your device.

Check your device is marked as Push Enabled

Run your app on your device. The device should register with Carnival when your main activity starts.
In your app Dashboard, go to Settings -> Logs. Under Devices, look for your device. It should be marked as Push Enabled.

556556

If your device is not marked as Push Enabled, check the Android Monitor Logcat. Your device should be able to register successfully with both GCM and Carnival. You should see something like this:

$ adb logcat
...
12-02 16:58:54.546 17444 17472 D Carnival: Device Registered with Carnival: 57e4277e6abcdabcdd5aabcd
12-02 16:59:13.921 17803 17836 D Carnival: Device registered with GCM

If the device fails to register with Carnival or GCM, you will see something similar to this (one or more of these events, not necessarily happening at the same time):

$ adb logcat
...
12-02 17:41:23.726 20991 21013 E Carnival: GCM Registration Error java.io.IOException: INVALID_PARAMETERS
12-02 17:41:24.086 20991 21013 E Carnival: Carnival Registration Error com.carnival.sdk.HttpResponseException: Request unsuccessful: 401 Unauthorized

Check your Google Play Services version

Carnival requires Google Play Services 9.4.0 or later. If you fail to receive pushes, your version may differ or be outdated. In this situation, push notifications may fail with no error.

If you are starting a new project using the latest Android APIs, you should already be using the latest version of Google Play Services. You can also explicitly specify your Google Play Services version in your app's build.gradle:

dependencies {
    compile 'com.carnival.sdk:carnival:4.0.0'
    compile 'com.google.android.gms:play-services:10.0.1'
}

📘

Still having issues?

If you are still having issues, contact our Support team.