Skip to content

Bug Report: Progress Stuck at 0% When Content-Length Is Missing #996

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

Open
checkdev7 opened this issue Mar 19, 2025 · 1 comment
Open

Bug Report: Progress Stuck at 0% When Content-Length Is Missing #996

checkdev7 opened this issue Mar 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@checkdev7
Copy link

checkdev7 commented Mar 19, 2025

Describe the bug
When downloading a file using flutter_downloader, if the server does not provide a Content-Length header, the download progress behaves incorrectly:

Progress is stuck at 0% for the entire duration of the download.
After the file is completely downloaded, the progress jumps to 100% instantly.
There is no way to show the actual data size being downloaded in real time.
This leads to poor UX, especially for larger files, where the user sees no visual indication that the file is actively downloading.

To Reproduce
Steps to reproduce the behavior:

Use flutter_downloader to download a file from a source that doesn’t send a Content-Length header (e.g., https://cobalt.tools/)
Observe the progress value in the port listener
Progress stays at 0% until the download finishes
Progress suddenly jumps to 100%
Expected behavior
Even if Content-Length is missing, it should be possible to:

Show the actual amount of data received so far (e.g., in MB)
Provide consistent progress feedback to the user (e.g., "Downloading... 4.3 MB")
Avoid misleading behavior (i.e., stuck at 0%)
Screenshots
N/A – but the issue can be observed using logs or a progress bar in the app.

OS: Android/iOS

Device information:
Device: [ iPhone 15 Pro]
OS: [ iOS 17.5]
Plugin version: [e.g. flutter_downloader v1.11.8]

Additional context
We understand that when Content-Length is unavailable, calculating percentage progress is not possible.
However, users still need some indication that the file is being downloaded. It would be helpful if:

  • The plugin exposed the current downloaded file size periodically (even without total size)
  • Developers could hook into this to show estimated progress or at least show "x MB downloaded"

This would improve user trust and usability for file downloads from servers that don’t send size headers.

@checkdev7 checkdev7 added the bug Something isn't working label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@checkdev7 and others