Skip to content

Downloader breaks on network interruption — no retry, broken resume, lost metadata, ghost buttons #2562

@anees-dahot

Description

@anees-dahot

Steps to reproduce

  1. Start downloading any episode, movie
  2. Turn off WiFi mid-download
  3. Turn WiFi back on
  4. Download fails and download button is unresponsive
  5. Force stop app, reopen, tap Resume — nothing happens
  6. Switch to another app and back, tap Resume — still nothing
  7. Progress shows X MB / 0 KB

Expected behavior

Download should automatically retry or resume when network is restored.
Progress metadata (total file size) should be preserved on interruption.
Resume button should either work or show a clear error message.

Actual behavior

Bug 1: Download dies permanently on WiFi drop, no retry attempted, button becomes unresponsive.

Bug 2: After force stop + reopen, Resume button shows but tapping does nothing.
Zero network activity in logcat — stored URL has likely expired (Cloudflare Workers
temporary signed URL) and app silently fails with no user feedback.

Bug 3: Progress shows "10 MB / 0 KB" — totalBytes metadata is lost on interruption,
making resume calculation impossible.

Bug 4: After backgrounding and returning to app, Resume button appears active but
does nothing — DownloadQueueService was killed by Android but UI was never updated.

Cloudstream version and commit hash

4.6.2-PRE - 1fb6ce3

Android version

15

Logcat

Some important logs

java.net.SocketException: Software caused connection abort
java.net.UnknownHostException: Unable to resolve host "worker-shiny-sun-14b1.xesitif709.workers.dev"
java.net.ConnectException: failed to connect to /188.114.97.7 (port 443): ENETUNREACH (Network is unreachable)

Other details

Root cause analysis:

  • No SocketException/ConnectException catch with retry logic in the download loop
  • Expired URLs are not re-extracted on resume — stored URL used blindly
  • totalBytes not written to disk atomically with chunk data
  • DownloadQueueService lifecycle not synced back to UI on app resume

Suggested fix: Add external downloader support (1DM, ADM) via Android Intent
as a setting. These apps handle retry, resume, metadata and background correctly.
Would be a useful workaround while the internal downloader is improved.

Device: Mali GPU.

Acknowledgements

  • I am sure my issue is related to the app and NOT some extension.
  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have updated the app to pre-release version Latest.
  • I will fill out all of the requested information in this form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions