This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
Downloading 50mb+ files from thinkbroadband.com makes the browser to crash #6317
Labels
Milestone
Comments
|
I'll move this issue over to the AC repo since that should in theory affect every app using the |
pocmo
added
<download>
Component: feature-download
🐞 bug
Something isn't working
💥 crash
labels
Mar 19, 2020
csadilek
moved this from ⏳ Sprint Backlog
to 🏃♀️ In Progress
in A-C: Android Components Sprint Planning
Mar 24, 2020
csadilek
added a commit
to csadilek/android-components
that referenced
this issue
Mar 26, 2020
csadilek
added a commit
to csadilek/android-components
that referenced
this issue
Mar 26, 2020
…ontent resolver
bors bot
pushed a commit
that referenced
this issue
Mar 26, 2020
6393: Closes #6317: Prevent inserting duplicate record into content resolver r=Amejia481 a=csadilek OK, this hole was deep :). The cause of this crash is that we were unconditionally inserting into the content resolver which may already have a row / record of the download URI: #6317 (comment) This can happen if a download fails or gets cancelled before we write the file. We will have a unique file name generated based on existing files, but also need to check if we have a record of the file in the resolver. If so, use it, otherwise create a new record. I've tried for a few hours to write a meaningful test for this, but there are simply too many static methods involved here and the resulting refactoring was terrible: `ContentUris.withAppendedId`, `MediaStore.setIncludePending`, `MediaStore.Downloads.getContentUri` etc. That's properly the reason we don't have an existing test for this method :( This also makes sure we now won't crash if for some reason there's another problem inserting into the content resolver, but fail the download instead. Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
A-C: Android Components Sprint Planning
automation
moved this from 🏃♀️ In Progress
to 🏁 Done
Mar 26, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Steps to reproduce
Expected behavior
The file starts to download without any problems.
Actual behavior
The app crash when downloading 50+mb files.
Device information
crash download.txt
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: