homebysix/recipe-robot

Fails on checking for recipes

paul-cossey opened this issue · 6 comments

Describe the bug
When either using a package/dmg or a URL it constantly fails when searching for existing recipes

To Reproduce
Steps to reproduce the behaviour:

  1. Download file or paste download URL in the GUI
  2. Run by clicking Do It

Expected behaviour
Recipe Robot to produce desired recipes

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • macOS: 10.15.7 and 11
  • Recipe Robot Version: 2.0.0
  • which python: My system says /usr/bin/python but recipe-robot should use /usr/local/autopkg/python
  • python --version: My Systems says Python 2.7.16 but it should use the Python bundled with AutoPkg 2.2

Additional context

Full output from a sample run via the GUI

[WARNING] I'm processing the input path as a GitHub repo URL, but you may have wanted me to treat it as a download URL.
[ERROR] I encountered this error while checking for existing recipes:
Processing: https://github.com/betaflight/betaflight-configurator/releases/download/10.7.0/betaflight-configurator_10.7.0_macOS.dmg
Input path looks like a GitHub URL.
Getting GitHub repo...
GitHub repo is: betaflight/betaflight-configurator
Getting app name...
App name is: betaflight-configurator
Getting GitHub description...
GitHub description is: Cross platform configuration tool for the Betaflight firmware
Getting information from latest GitHub release...
Multiple formats available.
GitHub release download format is: dmg
GitHub release download URL is: https://github.com/betaflight/betaflight-configurator/releases/download/10.7.0/betaflight-configurator_10.7.0_macOS.dmg
Download URL is: https://github.com/betaflight/betaflight-configurator/releases/download/10.7.0/betaflight-configurator_10.7.0_macOS.dmg
Downloading file for further inspection...
Downloaded to /Users/p.cossey1/Library/Caches/Recipe Robot/2020-10-23_12-19-44_377901/betaflight-configurator_10.7.0_macOS.dmg
Determining download format...
File extension is dmg
Opening downloaded file...
Successfully mounted disk image
Validating app...
This app seems valid
Getting bundle name...
Bundle name is: betaflight-configurator
Bundle name differs from the actual app filename.
Actual app filename: Betaflight Configurator.app
Getting bundle identifier...
Bundle identifier is: com.nw-builder.betaflight-configurator
Checking for a Sparkle feed...
No Sparkle feed
Looking for version key...
Version key is: CFBundleVersion (10.7.0)
Looking for icon...
Icon is: /Users/p.cossey1/Library/Caches/Recipe Robot/2020-10-23_12-19-44_377901/unpacked/Betaflight Configurator.app/Contents/Resources/app.icns
Gathering code signature information...
This app is not signed
Getting developer name from GitHub...
GitHub developer is: The Betaflight Open Source Flight Controller Firmware Project
Searching for existing AutoPkg recipes for betaflight-configurator...

                                _[]_
                                [xx]
                               q-||-p
                                 ||
                               _/  \_

�[0m

Hi @paul-cossey - Thanks for finding this bug! I think I fixed it in RC2, available here. Could you try that out?

Thanks for fixing so quickly! I've created a couple of recipes with it:

https://github.com/paul-cossey/AutoPkg-Recipes/tree/master/Causality
https://github.com/paul-cossey/AutoPkg-Recipes/tree/master/betaflight-configurator

But they both fail when I try and run the .munki recipe though AutoPkgr (I'm not 100% sure the problem isn't me!).

local.munki.Causality.nua | Error in local.munki.Causality.nua: Processor: URLDownloader: Error: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'Paul Cossey', '--fail', '--output', '/Users/Shared/AutoPkgr/Cache/local.munki.Causality.nua/downloads/tmpg73gc5it']' returned non-zero exit status 3.

local.munki.betaflight-configurator.nua | Error in local.munki.betaflight-configurator.nua: Processor: URLDownloader: Error: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'https://github-production-release-asset-2e65be.s3.amazonaws.com/60735171/78d33f80-ae6d-11ea-8868-1dc4ddfd51d0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201025%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201025T111945Z&X-Amz-Expires=300&X-Amz-Signature=f1e61b464aee8a46ccacb7f5850180aa2deef7e4eb0dffac7c6c56cb0861cc4a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=60735171&response-content-disposition=attachment%3B%20filename%3Dbetaflight-configurator_10.7.0_macOS.dmg&response-content-type=application%2Foctet-stream', '--fail', '--output', '/Users/Shared/AutoPkgr/Cache/local.munki.betaflight-configurator.nua/downloads/tmp1agxht_w']' returned non-zero exit status 22.

A quick look at the download recipe for Causality has my name as the URL!

<dict> <key>Arguments</key> <dict> <key>filename</key> <string>%NAME%.dmg</string> <key>url</key> <string>Paul Cossey</string> </dict> <key>Processor</key> <string>URLDownloader</string> </dict> <dict>

I'll create a couple more (probably tomorrow now) for some additional testing

Very strange that your name would end up in the URL. I'm not sure how that would even happen, and I can't reproduce it.

I've been pushing forward fixing other bugs, so here's a new (possibly final) RC to try: https://github.com/homebysix/recipe-robot/releases/tag/v2.0.0-rc3

Super weird! RC3 does seem to resolve the issue with my name being added as the download URL for Causality

<key>filename</key> <string>%NAME%.dmg</string> <key>url</key> <string>https://releases.hollywoodcamerawork.com/cau/2.1.14-96ec39c7/Causality%202.1.14%20Installer.dmg</string>

Almost end of play for us today, but I'll have a further play about tomorrow all being well.

I've now recreated the Casualty and Betaflight-configurator recipes and also a brand new one. All download and import into Munki with RC3 with no issues. As an added bonus Recipe Robot seems to be much quicker creating the recipes now.

Thanks!

Great! I'd still love to know why your name was appearing in the URL, but willing to write that up as a one-off glitch since nobody else has reported it.