grahampugh / erase-install

A script that automates downloading macOS installers, and optionally erasing or upgrading macOS in a single process. Watch the video!
https://grahamrpugh.com/2023/05/14/macaduk-presentation-eraseinstall.html
Apache License 2.0
836 stars 131 forks source link

Error obtaining valid installer. Cannot continue. #386

Closed sbrother59 closed 1 year ago

sbrother59 commented 1 year ago

Describe the bug Impossible to upgrade macOS to Ventura To Reproduce Script result: [erase-install-launcher] Starting script "/Library/Management/erase-install/erase-install.sh" --os 13 --update --reinstall --confirm --no-fs --min-drive-space 37 --cleanup-after-use --postinstall-command "jamf recon"

Expected behavior I would upgrade to macOS Ventura

Code/log output



   [erase-install] v27.3 script execution started: Fri Mar 31 15:47:58 CEST 2023
   [erase-install] Caffeinating this script (pid=4118)
   [check_free_space] OK - 405 GB free/purgeable disk space detected
   [erase-install] Looking for existing installer app or pkg
   [find_existing_installer] No valid installer found.
   [erase-install] Existing installer does not match requested OS, so replacing...
   [overwrite_existing_installer] Deleting existing cached installer(s).
   [erase-install] Running on architecture i386
   [erase-install] Opening jamfHelper download message (language=fr)
   [check_installinstallmacos] installinstallmacos.py is in /Library/Management/erase-install
   [check_python] Relocatable Python is installed in /Library/Management/erase-install
   [run_installinstallmacos] Checking that selected OS 13 is available

   [run_installinstallmacos] This command is now being run:

   installinstallmacos.py --workdir /Library/Management/erase-install --ignore-cache --raw --os 13 --validate
Error reading /Library/Management/erase-install/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/InstallAssistantAuto.smd: not well-formed (invalid token): line 108, column 52

installinstallmacos.py - get macOS installers from the Apple software catalog

This Mac:
Model Identifier : MacBookPro16,2

Bridge ID        : J214kAP
Board ID         : Mac-5F9802EFE386AA28
OS Version       : 10.15.7
Build ID         : 19H2026

Traceback (most recent call last):
  File "/Library/Management/erase-install/installinstallmacos.py", line 1388, in <module>
    main()
  File "/Library/Management/erase-install/installinstallmacos.py", line 976, in main
    product_info = os_installer_product_info(
  File "/Library/Management/erase-install/installinstallmacos.py", line 700, in os_installer_product_info
    if not product_info[product_key]["title"]:
KeyError: 'title'
   [run_installinstallmacos] Error obtaining valid installer. Cannot continue.

   [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1047:  4130 Terminated: 15          /usr/bin/caffeinate -dimsu -w $$

   [erase-install] attempting to terminate the 'jamfHelper' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1047:  4155 Terminated: 15          "$jamfHelper" -windowType hud -windowPosition ul -title "${!dialog_dl_title}" -alignHeading center -alignDescription left -description "${!dialog_dl_desc}" -lockHUD -icon "$dialog_dl_icon" -iconSize 100

   [finish] Script exit code: 1
[erase-install-launcher] Exit (1)```

**Environment (please complete the following information):**
 - From OS version 10.15.7
 - To BigSur or Monterey Or Ventura
 - erase-install version 27.3

Regards,
Simon.
grahampugh commented 1 year ago

Please clear the /Library/Management/erase-install/content folder and try again.

sbrother59 commented 1 year ago

thx, it's fixed for one, I will test to other users and will do a feedback maybe for my case best practice is add at the start of the script:

rm -rf /Library/Management/erase-install/content/* ?

sbrother59 commented 1 year ago

It works fine on other user, so the remove of /content fix.

thx