Skip to content
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

[Bug]: Invalid zip created when downloading several files at once #38335

Closed
5 of 9 tasks
maximelehericy opened this issue May 17, 2023 · 6 comments
Closed
5 of 9 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 26-feedback bug feature: files needs review Needs review to determine if still applicable

Comments

@maximelehericy
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

I am trying to download several files at a time.
The zip downloads, but when I try to extract it, error, it is invalid.
When I try to open it, it is empty, although its weight is not zero, and it seems it downloaded something.
Maybe related to #37629

Steps to reproduce

  1. In Files, tick several documents
  2. Click Actions > Download
  3. Try to extract the downloaded zip file > error
  4. Try to open the downloaded zip file > empty

Expected behavior

zip file should contain and extract the selected documents.

Installation method

None

Nextcloud Server version

26

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

c.nc.c

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@maximelehericy maximelehericy added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels May 17, 2023
@maximelehericy
Copy link
Author

It is c.nc.c, I don't think so 🙃

@joshtrichards

This comment was marked as outdated.

@maximelehericy

This comment was marked as resolved.

@bsyd
Copy link

bsyd commented Sep 1, 2023

Hello,

I had the same problem today (empty zip file). The file is 74MB and is obviously not empty.

In my case, the problem lies in the Folder Name given by one of my users, containing invalid Windows characters ("XXX --> YYY").
Opening the zip file with Windows Explorer shows an empty zip file.
Opening it with another application (7zip or else) shows the folder structure containing the invalid character '>'.
Extracting a subdirectory or a file from there obviously works.

So my workaround is telling the users not to use forbidden windows characters.
A better solution would be to forbid Nextcloud to accept invalid characters in folder names too.

I forgot : NC 27.0.2

@joshtrichards joshtrichards added the needs review Needs review to determine if still applicable label Sep 18, 2024
@joshtrichards joshtrichards changed the title [Bug]: bulk download creates an empty invalid zip file [Bug]: Invalid zip created when downloading several files at once Sep 18, 2024
@yourfate
Copy link

yourfate commented Jan 9, 2025

I have a similar problem. It seems to be related to the folder name length. The name has 115 characters. Windows says the zip is invalid, even if I later rename the downloaded zip. 7zip extracts it without problems.

The files in the folder all also have long names (100-120 chars).

@susnux
Copy link
Contributor

susnux commented Feb 5, 2025

Fixed for 31 and later: #48098
Fixed for 30 and older (down to 28): #49203


if you encounter a similar issue, please open a new ticket.

@susnux susnux closed this as completed Feb 5, 2025
@nextcloud nextcloud locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 26-feedback bug feature: files needs review Needs review to determine if still applicable
Projects
None yet
Development

No branches or pull requests

6 participants