Error downloading Nudge - GitHub API not returning URL #345

Closed
opened 2026-01-19 18:33:43 +00:00 by michael · 0 comments
Owner

Originally created by @Drakeii on GitHub.

Hi,

First off, thanks a lot for the great development on this repository.

One of our JAMF managed MacBooks is running into an error when checking for a new Nudge version using Installomator.
According to JAMF logs, all other devices in the same group are succeeding with the installation/update the same date, except for one.

I am adding the log below, but a few comments from my side:

2023-09-22 08:17:45 : INFO : nudge : Latest version of Nudge is 2023-09-22 08:17:45 : WARN : nudge : could not retrieve version number for macadmins/Nudge

This is handled by versionFromGit():528:installomator.sh
If I run this manually I do in fact get a version number, not an empty string.
(curl -sLI "https://github.com/macadmins/nudge/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g')

Same for the acquisition of the latest release URL, the logs below show no error retrieving it, but it seems in the end somehow the variable content is wrong.

2023-09-22 08:17:45 : REQ : nudge : Downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>.

This is handled by downloadURLFromGit():495:installomator.sh
If I run one part manually, I do in fact get a valid URL: https://github.com/macadmins/nudge/releases/download/v1.1.11.81465/Nudge-1.1.11.81465.pkg
(curl -sfL "https://api.github.com/repos/macadmins/nudge/releases/latest" | awk -F '"' "/browser_download_url/ && /Nudge-[0-9.]*.pkg\"/ { print \$4 }")

Furthermore, it looks like some error string is injected into the variable $downloadURL:
Line 7818:installomator.sh printlog "error downloading $downloadURL" ERROR
Line 7830:installomator.sh cleanupAndExit 2 "Error downloading $downloadURL error:\n$logoutput" ERROR
By respecting this structure, the log above shows that $downloadURL contains the error about "GitHub API", instead of the URL

All the other errors following are related to this part I assume.

What could lead to the error "GitHub API not returning URL"? This is not logged from installomator.sh directly, so I did not follow up much more.

Script result: 2023-09-22 08:17:44 : REQ : : shifting arguments for Jamf
2023-09-22 08:17:44 : INFO : nudge : setting variable from argument IGNORE_APP_STORE_APPS=yes
2023-09-22 08:17:44 : INFO : nudge : setting variable from argument BLOCKING_PROCESS_ACTION=kill
2023-09-22 08:17:44 : INFO : nudge : setting variable from argument NOTIFY=silent
2023-09-22 08:17:44 : INFO : nudge : setting variable from argument SYSTEMOWNER=1
2023-09-22 08:17:44 : REQ : nudge : ################## Start Installomator v. 10.0beta3, date 2022-10-03
2023-09-22 08:17:44 : INFO : nudge : ################## Version: 10.0beta3
2023-09-22 08:17:44 : INFO : nudge : ################## Date: 2022-10-03
2023-09-22 08:17:44 : INFO : nudge : ################## nudge
2023-09-22 08:17:44 : INFO : nudge : SwiftDialog is not installed, clear cmd file var
2023-09-22 08:17:45 : INFO : nudge : BLOCKING_PROCESS_ACTION=kill
2023-09-22 08:17:45 : INFO : nudge : NOTIFY=silent
2023-09-22 08:17:45 : INFO : nudge : LOGGING=INFO
2023-09-22 08:17:45 : INFO : nudge : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2023-09-22 08:17:45 : INFO : nudge : Label type: pkg
2023-09-22 08:17:45 : INFO : nudge : archiveName: Nudge-[0-9.]*.pkg
2023-09-22 08:17:45 : INFO : nudge : no blocking processes defined, using Nudge as default
2023-09-22 08:17:45 : INFO : nudge : App(s) found: /Applications/Utilities/Nudge.app
2023-09-22 08:17:45 : INFO : nudge : found app at /Applications/Utilities/Nudge.app, version 1.1.11.81465, on versionKey CFBundleShortVersionString
2023-09-22 08:17:45 : INFO : nudge : appversion: 1.1.11.81465
2023-09-22 08:17:45 : INFO : nudge : Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool.
2023-09-22 08:17:45 : INFO : nudge : Latest version of Nudge is 2023-09-22 08:17:45 : WARN : nudge : could not retrieve version number for macadmins/Nudge
2023-09-22 08:17:45 : REQ : nudge : Downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>.
2023-09-22 08:17:45 : REQ : nudge : https://github.com <https://github.com> to Nudge-[0-9.]*.pkg
2023-09-22 08:17:45 : ERROR : nudge : error downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>.
2023-09-22 08:17:45 : ERROR : nudge : https://github.com <https://github.com>
ls: Nudge-[0-9.]*.pkg: No such file or directory
2023-09-22 08:17:45 : ERROR : nudge : File list: 
2023-09-22 08:17:45 : ERROR : nudge : File type: Nudge-[0-9.]*.pkg: cannot open `Nudge-[0-9.]*.pkg' (No such file or directory)
2023-09-22 08:17:45 : INFO : nudge : App not closed, so no reopen.
2023-09-22 08:17:45 : ERROR : nudge : ERROR: Error downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>.
2023-09-22 08:17:45 : ERROR : nudge : https://github.com <https://github.com> error:
* URL rejected: Malformed input to a URL function
* Closing connection -1
curl: (3) URL rejected: Malformed input to a URL function


2023-09-22 08:17:45 : REQ : nudge : ################## End Installomator, exit code 2 
Error running script: return code was 2.
Originally created by @Drakeii on GitHub. Hi, First off, thanks a lot for the great development on this repository. One of our JAMF managed MacBooks is running into an error when checking for a new Nudge version using Installomator. According to JAMF logs, all other devices in the same group are succeeding with the installation/update the same date, except for one. I am adding the log below, but a few comments from my side: ``` 2023-09-22 08:17:45 : INFO : nudge : Latest version of Nudge is 2023-09-22 08:17:45 : WARN : nudge : could not retrieve version number for macadmins/Nudge ``` This is handled by _versionFromGit():528:installomator.sh_ If I run this manually I do in fact get a version number, not an empty string. `(curl -sLI "https://github.com/macadmins/nudge/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g') ` Same for the acquisition of the latest release URL, the logs below show no error retrieving it, but it seems in the end somehow the variable content is wrong. ``` 2023-09-22 08:17:45 : REQ : nudge : Downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>. ``` This is handled by _downloadURLFromGit():495:installomator.sh_ If I run one part manually, I do in fact get a valid URL: _https://github.com/macadmins/nudge/releases/download/v1.1.11.81465/Nudge-1.1.11.81465.pkg_ `(curl -sfL "https://api.github.com/repos/macadmins/nudge/releases/latest" | awk -F '"' "/browser_download_url/ && /Nudge-[0-9.]*.pkg\"/ { print \$4 }")` Furthermore, it looks like some error string is injected into the variable $downloadURL: Line 7818:installomator.sh `printlog "error downloading $downloadURL" ERROR` Line 7830:installomator.sh `cleanupAndExit 2 "Error downloading $downloadURL error:\n$logoutput" ERROR` By respecting this structure, the log above shows that _$downloadURL_ contains the error about _"GitHub API"_, instead of the URL All the other errors following are related to this part I assume. What could lead to the error "GitHub API not returning URL"? This is not logged from installomator.sh directly, so I did not follow up much more. ``` Script result: 2023-09-22 08:17:44 : REQ : : shifting arguments for Jamf 2023-09-22 08:17:44 : INFO : nudge : setting variable from argument IGNORE_APP_STORE_APPS=yes 2023-09-22 08:17:44 : INFO : nudge : setting variable from argument BLOCKING_PROCESS_ACTION=kill 2023-09-22 08:17:44 : INFO : nudge : setting variable from argument NOTIFY=silent 2023-09-22 08:17:44 : INFO : nudge : setting variable from argument SYSTEMOWNER=1 2023-09-22 08:17:44 : REQ : nudge : ################## Start Installomator v. 10.0beta3, date 2022-10-03 2023-09-22 08:17:44 : INFO : nudge : ################## Version: 10.0beta3 2023-09-22 08:17:44 : INFO : nudge : ################## Date: 2022-10-03 2023-09-22 08:17:44 : INFO : nudge : ################## nudge 2023-09-22 08:17:44 : INFO : nudge : SwiftDialog is not installed, clear cmd file var 2023-09-22 08:17:45 : INFO : nudge : BLOCKING_PROCESS_ACTION=kill 2023-09-22 08:17:45 : INFO : nudge : NOTIFY=silent 2023-09-22 08:17:45 : INFO : nudge : LOGGING=INFO 2023-09-22 08:17:45 : INFO : nudge : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2023-09-22 08:17:45 : INFO : nudge : Label type: pkg 2023-09-22 08:17:45 : INFO : nudge : archiveName: Nudge-[0-9.]*.pkg 2023-09-22 08:17:45 : INFO : nudge : no blocking processes defined, using Nudge as default 2023-09-22 08:17:45 : INFO : nudge : App(s) found: /Applications/Utilities/Nudge.app 2023-09-22 08:17:45 : INFO : nudge : found app at /Applications/Utilities/Nudge.app, version 1.1.11.81465, on versionKey CFBundleShortVersionString 2023-09-22 08:17:45 : INFO : nudge : appversion: 1.1.11.81465 2023-09-22 08:17:45 : INFO : nudge : Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool. 2023-09-22 08:17:45 : INFO : nudge : Latest version of Nudge is 2023-09-22 08:17:45 : WARN : nudge : could not retrieve version number for macadmins/Nudge 2023-09-22 08:17:45 : REQ : nudge : Downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>. 2023-09-22 08:17:45 : REQ : nudge : https://github.com <https://github.com> to Nudge-[0-9.]*.pkg 2023-09-22 08:17:45 : ERROR : nudge : error downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>. 2023-09-22 08:17:45 : ERROR : nudge : https://github.com <https://github.com> ls: Nudge-[0-9.]*.pkg: No such file or directory 2023-09-22 08:17:45 : ERROR : nudge : File list: 2023-09-22 08:17:45 : ERROR : nudge : File type: Nudge-[0-9.]*.pkg: cannot open `Nudge-[0-9.]*.pkg' (No such file or directory) 2023-09-22 08:17:45 : INFO : nudge : App not closed, so no reopen. 2023-09-22 08:17:45 : ERROR : nudge : ERROR: Error downloading 2023-09-22 08:17:45 : INFO : nudge : GitHub API not returning URL, trying https://github.com/macadmins/Nudge/releases/latest <https://github.com/macadmins/Nudge/releases/latest>. 2023-09-22 08:17:45 : ERROR : nudge : https://github.com <https://github.com> error: * URL rejected: Malformed input to a URL function * Closing connection -1 curl: (3) URL rejected: Malformed input to a URL function 2023-09-22 08:17:45 : REQ : nudge : ################## End Installomator, exit code 2 Error running script: return code was 2. ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Installomator/Installomator#345