-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3 - trouble getting Background Sync to work (on mobile safari 11.3.1) #1466
Comments
As of today, the only browser that supports the Background Sync API is Chrome. The
As additional browsers add support for the Background Sync API over time, the library should "automatically" start working for those users. |
@jeffposnick, is it true that there's a fallback strategy in place as mentioned in the docs? And if so, is it expected to work on iOS Safari 11.4+?
And reading further:
I believe I see this strategy used in Firefox 62 when reloading the page after a failed fetch event and subsequent storage in the queue. From the console:
However, this same behavior is not observed in iOS Safari 11.4 (whereas other Workbox plugins are working normally). For Reference, here's the code (working in Chrome and Firefox): const bgSyncExample = new workbox.backgroundSync.Plugin('exampleQueue', {
maxRetentionTime: 2 * 24 * 60 // Retry for max of 48 Hours
});
workbox.routing.registerRoute(
/\/api\/.*\/*.json/,
workbox.strategies.networkOnly({
plugins: [bgSyncExample]
}),
'POST'
); |
CC: @philipwalton |
Any updates on this? I'm running into the same issue with Android chrome not creating an indexdb database. |
@kdesimini, Are you specifically referring to the BackgroundSync module not creating an IndexedDB on a failed fetch event? If not, please open a new issue with more details on your problem. If yes, which browser/version is failing? (Chrome for Android or Android Browser?) If you haven't already, you can check browser support for IndexedDB and Background Sync. |
As I reported in #1908, the Safari-specific issue reported here may be due to IndexedDB bugs in Safari. If that's the case this problem will hopefully be solved when we make that change. |
I'm going to close this as I believe the issue has been resolved. Please feel free to ping this thread if you're still having issues and I can re-open. |
Have read #1222 but unable to get background sync working on mobile safari.
In
service-worker.js
I have:In
index.html
:When starting the app, console reports that service worker is installed, but I'm not getting the workbox message. True enough, fetch requests are not being queued in IndexedDB. I can cinform that an object store
req-queue
is created.Also opened an SO question
Help please? 😄
The text was updated successfully, but these errors were encountered: