I have successfully implemented Pushwoosh for Chrome and Firefox, and I have also subscribed successfully on both browsers.
To achieve this, I followed the instructions provided in the following link:
These were the steps I took:
Removed any references to the old service-worker.js from my site.
Included the manifest link in the header (prior to any other manifest links).
- Removed my website from Firefox notification settings so that I would be prompted to allow notifications again.
- Uploaded pushwoosh-service-worker-light.js and pushwoosh-service-worker-dark.js to the root of my site.
- Included the code in the header of my site as per the SDK 2.0 documentation (modifying the applocationCode variable as needed).
- Cleared the cache in both Firefox browser and Cloudflare, and confirmed that the new code was in place by viewing the source code.
- Visited my site using Firefox, received a prompt to allow notifications, and selected "always allow notifications".
- Logged into the Pushwoosh control panel, where I appeared as a new subscriber without issues.
- Sent a test push notification specifically to Firefox, but the new Firefox subscriber was removed and the notification never arrived.
However, when attempting to send a push notification through Pushwoosh (),
I encountered the following errors in the Push History () for Chrome and Firefox.
Error for Chrome:
"The device token has expired, or the application was unregistered from notifications."
Error for Firefox:
"The pushtoken is not recognized by Mozilla"
This resulted in automatic unsubscribing from both Chrome and Firefox.
I believe there may be something missing in the integration process. How can I successfully send push notifications through Pushwoosh for web (Chrome, Firefox)?