What happened?
OneSignal occasionally attempts to fetch a service worker from an unexpected URL (e.g. https://example.com/OneSignalSDK.sw.js?appId=...&sdkVersion=...).
This happens when the main worker https://example.com/OneSignalSDKWorker.js fails to install — the SDK falls back to an internal _fallbackToUserModelBetaWorker method, which try to find file on current domain. Since the OneSignal documentation does not mention creating such a file, it’s guaranteed to be missing.
As a result, we end up loading redundant code that never works and only produces repeated errors in the logs.
Steps to Reproduce:
What browsers are you seeing the problem on?
Other
What operating system are you running?
Sonoma
Steps to reproduce?
Simulate a network failure or block OneSignal CDN.
Open the app with OneSignal enabled.
Check the network tab — repeated fetches to a non-existent OneSignalSDK.sw.js endpoint appear.
What did you expect to happen?
No 404 request are made
Relevant log output
What happened?
OneSignal occasionally attempts to fetch a service worker from an unexpected URL (e.g. https://example.com/OneSignalSDK.sw.js?appId=...&sdkVersion=...).
This happens when the main worker https://example.com/OneSignalSDKWorker.js fails to install — the SDK falls back to an internal _fallbackToUserModelBetaWorker method, which try to find file on current domain. Since the OneSignal documentation does not mention creating such a file, it’s guaranteed to be missing.
As a result, we end up loading redundant code that never works and only produces repeated errors in the logs.
Steps to Reproduce:
What browsers are you seeing the problem on?
Other
What operating system are you running?
Sonoma
Steps to reproduce?
What did you expect to happen?
No 404 request are made
Relevant log output