-
Notifications
You must be signed in to change notification settings - Fork 812
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
Safari bug #1730
Comments
I just testing things out on Safari 12 on the desktop, and was not able to reproduce after navigating around to a few pages controlled by the service worker on https://material-ui.com. So, if there are any concrete reproduction steps that you've been able to narrow down, I'd love to dig in deeper. In the meantime, though, I've noticed that you're using a v3.0.0 pre-release version of Workbox. Workbox is up to v3.6.3 now (and we've got v4 alphas out), so as a first step, could you try upgrading your copy of Workbox? There were a number of improvements made throughout the v3 releases, and I'd like to at least make sure that we're starting from the latest codebase. |
Thanks @jeffposnick, I don't control the site, so I'll cross-post there. |
@jeffposnick did you also trying refreshing pages? This should be when the Service workers do their work using the cache instead of routing through the single-page app. |
Yes, I've tried a few times now to go through full navigations as well as page reloads and trigger any failures in Safari 12. I've not had any luck. (That's not to say that there isn't an issue; it's just that odd bugs can crop up in browsers' implementations of service workers that are hard to trigger.) |
This is iOS 12 Safari bug. See this: https://github.com/PWA-POLICE/pwa-bugs#problem--in-ios-12-cache-in-cache-storage-magically-disappears (It isn't fixed in 12.0.1) |
As per the initial issue report, I was working under the assumption that this was being seen on the desktop (Safari 12 / macOS High Sierra 10.13.6). |
@jeffposnick hmm.. yeah, indeed. Then it must be the same bug on macOS as well because the error line is the same as on iOS when this happens. |
Yes, my error was on macOS Safari. For what it's worth, I tried it out on another laptop that recently upgraded to macOS Mojave and Safari there was fine. |
We gonna start by upgrading the version of workbox on material-ui side. |
We have been upgrading the version of workbox from the beta to the latest version. It hasn't gone smoothly, a lot of people were facing cache invalidation issues. This is something that happens quite often every time we release a new version. It takes time to propagate. The cache invalidation is an important limitation of the service workers. I'm suspecting it's because of the next service worker waiting for its activation. Maybe there is a way to force it? At the expense of an unexpected full page reload when the user tries to refresh the page or to navigate to a different page. I will explore this path: https://developers.google.com/web/tools/workbox/guides/advanced-recipes. |
Our team recently found this issue as well. Is the solution to upgrade workbox? |
The material-ui site was using a very outdated Workbox v3 beta, so updating was a good idea in general. More recent versions of Workbox have had better "cache miss" fallback logic to take into account the fact that items that should be precached aren't necessarily going to be there (due to browser bugs, or other failure scenarios), so they are more robust about at least showing something from the network when this crops up, instead of just failing to load the cached response. But in general, my understanding is that this underlying issue a bug in Safari and is outside of Workbox's control, and which is being tracked by the Webkit bugs linked to above. |
Closing this in favor of #1744 (which I also hope to close, if folks can confirm that the latest iOS/Safari combination has addressed the issues they were seeing). |
Today I have the same problem as you in another link, the same error text. But when I change the link from the wireless connection from my router to my phone, no problem, it works. The router configuration has some protection because when I connect to the wifi of my phone the link to the web is fine, I hope that if this is helpful even if it has been a long time, greetings to all. |
I am getting the same issue with http://ipv6-test.com/button-ipv6-small.png Solution: The server supports SSL / HTTPS anyways so adding an S to the end of http fixes the bug, no other work required. |
Library Affected:
workbox-sw, workbox-build, etc.?
Browser & Platform:
Safari 12
macOS High Sierra 10.13.6
Issue or Feature Request Description:
Refreshing workbox PWAs (like https://material-ui.com) leads to this sometimes.
Console has:
Confirmed that they work fine on Firefox, Chrome and private mode Safari.
I figured if I cleared the cache, it would help, but it doesn't seem to kill the service workers.
Workaround is to disable service workers in Developer mode and I can load the websites properly.
The text was updated successfully, but these errors were encountered: