Troubleshooting

Common Errors

Error: BadDeviceToken

This error occurs when the device token is incorrect or does not match the environment the application is running in.

  1. Navigate to Developers > Push Backends > Certificate Type.

  2. Ensure the certificate type is set to Prod for applications downloaded from the Store or cloud. It is crucial to keep the certificate type as Prod in the production environment. Changing it will prevent your customers from receiving push notifications until the certificate type is set back to Prod.

  3. The Dev certificate type should be selected for applications built and run from a cable (i.e., direct builds from development machines). This is necessary for developers to receive push notifications during testing phases, as they typically use cable-connected builds for push tests.

Error: DeviceTokenNotForTopic

This indicates a mismatch or issue with the application's certificate, often related to the Bundle ID.

  1. Verify the Bundle ID of the application to ensure it matches across all platforms.

  2. If there is a discrepancy, the certificate may need to be renewed. The certificate's Bundle ID value must match the application's Bundle ID value and the configuration within the panel.

Error: APNSTokenInvalid

This error is usually encountered when attempting to send push notifications to an iOS emulator.

iOS emulators do not support receiving push notifications. Ensure that you are testing push notifications on a physical iOS device rather than an emulator.

Error: Device is Unregistered

This error occurs when push notifications are attempted to be sent to a device that has disabled push notification permissions.

Check the device's settings to ensure that push notification permissions are enabled for the application in question.

Error: Sender Id Mismatch (Unknown Error)

This error arises when the Sender ID configured in the Netmera panel does not match the Sender ID set in the Firebase console and within the Netmera initialization method in the application.

  1. Verify that the Sender ID configured in the Netmera panel matches the Sender ID obtained from the Firebase console.

  2. Check the Netmera initialization method within the application to ensure that the correct Sender ID is set.

  3. Confirm that the google-services.json file used in the application is retrieved from the same Firebase Console account where the Sender ID is configured.

Error: Java Socket Error

The Java Socket Error indicates an issue with establishing a network connection via sockets in a Java application. Certificate renewal is necessary to address Java Socket Errors.

iOS Handling Push Notification Issues

In didFinishLaunchingWithOptions

In scenarios where push notifications do not reflect when clicked on iOS devices, to ensure push notifications are handled correctly on iOS devices, the following method may be implemented within the didFinishLaunchingWithOptions method. It should be placed at the top of didFinishLaunchingWithOptions.

//in didFinishLaunchingWithOptions

if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
  } else {
    // Fallback on earlier versions
  }

iOS Widget and In App Messages Troubleshooting

If you are experiencing difficulties in receiving popups, please follow these troubleshooting steps:

Increase Session Duration

  • Go to Netmera panel.

  • Navigate to Developer > App Info and find the App Config section.

  • Increase the value in the 'Session Expire Interval' field by 1.

  • Click 'Apply' to save the changes.

  • Retry displaying the popup.

Check for Other False Settings

Examine your project to ensure that no other parts of your code are setting values to 'false' that might affect popup functionality.

Verify Method Placement

Confirm that the method is placed at the top of the 'didFinishLaunchingWithOptions' function within your code.

if #available(iOS 10.0, *) {
    UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
} else {
    // Fallback on earlier versions
}

Check for Third-Party Tool Integration

Ensure that Netmera is initialized at the top of your project if any third-party tools are integrated.

Multiple Concurrent Popups

If multiple popups are set to display simultaneously, it may lead to issues with popup loading.

Low Device Storage

Note that if the device's storage is nearly full, popups may not load correctly.

iOS Media Push Troubleshooting

Service extension target settings

In the service extension target settings, if the minimum deployment version is set higher than the device's version, it may result in the inability to retrieve images. You may check the following location to see it in XCode.

"Copy only when installing":

Check if "Copy only when installing" is turned off for your main target. To do this:

  1. Select your main target.

  2. Go to "Build Phases."

  3. Expand "Embed App Extensions."

  4. Ensure that "Copy only when installing" is NOT checked. If it is checked, please uncheck it.

Android Widget and In App Messages Troubleshooting

Widget / In App Issues

If you are experiencing difficulties in receiving popups, please follow these troubleshooting steps:

Increase Session Duration:

  1. Go to Netmera panel.

  2. Navigate to Developer > App Info and find the App Config section.

  3. Increase the value in the 'Session Expire Interval' field by 1.

  4. Click 'Apply' to save the changes.

  5. Retry displaying the popup.

Check for Other False Settings:

Examine your project to ensure that no other parts of your code are setting values to 'false' that might affect popup functionality.

Check for Third-Party Tool Integration:

Ensure that Netmera is initialized at the top of your project if any third-party tools are integrated.

Multiple Concurrent Popups:

If multiple popups are set to display simultaneously, it may lead to issues with popup loading.

Low Device Storage:

Note that if the device's storage is nearly full, popups may not load correctly.

Additional Tips

  • Always double-check your environment settings (Development vs. Production) when encountering issues with push notifications.

  • Ensure that your application's push notification service (e.g., APNS for iOS) is correctly configured and that the certificates are up to date.

Last updated