flatpak / flatpak

Linux application sandboxing and distribution framework
https://flatpak.org
GNU Lesser General Public License v2.1
4.26k stars 406 forks source link

[Bug]: flatpak 1.14.10 resume seems to have broken in potential regression #5928

Open ell1e opened 2 months ago

ell1e commented 2 months ago

Checklist

Flatpak version

1.14.10

What Linux distribution are you using?

Other (specify below)

Linux distribution version

postmarketOS Edge

What architecture are you using?

i386

How to reproduce

  1. Run flatpak updat

Expected Behavior

Downloads always resume. Based on https://github.com/flatpak/flatpak/issues/679 I assume this was meant to be working, but potentially broke again in some regression.

Actual Behavior

Downloads always start over, which makes some downloads potentially impossible on a slower connection (so this can be a high impact bug):

# flatpak update com.opera.Opera
Looking for updates…

        ID                      Branch         Op         Remote          Download
 1. [✗] com.opera.Opera         stable         u          flathub         138.2 MB / 158.2 MB

Error: While pulling app/com.opera.Opera/x86_64/stable from remote flathub: While fetching https://dl.flathub.org/repo/objects/16/cb3a824e2df966aa894cff9d051111169c1823b2f4c1f48e3bff2c046bbb2e.filez: [28] Timeout was reached
Updates complete.
error: There were one or more errors
# flatpak update com.opera.Opera
Looking for updates…

        ID                      Branch         Op         Remote          Download
 1. [|] com.opera.Opera         stable         u          flathub         235.5 kB / 158.2 MB

Updating… ██▍                   12%  47.1 kB/s

(Download goes from 138.2MB back to 235.5 kB and starts over.)

Additional Information

No response

JakeSmarter commented 1 month ago

This is probably not a regression but a long standing bug because ostree does not resume object downloads but pulls only. Hence, on huge file sizes ostree pulls may not complete. This is indeed a high impact bug.

@ell1e Please, run with --ostree-verbose and post your log here. Thank you.

JakeSmarter commented 1 month ago

Apparently, flatpak is currently even unable to download a simple file, like the summary index. :cry:

$ flatpak --version
Flatpak 1.14.10
$ flatpak update --verbose --ostree-verbose
F: using fuse: 0
F: Opening system flatpak installation at path /var/lib/flatpak
F: using fuse: 0
F: No installations directory in /app/etc/flatpak/installations.d. Skipping
Looking for updates…
F: Fetching summary index file for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Received 10001 bytes
F: Fetching indexed summary file c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz using curl
F: Should retry request (remaining: 5 retries), due to transient error: While fetching https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz: [28] Timeout was reached
F: Loading https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz using curl
F: Should retry request (remaining: 4 retries), due to transient error: While fetching https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz: [28] Timeout was reached
F: Loading https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz using curl
F: Should retry request (remaining: 3 retries), due to transient error: While fetching https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz: [28] Timeout was reached
F: Loading https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz using curl
F: Should retry request (remaining: 2 retries), due to transient error: While fetching https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz: [28] Timeout was reached
F: Loading https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz using curl
F: Should retry request (remaining: 1 retries), due to transient error: While fetching https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz: [28] Timeout was reached
F: Loading https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz using curl
error: While fetching https://dl.flathub.org/repo/summaries/c3d4515f1a12abd5cb34d798aa31b5e112b66c1b7c942ab2c492f84d7db67f22.gz: [28] Timeout was reached

Btw, the browser downloads that link flawlessly. So, I do not know what is flatpak’s issue. :shrug: