recipes icon indicating copy to clipboard operation
recipes copied to clipboard

TextMate.download.recipe errors with exit 22.

Open Daz-wallace opened this issue 4 years ago • 5 comments

Describe the problem When running the TextMate.download.recipe recipe, URLDownloader returns an 22 exit code. Viewing the page in Safari (https://api.textmate.org/downloads/release?os=10.15) returns a blank page with no download. I've tried to look for the download on their main page (https://macromates.com/) is also goes to the same blank page so this looks to be an issue with the Vender and not the recipe.

This is more of an FYI for others.

AutoPkg output

URLDownloader
{'Input': {'filename': 'TextMate_2.0.tbz',
           'url': 'https://api.textmate.org/downloads/release?os=10.15'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/URLGetter.py", line 191, in execute_curl
    errors=errors,
  File "/Library/AutoPkg/Python3/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'https://api.textmate.org/downloads/release?os=10.15', '--fail', '--output', '/Users/sadmin/Library/AutoPkg/Cache/local.munki.TextMate2-dataJAR/downloads/tmp67o2hoze']' returned non-zero exit status 22.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 676, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 483, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/URLDownloader.py", line 328, in main
    raw_headers = self.download_with_curl(curl_cmd)
  File "/Library/AutoPkg/autopkglib/URLGetter.py", line 199, in download_with_curl
    proc_stdout, proc_stderr, retcode = self.execute_curl(curl_cmd, text)
  File "/Library/AutoPkg/autopkglib/URLGetter.py", line 194, in execute_curl
    raise ProcessorError(e)
autopkglib.ProcessorError: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'https://api.textmate.org/downloads/release?os=10.15', '--fail', '--output', '/Users/sadmin/Library/AutoPkg/Cache/local.munki.TextMate2-dataJAR/downloads/tmp67o2hoze']' returned non-zero exit status 22.
  File "/Library/AutoPkg/autopkglib/__init__.py", line 676, in process
    self.env = processor.process()
Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'https://api.textmate.org/downloads/release?os=10.15', '--fail', '--output', '/Users/sadmin/Library/AutoPkg/Cache/local.munki.TextMate2-dataJAR/downloads/tmp67o2hoze']' returned non-zero exit status 22.
Failed.
Receipt written to /Users/sadmin/Library/AutoPkg/Cache/local.munki.TextMate2-dataJAR/receipts/local.munki-receipt-20201015-141919.plist

The following recipes failed:
    local.munki.TextMate2-dataJAR
        Error in local.munki.TextMate2-dataJAR: Processor: URLDownloader: Error: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'https://api.textmate.org/downloads/release?os=10.15', '--fail', '--output', '/Users/sadmin/Library/AutoPkg/Cache/local.munki.TextMate2-dataJAR/downloads/tmp67o2hoze']' returned non-zero exit status 22.

Nothing downloaded, packaged or imported.

Daz-wallace avatar Oct 15 '20 13:10 Daz-wallace

Also sent an email to the vender's support

Daz-wallace avatar Oct 15 '20 13:10 Daz-wallace

Email from their support:

We are experiencing an issue with directing downloads to our CDN, working to correct it now. You can get a copy here:

https://github.com/textmate/textmate/releases/download/v2.0.6/TextMate_2.0.6.tbz

Daz-wallace avatar Oct 15 '20 15:10 Daz-wallace

Could this recipe then be moved to https://github.com/autopkg/autopkg/wiki/Processor-GitHubReleasesInfoProvider?

macmule avatar Oct 15 '20 15:10 macmule

The GitHub repo has a much newer version. I'll get this done and PR'd tomorrow.

Daz-wallace avatar Oct 15 '20 15:10 Daz-wallace

Ok, to confuse things a little:

  • TextMate (version 1) is the one with the issue.
  • The TextMate GitHub repo is only version 2 - https://github.com/textmate/textmate/releases
  • We have separate version 2 recipes. - https://github.com/autopkg/recipes/blob/master/TextMate/TextMate2.download.recipe

I propose we retire the version 1 recipes and have the version 2 recipes use the GitHub provider. I'll get a PR in for version 2 but would like a second opinion from others who use the recipe on if version 1 should be retired.

Daz-wallace avatar Oct 16 '20 07:10 Daz-wallace