Troubleshoot OneSignal Web Push issues on Chrome, Firefox, Safari, and Android. Fix common service worker, origin, MIME type, and mobile push errors with step-by-step debugging guidance.
<head>
.Test in a clean browser profile
Open browser developer tools
Attempt to subscribe and observe errors
Open your browser's developer tools and inspect for errors
https://www.yoursite.com/
’) with script (‘https://www.yoursite.com/...
’): A bad HTTP response code (403) was received when fetching the script.Example of a service worker installation error
https://yoursite.com/OneSignalSDKWorker.js
https://yoursite.com/push/onesignal/OneSignalSDKWorker.js
https://yoursite.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js
application/javascript
.MIME type error in service worker
Redirect error in console
Site origin mismatch error
Duplicate SDK initialization error
Linux armv8l
in the Device column of the “Subscriptions” page.https://www.yoursite.com
in the browser, then you must add this to the setup field. www and non-www sites are different origins.
Access the Browser Developer Tools Console
Accessing the developer console
chrome://inspect#devices
in your Desktop Chrome browser.about:debugging
in your Desktop Firefox browser.Enable web SDK logging
undefined
as the result.If you see:top
frame context (see above screenshot).Now that our web SDK’s debug logging is enabled, please close the tab and open a new tab to the same page (refreshing the page is not enough to trigger some of our SDK events). You should see a lot of output in the Console.Console with verbose SDK logs
Check if you are subscribed
Send yourself a test notification
Follow steps 1 - 4 above to try receiving a test notification
Check the Delivery Page in your OneSignal dashboard
Use chrome://gcm-internals to check message delivery
chrome://gcm-internals
.Click the “Start Recording” button on the top left. Making sure you see “Connection State: CONNECTED”.Leave this open and send yourself a push (follow step #4 above to send yourself a test notification).You should see something in the “Receive Message Log” if you got it.GCM internals logging
Use chrome://serviceworker-internals to debug service worker
chrome://serviceworker-internals
.Search for Scope: https://your-site.com
.Click Inspect, or Start -> Inspect, like below. A Chrome Developer Tools popup will appear.Inspecting the service worker
OneSignalWorker.log.trace();
. It should return undefined
. Any messages from our service worker should now appear in this pop.Capture console output and contact support
support@onesignal.com
Please include: