KanoComputing / kano-burners

SD Card burner for OSX
GNU General Public License v2.0
12 stars 11 forks source link

[bug] downloading broken #20

Open hyperknot opened 9 years ago

hyperknot commented 9 years ago

The downloading part of the burner seems to be seriously broken, it did all kind of crazy things before finally it allowed me to burn the image. It went up to 300 MB (du in /tmp/kano-burner), then it deleted the files, it started again, it went up again, then finally it completed but it stopped. Said an error dialog that error with downloading, please retry. I took me 4 tries before I finally was able to make the download.

hyperknot commented 9 years ago

pysmartdl is clearly broken. I tried it again on a very reliable internet connection:

  1. It downloads in 3 parts.
  2. Once all 3 are done, it deletes and restarts the 3rd part.
  3. Once the 3rd is downloaded again, it deletes all of them and tells that there was a problem with my internet connection
radujipa commented 9 years ago

Thanks a lot for testing this Zsolt!

I will try to investigate over the weekend, though I'm curious about a few things.

It may have something to do with limiting the number of retries in PySmartDL, though I would need to try it myself. On 18 Sep 2014 18:28, "Zsolt Ero" notifications@github.com wrote:

pysmartdl is clearly broken. I tried it again on a very reliable connection.

  1. It downloads in 3 parts.
  2. Once all 3 are done, it deletes and restarts the 3rd part.
  3. Once the 3rd is downloaded again, it deletes all of them and tells that there was a problem with my internet connection

— Reply to this email directly or view it on GitHub https://github.com/KanoComputing/kano-burners/issues/20#issuecomment-56073525 .

hyperknot commented 9 years ago

I'm on latest OS X, 10.9.4, Macbook Pro Retina. I'm running from build. No debugging messages, as I'm running from build.

For an alternative, here is what I recommend:

homepage: http://aria2.sourceforge.net/ documentation: http://aria2.sourceforge.net/manual/en/html/aria2c.html#options

command lines I tested:

./aria2c http://downloads.kano.me/public/Kanux-Beta-v1.2.1.img.gz --checksum=md5=8e9008398c69059f1a2256a40fa2b222 -s 3 --file-allocation=none -x16 -k1M -V

I'm not yet sure in the check-integrity option, I'll be looking more into it soon.

radujipa commented 9 years ago

I remember Aria2 from when we were looking for a downloader.

I'm happy to look into it, though this is a much bigger change than investigating PySmartDL. Also, it would be nice if Aria has a binary for all three platforms to keep things clean, not just for OSX and Windows.

Thanks a lot for the suggestions! :+1:

hyperknot commented 9 years ago

The thing is that if pysmartdl cannot reliably do the simplest thing: download a single file, then I pretty much lost my faith in it. For linux it's the same as anything else, you better use the binaries provided by the distribution, but you can experiment with bundling a binary.

Actually I think it'd simplify the program, as you could use the same logic as you are using for dd now (actually it's even simpler as it doesn't need a kill to signal a progress)

Ealdwulf commented 9 years ago

@FMog I have changed the downloader to one that is supposed to be more robust. Since you had problems downloading before it would be useful for you to see if this now works for you.

There is a way to set up a raspberry pi to simulate a quantifiably rubbish internet connection, but I don't know if we want to go that far at this point.

There are tweakable parameters to the aria2 downloader (which I am using) to get it to retry more times for example, but I have not exposed any of these in the UI so we would need to release the downloader again if they are necessary for users.

Ealdwulf commented 9 years ago

I didn't intend to close this!