| Summary: | REGRESSION (iOS 17): PWA startup "FetchEvent.respondWith received an error TypeError: Internal error" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jesper Bendtsen <jesperbendtsen83> | ||||
| Component: | Service Workers | Assignee: | youenn fablet <youennf> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Critical | CC: | achristensen, annevk, beidson, cdumez, kyro38, michael.hagar, niels, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 17 | ||||||
| Hardware: | iPhone / iPad | ||||||
| OS: | Other | ||||||
| Attachments: |
|
||||||
|
Description
Jesper Bendtsen
2023-09-19 13:10:38 PDT
The error happens on both iPad iOS 17 and iPhone iOS 17 OSS Angular contributor here, I can provide some insights. The error has been reported first on the framework repo : https://github.com/angular/angular/issues/50378 The issue can be narrowed down to a call `caches.match` that throws a "TypeError: Internal error" The error OP is reporting is because that error wasn't catched and `FetchEvent.respondWith` failed. I believe the root cause is still on Safari's side with the internal error being thrown by the method call mentioned above. Related workaround PR on Angular's side : https://github.com/angular/angular/pull/51885/files Pull request: https://github.com/WebKit/WebKit/pull/18217 There are several potential issues that can lead to the Internal error case. One of the main issues can probably be worked around by calling self.caches.open() (and then match) instead of doing self.caches.match(). @youenn fablet, I believe caches.open() is already called. cf the constructor: https://github.com/angular/angular/blob/c7127b98b555449f99e24a81c828ab7b1c6c4a4e/packages/service-worker/worker/src/assets.ts#L71 before the match() : https://github.com/angular/angular/blob/c7127b98b555449f99e24a81c828ab7b1c6c4a4e/packages/service-worker/worker/src/assets.ts#L137 I'm seeing a similar error on Desktop Safari 17 for our PWA that is using a service worker to cache JS assets. The fetch fails with "Failed to load resource: FetchEvent.respondWith received an error: no-response: no-response :: [{"url":"<url>", "error":{}}]
Committed 268565@main (dd68eb88a64c): <https://commits.webkit.org/268565@main> Reviewed commits have been landed. Closing PR #18217 and removing active labels. |