Guides
Guides

Troubleshooting

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 can only receive push notifications on Apple Silicon devices. You will need to use a real device if you are using a Mac with an Intel processor.
  • 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 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.

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.

Check for conflicting iOS dependencies

The Marigold Mobile SDK will by default attempt to auto-integrate with the push handling functionality in your app in order to handle APNs tokens and the results of push interactions. For the most part this integration should be seamless and invisible to the app, however it can go awry if your app includes other dependencies that attempt to access the same functionality (other push related libraries).

The easiest solution would be to remove the conflicting dependency (or dependencies), however that might not always be possible. In this case, order to avoid conflicts you should investigate the process detailed in our iOS: Auto Integration guide to disable the auto integration and manually pass the token and notification data to the SDK.

Possible signs that you're experiencing conflicts like these would be if your devices don't have push tokens or you're receiving and interacting with pushes but not getting any direct opens data.

Android

  • Double-check you have followed our step by step guide.
  • Go to Settings -> Developer. Under Android, make sure you have entered your FCM 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 Push Enabled

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

$ adb logcat
...
I/FirebaseInitProvider: FirebaseApp initialization successful
D/Marigold: Device Registered with Marigold: 57e4277e6abcdabcdd5aabcd
D/Marigold: FCM Token Refreshed

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

$ adb logcat
...
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
E/Marigold: FCM Token Refresh Error java.io.IOException: INVALID_PARAMETERS
E/Marigold: Marigold Registration Error com.marigold.sdk.HttpResponseException: Request unsuccessful: 401 Unauthorized

Check your Google Play Services version

Marigold requires any imported Google Play Services libraries to be version 15.0.0 or later. Check that any Google Play Services and Firebase library dependencies are at or above this version.

dependencies {
    implementation 'com.marigold.sdk:marigold:21.0.0'
    implementation 'com.google.android.gms:play-services-maps:15.0.0'
    implementation 'com.google.firebase:firebase-core:15.0.0'
}

Check for conflicting Android dependencies

The Marigold Mobile SDK will by default create a service that extends the FirebaseMessagingService class in order to handle FCM token and push notification data. For the most part this should work seamlessly, however it can encounter issues if your app includes other dependencies that also extend this class in order to provide push related functionality (other push related libraries), or if your app has it's own extension of the service.

The easiest solution would be to remove the conflicting dependency (or dependencies) or your apps implementation of the service, however that might not always be possible. In this case, in order to avoid conflicts you should follow our guide in the Android Integration to pass the data manually to the SDK. If it's a dependency conflict and your app doesn't already have a FirebaseMessagingService implementation, you'll need to create one.

A possible sign that you're having a dependency conflict would be that pushes are being sent to the device but never being displayed. If you can see in Logcat that a different service has attempted to handle the notification, then you'll need to resolve the conflict.

React Native

Check for conflicting React Native dependencies

The native implementations of the Marigold Mobile SDK are responsible for integrating with push functionality on each platform and they do not surface this to the React Native layer. For the most part this should work without any effort on your part, however if your app has any dependencies that also integrate with push then it's possible they will negatively impact on our SDKs ability to do so.

If you are able to remove the conflicting libraries that should be the easiest path to resolving this, otherwise you'll need to go through the native resolutions detailed for iOS and Android.

📘

Still having issues?

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