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

showSaveFilePicker with ServiceWorker randomly disconnects on Firefox #77

Open
Maxr1998 opened this issue Nov 9, 2024 · 0 comments
Open

Comments

@Maxr1998
Copy link

Maxr1998 commented Nov 9, 2024

I'm currently trying to get the showSaveFilePicker ponyfill to reliably work on Firefox. On Chrome, the native version already works with my code, and so does the library implementation when using _preferPolyfill: true. However, on Firefox (132.0.1 on Arch Linux), the download of a larger file (2.5 GB) randomly stops. It appears that the ServiceWorker is simply killed by the browser, which a regular ping should usually prevent, as far as I understand.

However, this doesn't seem to work, and looking at the code there might be a reason for that: in downloader.js, the keep alive uses setTimeout instead of setInterval, which seems unintended. Additionally, the postMessage call just passes 0 instead of a message like {type: PING}. If my assumptions are correct, I could look into creating a PR for this.

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

1 participant