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

Downloading a file results in a corrupted archive #1639

Closed
NatoBoram opened this issue Sep 11, 2020 · 6 comments · Fixed by #1638
Closed

Downloading a file results in a corrupted archive #1639

NatoBoram opened this issue Sep 11, 2020 · 6 comments · Fixed by #1638
Assignees
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up status/in-progress In progress

Comments

@NatoBoram
Copy link

NatoBoram commented Sep 11, 2020

  • OS: Windows 10 Pro x86_64
  • Version of IPFS Desktop: 0.12.2

Describe the bug

Downloading a file results in a corrupted archive.

To Reproduce

  1. Download something
  2. Open it

Expected behavior

  1. The downloaded file shouldn't be compressed
  2. The downloaded file should be usable
  3. It would be nice to have progress reporting via Background downloads with API kubo#7672 🤗

Screenshots

image

image

Additional context

When I download via BitTorrent, the download files aren't compressed. This makes BitTorrent infinitely easier to download with than IPFS Desktop at the moment.

  1. Not everyone is able to open .tar.gz
  2. I don't have the time to download+compress+decompress 10 GB. Let's just skip the useless compress+decompress part, please!
@NatoBoram NatoBoram added the need/triage Needs initial labeling and prioritization label Sep 11, 2020
@jessicaschilling
Copy link
Contributor

Thanks @NatoBoram - we will bring this up in our next weekly triage.

@jessicaschilling jessicaschilling added exp/intermediate Prior experience is likely helpful effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature need/analysis Needs further analysis before proceeding P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked and removed need/triage Needs initial labeling and prioritization labels Sep 14, 2020
@rafaelramalho19
Copy link
Contributor

@NatoBoram I had issues in the past with 7-zip and tar.gz files, maybe try decompressing it with winrar or similar software?

Anyway, we discussed the possibility of creating a setting that disables/enables compression on downloaded files, so it can be a possible fix for your issue in future versions of webui.

@NatoBoram
Copy link
Author

NatoBoram commented Sep 14, 2020

Issues with 7-zip can be reported here.

I also found the downloaded archive to all have the same size despite representing different files, so I'm not sure if any program could open it.

Ideally, the solution is to avoid compressing data that's going to be uncompressed the second it's downloaded, nearly triplicating the used space. Compression is usually to reduce space usage, not triplicate it.

Moreover, if the data is to be stored afterwards, you bet I'm not going to use IPFS Desktop's compression scheme and I'll use my own for my own use case instead. And even then, just pinning seems like a better storage solution than duplicating its disk usage by using compression.

@jessicaschilling
Copy link
Contributor

Hi @NatoBoram -- we just added ipfs/ipfs-webui#1629 for discussion/implementation of improving Web UI handles download of multiple files/folders.

Closing this issue with that in mind -- however, if you're able to try @rafaelramalho19's suggestion above and confirm that using another decompression tool results in usable files, that would be helpful. If you are indeed getting corrupted files (and it's not just a 7-zip problem), please re-open. Thank you!

@NatoBoram
Copy link
Author

NatoBoram commented Sep 15, 2020

Tested with tar.

$ tar -xvzf Test.tar.gz
tar (child): \302\226Test.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Tested with 7z.

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 25 bytes (1 KiB)

Extracting archive: .\Test.tar.gz
ERROR: .\Test.tar.gz
.\Test.tar.gz
Open ERROR: Can not open the file as [gzip] archive


ERRORS:
Is not archive

Can't open as archive: 1
Files: 0
Size:       0
Compressed: 0
  • ipfs://bafybeieo32rknzpc76mubirgsh6benjjthrzgq2wctvcgrego3ae4ewjlu
  • Test.tar.gz

If you are indeed getting corrupted files, please re-open.

Looks like I don't have the permission to re-open issues.

and it's not just a 7-zip problem

Issues with 7-zip can be reported here.

@lidel
Copy link
Member

lidel commented Sep 15, 2020

Ok, the problem here is that your browser (Electron renderer) does not handle 405 - Method Not Allowed error properly, and instead downloads the error under the name Test.tar.gz - I think that is an undesired behavior of Electron, in regular browser the download fails with proper error.

Good news is that this bug will be fixed in next release when #1638 is merged, so all you need to do is wait for new release.

@lidel lidel added status/in-progress In progress and removed need/analysis Needs further analysis before proceeding status/ready Ready to be worked labels Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up status/in-progress In progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants