Question:
I cannot get the subscription pop-up in my browser because of the "Pushwoosh init failed DOMException" error.
Answer:
The most common cause of this error is a mismatch between the version of the Web SDK and the version of the service worker file (pushwoosh-service-worker.js) served from your site.
To avoid it, use one consistent source for both files:
- Install the npm package and take the service worker from that package — see Web Push SDK 3.0. Re-copy the service worker to your web root every time you upgrade the package.
- Or load both the SDK and the service worker from the Pushwoosh CDN, so your website always gets matching, up-to-date versions automatically.
Also make sure the service worker is served over HTTPS from a scope that covers your pages, and hard-reload the page (or unregister the old service worker in DevTools → Application → Service Workers) after updating.
Comments
0 comments
Please sign in to leave a comment.