[SOLVED] Is a Downloaded File Corrupt?


Downloaded .tar.gz file is not recognised by tar command
How can this issue be reproduced?
Download the file from the JFormDesigner site, then try to untar it like so:

tar -xvzf JFormDesigner-8.0.2-linux.tar.gz 

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

In fact I downloaded this file using Firefox and the file untared fine.
Interestingly the file sizes are totally different for each brower:

-rw-rw---- 1 francis francis  87M Feb 21 09:55 JFormDesigner-8.0.2-linux_BraveDownload.tar.gz
-rw-rw---- 1 francis francis  43M Feb 21 09:53  JFormDesigner-8.0.2-linux_FirefoxDownload.tar.gz

Expected result:
Should untar

Brave Version( check About Brave):
Version 1.47.186 Chromium: 109.0.5414.119 (Official Build) (64-bit)

Additional Information:
Running on Linux Mint 20.2

Did you retry to download with Brave?
It could be a network glitch. It happens often with any browser.

2 Likes

Agree, please retry.

Strange though, that the ‘corrupt’ one is the larger of the two; normally you’d expect a trashed/truncated file to be smaller.

I’d be curious to see what the file command says about that larger Brave-downloaded one.

2 Likes

Yes I did try two or three times

Thanks @JimB1 for giving me an idea!
Here are the File results:

file JFormDesigner-8.0.2-linux_BraveDownload.tar.gz 
JFormDesigner-8.0.2-linux_BraveDownload.tar.gz: POSIX tar archive

file JFormDesigner-8.0.2-linux_FirefoxDownload.tar.gz 
JFormDesigner-8.0.2-linux_FirefoxDownload.tar.gz: gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT), original size modulo 2^32 90583040

Ah Ha!! Brave has gunzipped the file, but not changed the file extension.
I renamed the file without the .gz extension and it untarred fine suing this:

tar -xvf JFormDesigner-8.0.2-linux_BraveDownload.tar
JFormDesigner/
JFormDesigner/redist/
....... and so on.......

I should have thought of that!
However why does Brave gunzip it???

1 Like

Hello @themetman

i just test the same site i get the same behaviour same as you

then i went to test different site to download tar file https://www.jetbrains.com/toolbox-app/

and brave download the correct file and i even checked it’s checksum and it’s match
another notice from your site that the download in brave did not detect the file size despite it regonizted in firefox

now the question is it brave or chrome issue or the issue on the site

do you have chrome or any other chrome based browser?

Well @justsomeone1 looks like a Chrome problem, I installed Chromium and it behaves just the same as Brave.
Is it worth reporting somewhere?

if you like you can report it to the site and to chrome

Thanks @justsomeone1, I will do that.

1 Like

thanks for you @themetman :slight_smile:

Might be this: https://superuser.com/questions/940605/chromium-prevent-unpacking-tar-gz

But you’d have to look at the HTTP headers returned from the site to see if it’s relevant.

Still, seems like a strange behavior to me though. If you do finally track it down please update us! Thanks.

1 Like

Many thanks @JimB1 for sending the link. I think that explains the problem.
I have looked at the JformDesigner Download Page Headers but there is no content-encoding in the header.
Regards

thanks alot @JimB1 this nail it

hi @themetman if you check the network you will find it try to download 2 files the first one with Content-Type: text/html but the network return with error 302 which is file not found but the one with Content-Encoding: gzip return the 200 and that the one being downloaded

by the way in firefox the first file also return 302 and the second on is 200

thanks for both of you for letting me learn new things and have a nice day both of you :slight_smile:

2 Likes

That is great, @justsomeone1 very clear.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.