Skip to content
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

Reporting URL for SW update failures #877

Closed
jakearchibald opened this issue Apr 11, 2016 · 5 comments
Closed

Reporting URL for SW update failures #877

jakearchibald opened this issue Apr 11, 2016 · 5 comments

Comments

@jakearchibald
Copy link
Contributor

Like CSP reporting, something to report update failures to. Probably particular kinds of failures.

@mkruisselbrink
Copy link
Collaborator

See https://w3c.github.io/reporting/ for a possible generic reporting mechanism we could use for this,

@jakearchibald
Copy link
Contributor Author

F2F:

  • Things we might want to report
    • Failed installs
    • Error page served to browser
    • Browser bypassed your SW because it doesn't like it (?)
  • Could respondWith return something to indicate if fetch accepted the response - but would you have to use waitUntil to keep alive for this?
  • Could we have a fetcherror event which fires if a response returned from fetch was rejected - it would allow you to fall back to default browser behaviour

@wheresrhys
Copy link

This would be very useful. Is there some reason this could not also trigger an event sent to one/all the current sw clients. My use case is that users with a cookie longer than 4096 bytes get a 400 when requesting our sw (I'm working on a fix for this elsewhere too), and for each of those users I would like an API to detect this and unregister the service worker.

In a similar vein, an interface for handling failed registrations would be useful: am I right in thinking navigator.serviceWorker.register() doesn't reject if the request for the service worker fails?

@jakearchibald
Copy link
Contributor Author

am I right in thinking navigator.serviceWorker.register() doesn't reject if the request for the service worker fails?

It'll reject if it's the first call to register(), as it's a failure to register. After registration, calling register doesn't trigger updates, so it doesn't reject on update failure.

@jakearchibald
Copy link
Contributor Author

F2F: Lukewarm to this. We can look again if people ask for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants