If you notice that new subscribers are being created in your Pushwoosh account but do not have a push token (making them unreachable), the most common cause is an outdated Web SDK. Messaging services like Google's Firebase Cloud Messaging (FCM) periodically update their APIs, and older SDK versions may lose compatibility, preventing the successful registration of new subscribers.
To resolve this, follow these steps:
-
Update Your Web SDK: Ensure you are using the latest version of the Pushwoosh Web SDK. If you installed the SDK via NPM, update the
pushwoosh-web-notifications-sdkpackage to its latest version. This will ensure compatibility with the most recent browser and messaging service requirements. -
Verify VAPID Key Configuration: Correct authentication with FCM requires valid VAPID keys.
- Log in to your Firebase Console and navigate to your project's settings.
- Under the Cloud Messaging tab, find your Web Push certificates and copy the VAPID key pair (both public and private keys).
- In your Pushwoosh Control Panel, navigate to your web application's configuration page (Configure > Web).
- Ensure these VAPID keys are correctly entered. For more details, see our guide on Web Push Configuration.
- Integrate the Subscription Widget: Recent versions of the Web SDK require using the Pushwoosh subscription widget to handle the browser's permission prompt. Even if you use a custom UI to ask for permission, our widget must be integrated to correctly trigger the final subscription process. You can find implementation details in our NPM integration guide.
After completing these steps, new users should be able to subscribe correctly and receive a valid push token.
Comments
0 comments
Please sign in to leave a comment.