Also, I have tried deleting the file in question "Install_macOS_13.0.1-22A400.sparseimage" and then re-running the script but it fails with the same error.
I think it has to do with the Info.plist file being referenced, but I'm not sure where that file comes from.
Also, I have tried deleting the file in question "Install_macOS_13.0.1-22A400.sparseimage" and then re-running the script but it fails with the same error.
I think it has to do with the Info.plist file being referenced, but I'm not sure where that file comes from.
So I re-read the documentation on erase-install and i thought maybe the --update flag was interferring so I changed the command line to this
Running command /Library/Management/erase-install/erase-install.sh --reinstall --os=13 --overwrite --current-user --min-drive-space=60 --check-power --depnotify
However, I still see the same error in the log
Result of command:
[erase-install] v27.1 script execution started: Mon Dec 12 09:06:32 CST 2022
[erase-install] Caffeinating this script (pid=1294)
[check_free_space] OK - 447 GB free/purgeable disk space detected
[check_power_status] OK - AC power detected
[erase-install] Looking for existing installer app or pkg
[find_existing_installer] Installer sparse image found at /Library/Management/erase-install/Install_macOS_13.0.1-22A400.sparseimage.
[check_installer_is_valid] Checking validity of .
[check_installer_is_valid] Using DTSDKBuild value from Info.plist
[check_installer_is_valid] Installer Info.plist could not be found!
[check_installer_is_valid] Build of existing installer could not be found, so it is assumed to be invalid.
[erase-install] ERROR: Invalid installer is present. Run with --overwrite option to ensure that a valid installer is obtained.
[erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1046: 1313 Terminated: 15 /usr/bin/caffeinate -dimsu -w $$
[finish] Script exit code: 1
So I re-read the documentation on erase-install and i thought maybe the --update flag was interferring so I changed the command line to this
Running command /Library/Management/erase-install/erase-install.sh --reinstall --os=13 --overwrite --current-user --min-drive-space=60 --check-power --depnotify
However, I still see the same error in the log
Result of command:
[erase-install] v27.1 script execution started: Mon Dec 12 09:06:32 CST 2022
[erase-install] Caffeinating this script (pid=1294)
[check_free_space] OK - 447 GB free/purgeable disk space detected
[check_power_status] OK - AC power detected
[erase-install] Looking for existing installer app or pkg
[find_existing_installer] Installer sparse image found at /Library/Management/erase-install/Install_macOS_13.0.1-22A400.sparseimage.
[check_installer_is_valid] Checking validity of .
[check_installer_is_valid] Using DTSDKBuild value from Info.plist
[check_installer_is_valid] Installer Info.plist could not be found!
[check_installer_is_valid] Build of existing installer could not be found, so it is assumed to be invalid.
[erase-install] ERROR: Invalid installer is present. Run with --overwrite option to ensure that a valid installer is obtained.
[erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1046: 1313 Terminated: 15 /usr/bin/caffeinate -dimsu -w $$
[finish] Script exit code: 1
In doing more research I found this link https://github.com/grahampugh/erase-install/issues/316 that others are having this issue as well.
I went back to a successfully upgraded Mac and noticed that there was a "content" folder in the erase-install folder that no one had access to. I gave myself permissions and deleted it and it seems to be upgrading as expected now. Fingers crossed....
So this is the issue, it turns out. I deleted the "content" folder and it works as expected. Not sure what is causing this but I will be adding a line to remove that folder.
Great find! This just started popping up for some of my users as well. Some upgrades are working without issue, but some result in the error of the installer being invalid. I'll try your method and see if that works.
So this is the issue, it turns out. I deleted the "content" folder and it works as expected. Not sure what is causing this but I will be adding a line to remove that folder.
Are you able to share the new script you used that ended up working out?
Are you able to share the new script you used that ended up working out?
@AbeTechster, here is the script we use. This calls the SwiftDialog script and seems to work for us. It is the standard one most have found on GitHub with the two statements for deleting the damaged download and other previous installers. We have not received any additional failures related to the script.
Hope this helps...
#!/bin/bash
:<<DOC
This script was created on 12/12/22 to
address an issue with the upgrade download
process in erase-install where is creates
this folder. Then it starts the swiftDialog
process.
DOC
#Deletes Content folder
sudo rm -Rf /Library/Management/erase-install/content
#Deletes any previous installers
sudo rm -f /Library/Management/erase-install/Install_macOS*
dialog="/usr/local/bin/dialog"
if [[ -n ${4} ]]; then titleoption="--title"; title="${4}"; fi
if [[ -n ${5} ]]; then messageoption="--message"; message="${5}"; fi
if [[ -n ${6} ]]; then iconoption="--icon"; icon="${6}"; fi
if [[ -n ${7} ]]; then overlayoption="--overlayicon"; overlayicon="${7}"; fi
if [[ -n ${8} ]]; then button1option="--button1text"; button1text="${8}"; fi
if [[ -n ${9} ]]; then button2option="--button2text"; button2text="${9}"; fi
extraflags=${10}
action=${11}
${dialog} \\
${titleoption} "${title}" \\
${messageoption} "${message}" \\
${iconoption} "${icon}" \\
${overlayoption} "${overlayicon}" \\
${button1option} "${button1text}" \\
${button2option} "${button2text}" \\
${10}
returncode=$?
case ${returncode} in
0) echo "Pressed Button 1"
## Process exit code 0 scenario here
;;
2) echo "Pressed Button 2"
## Process exit code 2 scenario here
;;
3) echo "Pressed Button 3"
## Process exit code 3 scenario here
;;
*) echo "Something else happened. exit code ${returncode}"
## Catch all processing
;;
esac
# make sure script exits cleanly otherwise Self Service will complain if it's anything other than 0
exit 0

