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

Service worker cuts out immediately when network connection is interrupted in FF #340

Open
wcroachie opened this issue Mar 21, 2024 · 1 comment

Comments

@wcroachie
Copy link

wcroachie commented Mar 21, 2024

EDIT - if anyone is interested, I created a much simpler library that essentially does the same thing StreamSaver does here: https://github.com/wcroachie/DiskWriterJS

I'm creating a system for zipping and downloading multiple large files over the course of a long period of time and wanted to make sure that the stream continues waiting idly if the network should cut out for a few minutes every now and then, and to resume downloading when the connection resumes. So I have been testing it by turning off my network connection for a few seconds and then back on again, and seeing whether the stream fails or not.

It seems to behave correctly in chrome, but in FF I get the following error:

Failed to load ‘’. A ServiceWorker intercepted the request and encountered an unexpected error.

Then, when the network connection resumes, I get the following error:

DOMException: The operation was aborted.

And this is after writer.write fails. In chrome, nothing happens, and the service worker continues to run fine when the network connection resumes. Anyways, is there a way of preventing the service worker from failing when the network temporarily cuts out in FF?

@llaurenss
Copy link

Considering the same thing happens in your own library I assume this is a bug within Firefox?

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

No branches or pull requests

2 participants