software-mansion / software-mansion/react-native-executorch
[RNE Rewrite] Drop the Android DownloadManager fallback once blob-util releases the #475 fix
@msluszniak is already working on this.
Since Sep 1, 2026.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 96
- Avg merge
- 20h 51m
- Merged PRs (30d)
- 59
Description
src/fetcher/fetcher.ts carries three download backends:
- the optional background downloader (both platforms, when the app installs
@kesha-antonov/react-native-background-downloader) - the system DownloadManager (Android fallback)
- a blob-util stream with Range resume (iOS fallback)
The Android one exists for a single reason: blob-util's in-process reader is broken. On 0.24.10 it stops after exactly 8 KB with "Download interrupted" (RonRadtke/react-native-blob-util#475). ProgressReportingSource.read() writes each chunk to the destination file but never into the okio sink it was handed, so buffered consumers see an empty buffer and hit a false EOF after the first segment.
The upstream fix is already merged but not released. PR #474 landed on master on 2026-08-04 (commit f0da45e9) and adds the missing sink.write(...). npm's latest is still 0.24.10, published 2026-06-19, and master is still versioned 0.24.10, so no release carries it yet.
Once a release with that fix is out:
- Bump the
react-native-blob-utilpeer range to the fixed version. - Delete
downloadUrlViaAndroidDownloadManagerand theIS_ANDROIDbranch instartDownload, so both platforms share one fallback. - Delete
reassemble32BitCounter. The 32-bit progress overflow it works around (#1366) comes from DownloadManager'sCOLUMN_BYTES_DOWNLOADED_SO_FARbeing read withgetInt; the in-process path reports bytes as a string and does not overflow. - Re-check the Android cache directory. It is the app-private external dir only so DownloadManager could write there, but moving it would invalidate every already-downloaded model, so it should probably stay where it is regardless.
- Verify a >2 GB download on device. 0.24.10 rewrote the drain loop specifically to lift OkHttp's 2 GB
Integer.MAX_VALUEceiling, but that has never been exercised end to end because the path has been broken since it landed.
That leaves one mechanism plus one shared fallback, which is what @barhanc asked for in https://github.com/software-mansion/react-native-executorch/pull/1369#discussion_r3904012123. #1369 did the half that was unblocked: the background downloader now backs both platforms, so an app that installs it gets the same behavior on each. This issue is the rest.
Blocked on an upstream release.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.