Swift Dialog window stuck after updating to 10.8
Since the release of 10.8 it seems that all SD notifications are getting stuck on our clients after installing an application.
Confirmed that reverting the script to 10.7 does resolve it
Same Problem here with 10.8
This isn't built-in to installomator.. which script are you using? Please provide a link to the specific script you're using.
This isn't built-in to installomator.. which script are you using? Please provide a link to the specific script you're using.
apologies, I'm using the following: https://github.com/Installomator/Installomator/blob/main/MDM/MDMs%20with%20local%20installed%20Installomator/App-install%20SS%20with%20swiftDialog%20and%20dockutil/App%20normal%20SS.sh
I use also the "App normal SS.sh".
There's been a change in Swiftdialog command file permissions, see: https://github.com/swiftDialog/swiftDialog/releases/tag/v2.5.5
There's been a change in Swiftdialog command file permissions, see: https://github.com/swiftDialog/swiftDialog/releases/tag/v2.5.5
This was released back in December though where this issue only started last weekend. Are you able to expand on why this has started impacting us?
It's the if statement at the end. I'm not sure if using it is in error or something has changed in Jamf swiftDialog.. but remove the if statement at line 276. You still want the commands inside the statement. So just remove line 276 and line 291, and test.
It's the if statement at the end. I'm not sure if using it is in error or something has changed in Jamf swiftDialog.. but remove the if statement at line 276. You still want the commands inside the statement. So just remove line 276 and line 291, and test.
We are using Intune. I can confirm, that commenting out line 276 and line 291 resolves the problem. But this is just a workaround.
The if statement fails, because the Installomator version is not extracted correctly
The main problem ist line 117
installomatorVersion="$(${destFile} version | cut -d "." -f1 || true)"
echo $installomatorVersion
2025-04-11 14:50:25 : INFO : version : Total items in argumentsArray: 0
2025-04-11 14:50:25 : INFO : version : argumentsArray:
10
Replace line 117 with:
installomatorVersion="$(${destFile} version | grep -Eo '[0-9]+\.[0-9]+' | head -1 | cut -d '.' -f1)"
echo $installomatorVersion
10
This will fix the Problem.
PR #2324
Any reason why you're cutting the minor version number off the end?
This seems to work fine too
installomatorVersion="$(${destFile} version | grep -Eo '[0-9]+\.[0-9]+' | head -1)"
@tully-systima I guess, because it was cut before as well and the minor version seems not to be needed.
Bash does not support floating-point (decimal) arithmetic in [[ ... -lt ... ]] or (( ... )) expressions.
These constructs only work with integers, so using a number like 10.8 causes a syntax error.
Your Version seems to work, but gives me a syntax error.
[[: 10.8: syntax error: invalid arithmetic operator (error token is ".8")
Keep in mind Installomator is zsh, not bash.
So after investigating this I found a few additional situations that could be causing the Dialog window to not close correctly after the script ends.
Biggest one is that any errors experienced in the installomator.sh script that caused an exit would also exit the App normal SS script, leaving dialog running without calling dialogUpdate "quit:"
So I have a few improvements that can assist: #2455
-
update shebang to
#!/bin/zsh --no-rcs -
Added an early exit if no label has been set, preventing launching the Dialog process for doomed scripts
-
Improved
installomatorVersionstring parsing (adapted from @5h4rk1337 ):
installomatorVersion="$(${destFile} version | grep -Eo '[0-9]+\.[0-9]+' | head -1)"
- Set
Installomator.shscript to run in a subshell, and store logs in a unique temp directory for each process. This is to prevent Installomator script exit commands originating from errors insideInstallomator.shfrom exiting theApp normal SSscript early, which prevents graceful close of the Dialog process. Output is saved to a temp directory rather than directly into/tmp, to prevent multiple simultaneous scripts from cross contaminating logs:
temp_dir=$(mktemp -d)
(
exec "${destFile}" "${item}" ${installomatorOptions} ${installomatorNotify}
) > "${temp_dir}/install_${item}_output.log" 2>&1
installomatorExitCode=$?
cmdOutput="$(cat ${temp_dir}/install_${item}_output.log; echo "exit code $installomatorExitCode")"
checkCmdOutput "${cmdOutput}"
- improved installomatorVersion and macOS Build version checks to accomodate for minor version numbers
if [[ $(echo "$installomatorVersion < 10" | bc -l) -eq 1 ]] || [[ $(sw_vers -buildVersion | cut -c1-2) -lt 20 ]]; then
- added
dialogUpdate "quit:"tocaffexitto attempt graceful dialog closure if it has not already been done prior to script exit, followed by a force quit of the dialog PIDcaffexitin case it is still running after graceful exit command. Only the dialog PID generated by this script is closed, preventing any unrelated, simultaneous dialog processes from being closed:
# No sleeping
/usr/bin/caffeinate -d -i -m -u &
caffeinatepid=$!
caffexit () {
kill "$caffeinatepid"
dialogUpdate "quit:"
# Kill dialog if it's still running
[[ -n "$dialogPID" ]] && kill -0 "$dialogPID" 2>/dev/null && kill "$dialogPID" 2>/dev/null || true
exit $1
}
- modified LOGO argument parsing for the main installation command, to only include the LOGO argument if it is not empty, avoiding errors
[[ -n "$LOGO" ]] && installomatorOptions="LOGO=$LOGO ${installomatorOptions}"