Skip to content

It seems modern Firefox needs the keepalive or it will close at 30s#368

Open
monkeyiq wants to merge 1 commit into
jimmywarting:masterfrom
monkeyiq:2025/march/streamsaver-on-firefox-keepalive
Open

It seems modern Firefox needs the keepalive or it will close at 30s#368
monkeyiq wants to merge 1 commit into
jimmywarting:masterfrom
monkeyiq:2025/march/streamsaver-on-firefox-keepalive

Conversation

@monkeyiq

@monkeyiq monkeyiq commented Mar 2, 2026

Copy link
Copy Markdown

It seems that modern Firefox browsers need to have the keepAlive function running or they will close the service worker after around 30 seconds. If you are performing longer transfers the sw closes and you may still pump data to be saved but it will be silently ignored.

This partial download is reported in the issue at #366

This was reported to the FileSender project which can use StreamSaver to store in browser decrypted data to disk. See the issue at filesender/filesender#2575

Without the change downloading is "finished" after 30 seconds of streaming (however many bytes are transferred) and with the change I can stream a download that takes 6 minutes to complete. I will test for even longer in case keepAlive is needed elsewhere.

@ExtReMLapin

Copy link
Copy Markdown

This indeed fix the issue we had at the office.

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

Successfully merging this pull request may close these issues.

2 participants