Skip to content

Unable to Download ZIP/TAR.GZ Files from Web UI #33862

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

Closed
swissmakers opened this issue Mar 12, 2025 · 5 comments
Closed

Unable to Download ZIP/TAR.GZ Files from Web UI #33862

swissmakers opened this issue Mar 12, 2025 · 5 comments
Labels

Comments

@swissmakers
Copy link

swissmakers commented Mar 12, 2025

Description

We are experiencing an issue where downloading .zip or .tar.gz files from the Gitea web UI does not work. The problem occurs for all repositories and organizations. When attempting to download, the browser continuously shows the loading indicator on the download-button (spinning circle), and the network requests to download files (e.g., main.zip) return status 200 every second, with the following response:

{ "complete": false }

This happens infinitely, even for very small repositories (~50KB in size).


Steps to Reproduce

  1. Open any repository in the Gitea web UI.
  2. Click on the "Download ZIP" or "Download TAR.GZ" button.
  3. The browser keeps spinning, and repeated requests to main.zip (or main.tar.gz) appear in the network tab with { complete: false }.
  4. No ZIP file is ever generated or downloaded.

Expected Behavior
The ZIP or TAR.GZ archive should be generated and downloaded without issues.


Actual Behavior
The request to download never completes. The server continuously responds with { complete: false }, and the browser keeps retrying.


Environment Details

  • Gitea Version: Latest official Docker image
  • Deployment: Running inside a Podman container
  • OS: Rocky Linux 9
  • Storage: 3 weeks ago, the server ran out of disk space, but no issues were noticed at the time. This issue was found around 5 days ago.
  • Reproducibility: 100%
  • Tried Fixes:
    • Restarting Gitea
    • Updating to the latest version
    • Rebooting and Patching the Server
    • Creating new Repositories and tried to download -> Also not working.
    • Ensuring file permissions are correct
    • Checking SELinux (not the cause)
    • Verifying container logs and Gitea status page (no errors reported)

Diagnostic Findings
We tested with inotifywait to monitor file access when attempting to download a ZIP file.

On the affected production server, there is no indication that a ZIP file is being created. The logs only show access to .gitconfig, repository config, and refs/heads/main, but nothing related to ZIP creation.

On a freshly installed test system, we observe that the ZIP file is created when clicking "Download ZIP."

Example from the affected server:

/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ OPEN config
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ ACCESS config
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ CLOSE_NOWRITE,CLOSE config
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/refs/heads/ OPEN main
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/refs/heads/ ACCESS main
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/refs/heads/ CLOSE_NOWRITE,CLOSE main
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/ OPEN,ISDIR pack
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/pack/ OPEN,ISDIR
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/ ACCESS,ISDIR pack
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/pack/ ACCESS,ISDIR
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/ ACCESS,ISDIR pack
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/pack/ ACCESS,ISDIR
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/ CLOSE_NOWRITE,CLOSE,ISDIR pack
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/pack/ CLOSE_NOWRITE,CLOSE,ISDIR
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/83/ OPEN a919e6d7f172fd7db7d3ee269763712b2114ec
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/objects/83/ CLOSE_NOWRITE,CLOSE a919e6d7f172fd7db7d3ee269763712b2114ec
/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ OPEN HEAD
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ ACCESS HEAD
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ CLOSE_NOWRITE,CLOSE HEAD
/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ OPEN config
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ ACCESS config
/opt/podman-gitea/data/repositories/swissmakers_gmbh/cve-monit.git/ CLOSE_NOWRITE,CLOSE config
/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig

No .zip or .tar.gz file creation attempt is seen.

Example from the working-test system:

/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig
/opt/podman-gitea/data/repositories/mr/test_repo.git/ OPEN config
/opt/podman-gitea/data/repositories/mr/test_repo.git/ ACCESS config
/opt/podman-gitea/data/repositories/mr/test_repo.git/ CLOSE_NOWRITE,CLOSE config
/opt/podman-gitea/data/repositories/mr/test_repo.git/refs/heads/ OPEN main
/opt/podman-gitea/data/repositories/mr/test_repo.git/refs/heads/ ACCESS main
/opt/podman-gitea/data/repositories/mr/test_repo.git/refs/heads/ CLOSE_NOWRITE,CLOSE main
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/ OPEN,ISDIR pack
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ OPEN,ISDIR
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/ ACCESS,ISDIR pack
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ ACCESS,ISDIR
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/ ACCESS,ISDIR pack
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ ACCESS,ISDIR
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/ CLOSE_NOWRITE,CLOSE,ISDIR pack
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ CLOSE_NOWRITE,CLOSE,ISDIR
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ OPEN pack-59746f2dd7ef7e3534dbf4603058aa6435838206.idx
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ OPEN pack-8fde554a61eece84f4bc3063229ad57b053f2e2c.idx
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ OPEN pack-e90f1c0883b0a26a31e4b2d40534a693df75e92b.idx
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ OPEN pack-e90f1c0883b0a26a31e4b2d40534a693df75e92b.pack
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ ACCESS pack-e90f1c0883b0a26a31e4b2d40534a693df75e92b.pack
/opt/podman-gitea/data/repositories/mr/test_repo.git/objects/pack/ ACCESS pack-e90f1c0883b0a26a31e4b2d40534a693df75e92b.pack
/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig
/opt/podman-gitea/data/repositories/mr/test_repo.git/ OPEN HEAD
/opt/podman-gitea/data/repositories/mr/test_repo.git/ ACCESS HEAD
/opt/podman-gitea/data/repositories/mr/test_repo.git/ CLOSE_NOWRITE,CLOSE HEAD
/opt/podman-gitea/config/home/ OPEN .gitconfig
/opt/podman-gitea/config/home/ ACCESS .gitconfig
/opt/podman-gitea/config/home/ CLOSE_NOWRITE,CLOSE .gitconfig
/opt/podman-gitea/data/repositories/mr/test_repo.git/ OPEN config
/opt/podman-gitea/data/repositories/mr/test_repo.git/ ACCESS config
/opt/podman-gitea/data/repositories/mr/test_repo.git/ CLOSE_NOWRITE,CLOSE config
/opt/podman-gitea/data/repositories/mr/test_repo.git/refs/heads/ OPEN main
/opt/podman-gitea/data/repositories/mr/test_repo.git/refs/heads/ ACCESS main
/opt/podman-gitea/data/repositories/mr/test_repo.git/refs/heads/ CLOSE_NOWRITE,CLOSE main
/opt/podman-gitea/config/repo-archive/2/c0/ OPEN c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
/opt/podman-gitea/config/repo-archive/2/c0/ ACCESS c09812dd3230cf193cdc08b84424c7a62bad256a.zip
 

We also tried to performed all possible maintenance operations that we can start over the webUI. - Nothing worked, to fix this issue.

Gitea Version

1.23.5

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Rocky Linux 9

How are you running Gitea?

The service is started as Systemd Service with the following ExecStart command:

/usr/bin/podman run --name $SERVICE \
  --add-host=dbhost:10.88.0.1 \
  -e "TZ=Europe/Zurich" \
  -p 6020:3000 -p 6022:22 \
  -v /opt/podman-gitea/config:/data/gitea:Z \
  -v /opt/podman-gitea/data/repositories:/data/git/repositories:Z \
  -v /opt/podman-gitea/data/lfs:/data/git/lfs:Z \
  -v /opt/podman-gitea/ssh:/data/ssh:Z \
  -v /etc/localtime:/etc/localtime:ro \
  -e GITEA__database__DB_TYPE=mysql \
  -e GITEA__database__HOST=dbhost:3306 \
  -e GITEA__database__USER=******* \
  -e GITEA__database__PASSWD=‚****************‘ \
  -e GITEA__database__NAME=********* \
  gitea/gitea

Database

MySQL/MariaDB

@wxiaoguang
Copy link
Contributor

On the affected production server, there is no indication that a ZIP file is being created. The logs only show access to .gitconfig, repository config, and refs/heads/main, but nothing related to ZIP creation.

On a freshly installed test system, we observe that the ZIP file is created when clicking "Download ZIP."

What does the Gitea's log say? Is there any error?

@wxiaoguang
Copy link
Contributor

One more thing, does the queue system work? Check it from admin panel -> monitor -> queue /-/admin/monitor/queue

@swissmakers
Copy link
Author

No there were absolutely no errors in the logs. But your second hint seems to be the solution.

under /-/admin/monitor/queue on the repo-archive | level | *archiver.ArchiveRequest i found a number over 1000000 in Number in Queue after hitting Delete all queues it seems to work again.

So i think the problem was, that gitea already had so much queues because of our Repo-syncs and the out of Memory situation, that this download requests initiaded a new jop (Status 200) but this then again had a timeout or something like this.

Maybe there should be in this situation a error if, you could implement something try-catch-like i think this could be helpful for other people like me in this situation.

But thank you very much for your fast answer.

@wxiaoguang
Copy link
Contributor

The real problem is that Gitea's levelqueue sometimes could become corrupted. At the moment there is no way to recover besides manually delete the items in the corrupted queue.

More information: Help to recover from corrupted levelqueue #24912

@swissmakers
Copy link
Author

Ok yes that seems to be the one.. thanks for the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants