Troubleshooting
Nudgr: apiKey is required
Pass a project API key when creating the SDK instance:
const nudgr = new Nudgr({ apiKey: "nk_..." });Nudgr: Push notifications are not supported
The current browser does not support the required push APIs. Check:
serviceWorkersupportPushManagersupportNotificationsupport
Nudgr: Notification permission denied
The user has denied browser notification permission. The SDK cannot recover from this automatically. The user must re-enable notification permission in browser settings.
No notifications are received
Check these first:
- the service worker file is actually served at
/nudgr-sw.mjsor the exact custom URL you configured - the page is running on HTTPS
- the browser permission is
granted - the project API key is from the correct Nudgr project
Then verify the current browser is subscribed:
await nudgr.isSubscribed();If a user unsubscribed recently, Nudgr now removes that subscription from the server during nudgr.unsubscribe(). Older stale subscriptions may still need one failed send before automatic cleanup.
No subscriptions found
The send API returned no subscribers for the project. Usually this means:
- no browser has subscribed yet
- you used the wrong project API key
- the targeted
subscriberIdsdo not belong to the project
Webhook not firing
Check:
- webhook is enabled in project settings
- webhook URL is valid and reachable
- your server accepts
POSTrequests - your server verifies
x-nudgr-signatureagainst the raw body
See Webhooks for headers and signature examples.
Click events are missing
Click events depend on the browser service worker completing its tracking request. They may be missing if:
- the notification is closed without a click
- the browser is offline when the click happens
- the click tracking request is interrupted
notification.clicked is best effort.
If you need to understand where the chain breaks, read Architecture first.