SDK

Troubleshooting

In this page you'll learn what are the most common mistakes when implementing the Notificare library for Android.

Enabling debug logging

There are times when the default logging level is not sufficient to diagnose problems. You can enable debug logging by setting a more granular log level.

import { setLogLevel } from 'notificare-web/core';

setLogLevel('debug');

HTTP 403

You must configure the allowed domains where the Notificare Web SDK can be loaded. Otherwise, you will run into HTTP 403 errors when the SDK attempts to perform a network request to our APIs.

Please refer to the Website Push guide for more information.

Managing application state

Important application data, such as current device information and push state, is stored in local storage. It's essential to avoid manually removing these properties, as doing so can have unintended side effects, essentially resetting your application to a partially fresh state. Instead, we recommended using the appropriate functions that align with your specific use-case, such as disableRemoteNotifications() or unlaunch().

Misplaced App Keys

When implementing Notificare, the library configuration file (located at /notificare-services.json) must contain the applicationKey and the applicationSecret properties. In Web Push or Safari Push there is no separation between development and production environment, so you don't necessarily need to create applications in Notificare for both environments, although we strongly recommend that you have an application for each environment. Please read more about the configuration file here.

Website Push in Safari

A common error when sending push notifications for Safari is by uploading an icon with alpha channels (transparency) which will silently be accepted but will eventually generate errors rendering impossible to deliver messages. Make sure you always upload an icon with no transparency. Once you've accepted notifications in Safari and you decide to change that icon you'll need to unsubscribe to notifications and subscribe again to see that new uploaded icon. Please bear this in mind when changing the icon in production web apps.