Background-sync fallback not working in Chrome when Background Sync API is disabled
See original GitHub issueLibrary Affected: workbox-background-sync
Browser & Platform: Android WebView (Chrome Stable)
Issue or Feature Request Description: The sw doesn’t detect that the browser (Chrome) doesn’t support (or has disabled) the Background Sync API, which results in both the BGS API and the fallback to not work.
The requests are added to the queue correctly (in IndexedDB) but the queue is never accessed/cleared.
Error:
Unable to register sync event for 'myQueueName'. DOMException: Background Sync is disabled.
Details: Workbox v5.0.0 sw code is here, a basic example of the BGS package Working on Chrome v80 (Windows 10 x64, and Android 10), using the BGS API Working on Firefox v68.5.0 (Android 10) and Firefox v73.0.1 (Windows 10 x64), using the fallback (Firefox doesn’t support the BGS API) Not Working on Android WebView (Android 7, webview implementation: Chrome Stable, installed Chrome v80)
@philipwalton Here it is. Feel free to ask for more details and/or if you need me to debug further.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Apologies that there’s hasn’t been any activity on this since it was first reported.
I’m going to explore a few possible workarounds, including the feasibility of attempting a no-op sync registration wrapped in a
try
/catch
in addition to the'sync' in self.registration
check.This is now available as an opt-in in https://github.com/GoogleChrome/workbox/releases/tag/v6.5.0