-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
iOS Browser Crash with large files #287
Comments
Hi, safari dose not use the same solution as the other browsers, b/c it can't download something generated from the service worker... so it fallbacks to building a blob and saves it using apparently someone have just reported that the new version of safari do have support for downloading stuff generated by a service worker in #69 so perhaps maybe we don't need the blob fallback any more. But I might know another possible way to improve the blob fallback method. And I would be glad if you could test it for me (as i do not have an iphone myself) Line 272 in 5b9ef44
could you change it to: - chunks.push(chunk)
+ chunks.push(new Blob(chunk)) Doing this can potentially give browser time to off-load some memory data to the disc when it isn't needed. Not all browser dose this but browser can be a bit more clever when it comes to handle blob in the background PS: chrome on iphone is basically just safari with a skin on top. Apple do not allow other engines to run on iOS such as chromium or firefox... they must use webkit's engine. |
I tried your change on both iOS and macOS but it failed as well I also tried the code as it is just removing the useBlobFallback condition for safari
I noticed that you mention an idea removing PostMessage I tried to understand how to changed it but failed. |
Unfortunately with this modifications it seems that the browser freezes at the beginning of the download and after a few seconds it crashes |
Hello, Safari > 15.4 is working with StreamSaver for large files (more than 500MB). As download from service workers are supported. |
Hi, I found your library very interesting and today I used your examples page to perform some test before integrate it in my website. Specifically I was using this: https://jimmywarting.github.io/StreamSaver.js/examples/plain-text.html
I have found some problem with my iPhone XS Max equipped with iOS 15.4 both with Safari and Google Chrome. In particular the browser crash and it will refresh the page.
Here the steps to reproduce the issue:
Open the link above from your iPhone with Safari or Google Chrome
Click on "Write a lot of Lorem ipsum" and leave the default value (1024)
Wait some seconds and hit the "Close" button
The browser does not prompt you anything but instead a refresh (crash) is made
I've noticed that with 512mb the issue is no more present with Safari. Instead Chrome is not able to reach the requested page (crash).
You can also test this issue with an emulator on xcode but by downloading a 10gb file.
I hope that this can be fixed in some way :)
The text was updated successfully, but these errors were encountered: