homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
301 stars 28 forks source link

RR repeatedly stalls on DMG download #99

Closed workflowsguy closed 8 years ago

workflowsguy commented 8 years ago

When trying to create recipes for various software packages, I have encountered several situations where RR (GUI) shows "Downloading file for further inspection", then just stalls.

If I try to create the recipe through RR's command line, one time the download will stall at e.g. 14,4%. The next time it will stall at e.g. 58,2%.

So it might take up to 3 attemps until the package is finally downloaded. Other ways of downloading (curl, Safari Download, Leech) have no problems with the packages.

Some files/URLs that I had problems with: https://bitbucket.org/galad87/subler/downloads/Subler-1.0.9.zip http://coxy.beatunes.com/download/beaTunes-4-6-1.dmg https://s3.amazonaws.com/latenightsw.com/ScriptDebugger5.0.10-685.dmg

Using RR 1.0.2 on 10.11.4

Thanks!

homebysix commented 8 years ago

Hi @workflowsguy. Which version of Python are you running? This sounds like it could be a difference in Python or one of its modules between your Mac and mine.

Here's what I have:

$ which python
/usr/bin/python

$ python --version
Python 2.7.10

Also, do you have any proxies or over-eager firewalls on your network?

workflowsguy commented 8 years ago

Hi Elliot,

our Python versions and locations seem to be identical:

which python
/usr/bin/python

python --version
Python 2.7.10

OS X 10.11.4 with RR runs in a virtual machine (VMWare 8.1.1) because my administration Mac is still on Mavericks. It has the OS X builtin firewall enabled and also runs Little Snitch. But I have not experienced problems with other downloads or downloading programs in the VM as I wrote in my previous post. Also, I do not connect through a proxy.

Thanks, Guy

arubdesu commented 8 years ago

Subler already exists:

$ autopkg search Subler

Name                         Repo                     Path                                    
----                         ----                     ----                                    
Subler.install.recipe        hjuutilainen-recipes     Subler/Subler.install.recipe            
Subler.download.recipe       hjuutilainen-recipes     Subler/Subler.download.recipe           
Subler.munki.recipe          hjuutilainen-recipes     Subler/Subler.munki.recipe              
Subler.pkg.recipe            hjuutilainen-recipes     Subler/Subler.pkg.recipe                
Go2Shell.download.recipe     hjuutilainen-recipes     ZipZapMac/Go2Shell.download.recipe 
homebysix commented 8 years ago

Sorry @workflowsguy, but I just can't reproduce the issue you're seeing.

$ time recipe-robot "https://bitbucket.org/galad87/subler/downloads/Subler-1.0.9.zip"
real    0m12.023s
user    0m1.414s
sys 0m2.677s

$ time recipe-robot "http://coxy.beatunes.com/download/beaTunes-4-6-1.dmg"
real    0m44.473s
user    0m1.815s
sys 0m28.138s

$ time recipe-robot https://s3.amazonaws.com/latenightsw.com/ScriptDebugger5.0.10-685.dmg
real    0m16.329s
user    0m1.337s
sys 0m2.071s

Recipe Robot uses urllib2.urlopen() to download files, so I'd be interested to see whether the same thing happens in isolation. You may also want to experiment with a different block size for the download buffer, to see whether that helps.

In the absence of other reports of this issue, I have to chalk it up to an environment-specific problem. But if others chime in, I will reopen and review this issue in more depth.