-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Offline download progress stuck when exceed 10% of free storage on Android #747
Comments
Thanks for the report! We'll look into it. |
I have been able to repo this using a Pixel XL running Android 7 (N) and Chrome 57. Since I did not have a single large piece of content, I was able to repo this by download each piece of test content. It finally froze at 43% on "Tears of Steel (external text)". Considering I still have over 15 GB free on this device, I do not think this has to do with any relative storage capacity, but something specific about the amount of content we are storing. |
Using "navigator.webkitTemporaryStorage.queryUsageAndQuota" on Android Chrome I have been able to confirm that we are reaching the max storage allotted to us. I am still looking into where the failure is and why we are not getting the error message. |
hi @vaage, that's right, it is about the "total size" of content we are storing. |
Hello @phamduongnhatnam , Thanks for checking in on this again. I am still working on this but got a little side-tracked with another task. I am currently working up the stack trying to find where the failure is. Currently IndexDB always succeeds and there are never any dangling inserts left open - so the failure has to be somewhere else. |
Hello @phamduongnhatnam , Good news we found the problem and it is something we can and will fix. Just so you know the full story. The hang was caused because the transaction never called oncomplete or onerror. What we overlooked was that it is possible for a transaction to call onabort. It appears that when store.put cannot write to disk the request will call onsuccess but the transaction will call onabort. We will be updated our code so that if the transaction is aborted it will appear as an error to Shaka Player and should surface the same as any other error. Thanks again for finding this and being patient while we looked into it. |
On android the quota for offline content is much smaller than on desktop. It was observed that when this quote was exceeded that downloading offline content would stall but not throw and error. It was found that instead of an error, IndexDB called onabort for the transaction. To fix this we now route onabort through the same code path as onerror so that the abort will be treated and communicated as an error back to the application. Closes #747 Change-Id: I10d536a4edc29d51790f0588f6163a5d83eccf33
Thanks @vaage and @joeyparrish, your works are awesome! |
This fix is being cherry-picked to v2.1.1. |
On android the quota for offline content is much smaller than on desktop. It was observed that when this quote was exceeded that downloading offline content would stall but not throw and error. It was found that instead of an error, IndexDB called onabort for the transaction. To fix this we now route onabort through the same code path as onerror so that the abort will be treated and communicated as an error back to the application. Closes #747 Change-Id: I10d536a4edc29d51790f0588f6163a5d83eccf33
Also cherry-picked to v2.0.9. |
What version of Shaka Player are you using?
2.0.6
Yes
master
?Are you using the demo app or your own custom app?
My custom app
Yes
What browser and OS are you using?
Chrome Android, Crosswalk.
Android 6
What did you do?
I can use the offline feature to store the media content. It has no problem when I store any content that the total size less than ~400mb. The store process will stuck when the device exceed that size without throwing any error. By the way, my device has about 4GB free storage.
What content did you load?
If standard demo asset, which one?
If custom asset, what manifest and license server URIs?
How did you interact with the content, if at all?
What did you expect to happen?
Throw some error when the downloading process can't store the content any more.
What actually happened?
The download process get stuck without any error happened.
The text was updated successfully, but these errors were encountered: