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
834 stars 131 forks source link

[BUG] timeout reached for PID #523

Open RiversideKid opened 3 weeks ago

RiversideKid commented 3 weeks ago

Describe the bug This has only happened when trying to upgrade from Monterey to Sonoma. Ventura to Sonoma works fine. When running startosinstall the log file indicates that "could not get authorization..." and then indicates that a timeout has been reached. After reaching the same errors on several Monterey computers we pulled the requirement from all Monterey computers.

To Reproduce

Expected behavior A clear and concise description of what you expected to happen. We had expected that the OS would upgrade to Sonoma like the Ventura computers do, but the Monterey computers have all failed with the above error.

Code/log output Please supply the full command used, and if applicable, add full output from Terminal or from /var/log/erase-install.log. Don't post a partial log - I need the whole thing. Either upload the log as a file, or paste the output in a code block like this:

[STEP 1 of 6]
Executing Policy UPGRADE-TO-SONOMA
[STEP 2 of 6]
Downloading erase-install-v35.0.pkg...
Downloading https://jss***/jcds/downloads/erase-install-v35.0.pkg...
Installing erase-install-v35.0.pkg...
Successfully installed erase-install-v35.0.pkg.
[STEP 3 of 6]
[STEP 4 of 6]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 5 of 6]
Running command /Library/Management/erase-install/erase-install.sh --os 14 --update --reinstall --confirm...
Result of command:
2024-08-13 10:56:34 | v35.0 | [log_rotate] Finished rotating logs in /Library/Management/erase-install/log

2024-08-13 10:56:34 | v35.0 | [erase-install] v35.0 script execution started: Tue Aug 13 10:56:34 EDT 2024

2024-08-13 10:56:34 | v35.0 | [erase-install] Arguments provided: --os 14 --update --reinstall --confirm
2024-08-13 10:56:34 | v35.0 | [set_localisations] Set language to en-US
2024-08-13 10:56:34 | v35.0 | [erase-install] System version: 12.2.1 (Build: 21D62)
2024-08-13 10:56:35 | v35.0 | [check_for_swiftdialog_app] swiftDialog v2.5.0.4768 is installed (/Library/Application Support/Dialog/Dialog.app)
2024-08-13 10:56:35 | v35.0 | [check_for_swiftdialog_app] Creating dialog log (/var/tmp/dialog.cxv)...
2024-08-13 10:56:35 | v35.0 | [erase-install] Caffeinating this script (pid=60263)
2024-08-13 10:56:35 | v35.0 | [check_free_space] OK - 382 GB free/purgeable disk space detected
2024-08-13 10:56:35 | v35.0 | [erase-install] Looking for existing installer app or pkg
2024-08-13 10:56:35 | v35.0 | [find_existing_installer] Installer found at /Applications/Install macOS Sonoma.app.
2024-08-13 10:56:35 | v35.0 | [check_installer_is_valid] Checking validity of /Applications/Install macOS Sonoma.app.
Volume Shared Support on disk4s2 force-unmounted
2024-08-13 10:56:35 | v35.0 | [check_installer_is_valid] Mounting /Applications/Install macOS Sonoma.app/Contents/SharedSupport/SharedSupport.dmg
2024-08-13 10:56:36 | v35.0 | [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml
2024-08-13 10:56:36 | v35.0 | [check_installer_is_valid] ERROR: Installer is incompatible with system
Volume Shared Support on disk4s2 force-unmounted
2024-08-13 10:56:38 | v35.0 | [check_installer_is_valid] Installer: 23G93 >= System: 21D62 : valid build.
2024-08-13 10:56:38 | v35.0 | [erase-install] Checking for newer installer
2024-08-13 10:56:38 | v35.0 | [check_for_mist] mist-cli v2.1 is installed (/usr/local/bin/mist)
2024-08-13 10:56:38 | v35.0 | [check_newer_available] Restricting to selected OS '14'
┌──────────────────┐
│ UPDATE AVAILABLE │
└──────────────────┘
  ├─ [0;0mThere is a mist update available (current version: 2.1, latest version: 2.1.1)[0;0m
  ├─ [0;0mVisit https://github.com/ninxsoft/mist-cli to grab the latest release of mist[0;0m
┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ List search string will be 'Sonoma'...
  ├─ Search only for latest (first) result will be 'true'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible installers will be 'true'...
  ├─ Export path will be '/Library/Management/erase-install/mist-list.json'...
  ├─ Export path file extension is valid...
  ├─ Output type will be 'ascii'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS Installer versions...
  ├─ Exported list as JSON: '/Library/Management/erase-install/mist-list.json'
  └─ Found 1 macOS Installer(s) available for download

[0;0m┌────────────┬──────────────┬─────────┬───────┬──────────┬────────────┬────────────┐
│ IDENTIFIER │ NAME         │ VERSION │ BUILD │ SIZE     │ DATE       │ COMPATIBLE │
├────────────┼──────────────┼─────────┼───────┼──────────┼────────────┼────────────┤
[0;0m[0;0m│ [0;0m062-58676 [0;0m │ [0;0mmacOS Sonoma[0;0m │ [0;0m14.6.1 [0;0m │ [0;0m23G93[0;0m │ [0;0m13.68 GB[0;0m │ [0;0m2024-08-07[0;0m │ [0;0mTrue      [0;0m │
[0;0m[0;0m└────────────┴──────────────┴─────────┴───────┴──────────┴────────────┴────────────┘
[0;0m
Comparing latest build found (23G93) with cached installer build (23G93)
2024-08-13 10:56:39 | v35.0 | [check_newer_available] No newer builds found
2024-08-13 10:56:39 | v35.0 | [erase-install] Running on architecture arm64
2024-08-13 10:56:39 | v35.0 | [get_user_details] ask for user credentials (attempt 1/5)
2024-08-13 10:56:39 | v35.0 | [get_default_dialog_args] Invoking utility dialog
yes **User** is a member of everyone
2024-08-13 10:56:55 | v35.0 | [get_user_details] **User** is a Volume Owner
2024-08-13 10:56:55 | v35.0 | [check_password] Success: the password entered is the correct login password for **User**.
2024-08-13 10:56:55 | v35.0 | [erase-install] Installer is at: /Applications/Install macOS Sonoma.app
2024-08-13 10:56:55 | v35.0 | [check_free_space] OK - 382 GB free/purgeable disk space detected

2024-08-13 10:56:55 | v35.0 | [erase-install] WARNING! Running /Applications/Install macOS Sonoma.app with reinstall option

2024-08-13 10:56:55 | v35.0 | [erase-install] Sending quit message to dialog log (/var/tmp/dialog.cxv)
2024-08-13 10:56:55 | v35.0 | [get_default_dialog_args] Invoking utility dialog
{

}
2024-08-13 10:56:57 | v35.0 | [erase-install] User CONFIRMED erase-install or reinstall
PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced
2024-08-13 10:56:57 | v35.0 | [get_default_dialog_args] Invoking fullscreen dialog
2024-08-13 10:56:58 | v35.0 | [launch_startosinstall] This is the startosinstall command that will be used:
2024-08-13 10:56:58 | v35.0 | [launch_startosinstall] /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/startosinstall --pidtosignal 60263 --agreetolicense --nointeraction --allowremoval --forcequitapps --stdinpass --user **User** 
2024-08-13 10:56:58 | v35.0 | [launch_startosinstall] Launching startosinstall...
File Doesn't Exist, Will Create: /Library/LaunchDaemons/com.github.grahampugh.erase-install.startosinstall.plist
2024-08-13 10:56:58 | v35.0 | [erase-install] Sending password to startosinstall
Error: could not get authorization...
By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms.
If you do not agree, press CTRL-C and cancel this process immediately.
2024-08-13 11:56:58 | v35.0 | [erase-install] Timeout reached for PID 60769!
2024-08-13 11:56:58 | v35.0 | [erase-install] Reached end of script unexpectedly. This probably means startosinstall failed to complete within 60 minutes.

2024-08-13 11:56:58 | v35.0 | [erase-install] terminating the process 'caffeinate' process

2024-08-13 11:56:58 | v35.0 | [finish] sending quit message to dialog (/var/tmp/dialog.cxv)
2024-08-13 11:56:58 | v35.0 | [finish] Script exit code: 42
[STEP 6 of 6]

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

Environment (please complete the following information):

Additional context Add any other context about the problem here. We have confirmed that each of the failures have occurred on computers running:

Could this be a known issue? (I know that I am late to the party, but I expected that this would work on a Monterey computer.) Thank you in advance for any information