cavaliergopher / grab

A download manager package for Go
BSD 3-Clause "New" or "Revised" License
1.39k stars 150 forks source link

open file failure, got err bad content length #71

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi guys,

Hope you are all well !

I have often the following error when downloading with grab:

open file failure, got err bad content length

Any way to sort it out ?

Cheers, X

m-barthelemy commented 3 years ago

I'm also getting it when downloading some files that we already previously downloaded successfully (by Grab itself) and thus already exist.

This always fails if the tar.gz archive already exists:

grab.Get(path, "https://github.com/nginx/nginx/archive/release-1.18.0.tar.gz")

This always works even if the iso already exists:

grab.Get(path, "https://releases.ubuntu.com/20.04.1/ubuntu-20.04.1-live-server-amd64.iso")
m-barthelemy commented 3 years ago

@cavaliercoder do you have any idea about what is going wrong with downloads from Github archives?

youngjuning commented 3 years ago

same issues

ghost commented 3 years ago

@cavaliercoder ,

Hope you are all well !

Screenshot 2021-02-21 at 11 45 15

I am still facing the issue, any idea of a workaround for fixing that annoying issue ?

Thanks for any insights or inputs on that.

Cheers, Luc Michalski

anjannath commented 2 years ago

As mentioned in https://github.com/cavaliergopher/grab/issues/71#issuecomment-756088099 this happens when the file to be downloaded already exists in the destination, for now I just remove the existing file