Fetch icon indicating copy to clipboard operation
Fetch copied to clipboard

Download is returning an empty file

Open Shabinder opened this issue 3 years ago • 6 comments

When I download a mp3 file , fetch returns empty file and exec success callback

Shabinder avatar Apr 27 '21 19:04 Shabinder

example link: http://dl28.y2mate.com/?file=M3R4SUNiN3JsOHJ6WWQ3aTdPRFA4NW1rRVJIOG5mSXdqSjRPd2xzSkFMeE5xSVJrOGZHc0w0SnVPNk1Hd3NIcE5kZFk1U3pkZE1UQUZBZUF1cFFwVERpSDQ1MFd1QzNPL2NVQlRNTjlWMTJ6cU9leGwzcFJuQlhsZjlTR01iMUZaRHhZc1VWMG1BaVcyN3JudGh2LzRTMy85Z09PZkhkTXRESUhPTXJBOEl0QWlDeVpTZTdyeG9RUXJ5UGFzTHhFeXFQWTVpZjNodUFZb1k1NFgxQnhQWk5TMU5HNGxQck5zVk1tbEp3ajBFeXpxT3l2T1pnZ0VLbWhlQ0owTnkwMjdlYmpUQWtieWpFaC9HUzMrcU1xNEY4UFpaOSs2WEMxOTgzb2N6V1VmLzNsVG9PRkZlK290Tlg0N3NabHVsTEltZURWbVkxL21BMndkOXZ3U05aYTRSMXlucmVpNk5rczEyNmg0am8vek8wWmx3Mzdja05nWjdrTkptOGZMdDRTRXljVnJwQ3p2L2RscU1vWVB4KzNwYThuS3Vrcit3PT0%3D

Shabinder avatar Apr 27 '21 19:04 Shabinder

Does this happen if you download the same file multiple times in a row? Or does it happen with brand new filenames, too?

~~I'm asking beacuse I have the same issue but I can't reproduce it (just users are complaining).~~ There is a similar issue #403 and they say:

  1. in Fetch configuration, set enableFileExistChecks(false)
  2. when creating a request set enqueueAction = EnqueueAction.REPLACE_EXISTING. The javadoc says that REPLACE_EXISTING is the default but if you look at the code, you'll see that it's a lie!

Anyway, I'm also confused about this so let me know if this helps.

gardenappl avatar Apr 30 '21 17:04 gardenappl

Does this happen if you download the same file multiple times in a row? Or does it happen with brand new filenames, too?

It happens with brand new filenames too, something needs updating in this lib, it started a few days earlier and It only happens with some types of links, some download just fine. I didn't had the time to debug/troubleshoot as I was already planning to move to my own custom implementation of downloading files , so I did finally.

Shabinder avatar Apr 30 '21 18:04 Shabinder

I'm asking beacuse I have the same issue but I can't reproduce it (just users are complaining).

Nevermind, it turned out that my bug was completely unrelated to Fetch, sorry.

gardenappl avatar May 07 '21 14:05 gardenappl

I'm asking beacuse I have the same issue but I can't reproduce it (just users are complaining).

Nevermind, it turned out that my bug was completely unrelated to Fetch, sorry.

btw what was it? maybe mine is related too, which I don't think it is, however, what harm does it do to know.

Shabinder avatar May 07 '21 14:05 Shabinder

btw what was it? maybe mine is related too, which I don't think it is, however, what harm does it do to know.

It's probably unrelated. https://gitlab.com/gardenappl/mitch/-/issues/22

I have an app that downloads and installs APKs. Someone said that the download happens "too quickly" and then the installation fails silently. I thought it was because the downloaded APK was empty. It turned out that downloading worked perfectly fine, but the APK was not installing because MIUI doesn't support PackageInstaller for some reason.

gardenappl avatar May 07 '21 15:05 gardenappl