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
847 stars 132 forks source link

[BUG] Timeout reached for PID 82808! #537

Open rhype opened 4 hours ago

rhype commented 4 hours ago

Describe the bug A clear and concise description of what the bug is. I get an error in the preparing to run the installer phrase. The progress bar shows as stuck at 48% for a long time, then it times-out and goes back to the desktop.

To Reproduce

Expected behavior A clear and concise description of what you expected to happen.

I expect the user to get prompted for their credentials, then to connect their power cable if it is disconnected, and then there is a preparation to run the installer, once the prep is completed successfully the computer will reboot and start upgrading.

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:

`

!/bin/zsh

shellcheck shell=bash

: <<DOC erase-install run/postinstall script for running a policy trigger to install erase-install and then running erase-install with chosen parameters by Graham Pugh

Substitute parameters as required for other OSs and workflows.

To see all possible parameters, run erase-install.sh --help DOC

call a policy to install erase-install

jamf policy -event install-erase-install

run erase-install with parameters of your choice

/Library/Management/erase-install/erase-install.sh --reinstall --version 14.7.1 --check-power --fs

`


STEP 1 of 5]
--
Executing Policy Upgrade to Latest macOS Installer by script
[STEP 2 of 5]
Running script upgrade-to-latest-macos.sh...
Script exit code: 42
Script result: Checking for policies triggered by "install-erase-install" for user "user.name"...Executing Policy Install erase-install Downloading erase-install-36.0.pkg... Downloading https://xyz.jamfcloud.com/jcds/downloads/erase-install-36.0.pkg... Verifying package integrity... Installing erase-install-36.0.pkg... Successfully installed erase-install-36.0.pkg. Running Recon... Retrieving inventory preferences from https://xyz.jamfcloud.com/... Finding extension attributes... Locating accounts... Locating applications... Searching path: /System/Applications Locating software updates... Locating printers... Locating package receipts... Gathering application usage information from the JamfDaemon... Locating plugins... Searching path: /Library/Internet Plug-Ins Locating hard drive information... Searching path: /Applications Locating hardware information (macOS 14.6.1)... Submitting data to https://xyz.jamfcloud.com/... <computer_id>1487</computer_id> Submitting log to https://xyz.jamfcloud.com/
2024-11-15 10:58:49 \| v36.0 \| [log_rotate] Finished rotating logs in /Library/Management/erase-install/log  2024-11-15 10:58:49 \| v36.0 \| [erase-install] v36.0 script execution started: Fri Nov 15 10:58:49 EST 2024  2024-11-15 10:58:49 \| v36.0 \| [erase-install] Arguments provided: --reinstall --version 14.7.1 --check-power 2024-11-15 10:58:49 \| v36.0 \| [set_localisations] Set language to en-US 2024-11-15 10:58:49 \| v36.0 \| [erase-install] System version: 14.6.1 (Build: 23G93) 2024-11-15 10:58:50 \| v36.0 \| [erase-install] A newer version of this script is available (36.1). Visit https://github.com/grahampugh/erase-install/releases/tag/v36.1 to obtain the latest version. 2024-11-15 10:58:50 \| v36.0 \| [check_for_swiftdialog_app] swiftDialog v2.5.0.4768 is installed (/Library/Application Support/Dialog/Dialog.app) 2024-11-15 10:58:50 \| v36.0 \| [check_for_swiftdialog_app] Creating dialog log (/var/tmp/dialog.mqs)... 2024-11-15 10:58:50 \| v36.0 \| [erase-install] Caffeinating this script (pid=81944) 2024-11-15 10:58:50 \| v36.0 \| [check_free_space] OK - 188 GB free/purgeable disk space detected 2024-11-15 10:58:50 \| v36.0 \| [erase-install] Looking for existing installer app or pkg 2024-11-15 10:58:50 \| v36.0 \| [find_existing_installer] Installer found at /Applications/Install macOS Sequoia.app. 2024-11-15 10:58:50 \| v36.0 \| [check_installer_is_valid] Checking validity of /Applications/Install macOS Sequoia.app. 2024-11-15 10:58:50 \| v36.0 \| [check_installer_is_valid] Mounting /Applications/Install macOS Sequoia.app/Contents/SharedSupport/SharedSupport.dmg 2024-11-15 10:58:51 \| v36.0 \| [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml 2024-11-15 10:58:51 \| v36.0 \| [check_installer_is_valid] Installer is compatible with system Volume Shared Support on disk4s2 force-unmounted 2024-11-15 10:58:53 \| v36.0 \| [check_installer_is_valid] Installer: 24B83 >= System: 23G93 : valid build. 2024-11-15 10:58:53 \| v36.0 \| [erase-install] Running on architecture arm64 2024-11-15 10:58:53 \| v36.0 \| [get_user_details] ask for user credentials (attempt 1/5) 2024-11-15 10:58:53 \| v36.0 \| [get_default_dialog_args] Invoking utility dialog yes user.name is a member of everyone 2024-11-15 10:59:06 \| v36.0 \| [get_user_details] user.name is a Volume Owner 2024-11-15 10:59:06 \| v36.0 \| [check_password] Success: the password entered is the correct login password for user.name. 2024-11-15 10:59:07 \| v36.0 \| [check_power_status] WARNING - No AC power detected 2024-11-15 10:59:07 \| v36.0 \| [get_default_dialog_args] Invoking utility dialog 2024-11-15 10:59:13 \| v36.0 \| [check_power_status] OK - AC power detected 2024-11-15 10:59:13 \| v36.0 \| [check_power_status] Sending quit message to dialog log (/var/tmp/dialog.mqs) 2024-11-15 10:59:13 \| v36.0 \| [erase-install] Installer is at: /Applications/Install macOS Sequoia.app 2024-11-15 10:59:13 \| v36.0 \| [check_free_space] OK - 188 GB free/purgeable disk space detected  2024-11-15 10:59:13 \| v36.0 \| [erase-install] WARNING! Running /Applications/Install macOS Sequoia.app with reinstall option  2024-11-15 10:59:13 \| v36.0 \| [erase-install] Sending quit message to dialog log (/var/tmp/dialog.mqs) curl: (3) URL rejected: Malformed input to a URL function 2024-11-15 10:59:14 \| v36.0 \| [get_default_dialog_args] Invoking fullscreen dialog 2024-11-15 10:59:14 \| v36.0 \| [launch_startosinstall] This is the startosinstall command that will be used: 2024-11-15 10:59:14 \| v36.0 \| [launch_startosinstall] /Applications/Install\ macOS\ Sequoia.app/Contents/Resources/startosinstall --pidtosignal 81944 --agreetolicense --nointeraction --allowremoval --forcequitapps --stdinpass --user user.name  2024-11-15 10:59:14 \| v36.0 \| [launch_startosinstall] Launching startosinstall... File Doesn't Exist, Will Create: /Library/LaunchDaemons/com.github.grahampugh.erase-install.startosinstall.plist 2024-11-15 10:59:14 \| v36.0 \| [erase-install] Sending password to startosinstall 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. Preparing to run macOS Installer...  Preparing: 0.0%             Preparing: 0.1%             Preparing: 0.2%             Preparing: 0.3%             Preparing: 0.4%             Preparing: 0.5%             Preparing: 0.6%             Preparing: 0.7%             Preparing: 0.8%             Preparing: 0.9%             Preparing: 1.0%             Preparing: 1.1%             Preparing: 1.2%             Preparing: 1.3%             Preparing: 1.4%             Preparing: 1.5%             Preparing: 1.6%             Preparing: 1.7%             Preparing: 1.8%             Preparing: 1.9%             Preparing: 2.0%             Preparing: 2.1%             Preparing: 2.2%             Preparing: 2.3%             Preparing: 2.4%             Preparing: 2.5%             Preparing: 2.6%             Preparing: 2.7%             Preparing: 2.8%             Preparing: 4.9%             Preparing: 5.0%             Preparing: 5.1%             Preparing: 5.2%             Preparing: 5.3%             Preparing: 5.4%             Preparing: 5.5%             Preparing: 5.6%             Preparing: 5.7%             Preparing: 5.8%             Preparing: 5.9%             Preparing: 6.0%             Preparing: 6.1%             Preparing: 6.2%             Preparing: 6.3%             Preparing: 6.4%             Preparing: 6.5%             Preparing: 6.6%             Preparing: 6.7%             Preparing: 6.8%             Preparing: 6.9%             Preparing: 7.0%             Preparing: 7.1%             Preparing: 7.2%             Preparing: 7.3%             Preparing: 7.4%             Preparing: 7.5%             Preparing: 7.6%             Preparing: 7.7%             Preparing: 7.8%             Preparing: 7.9%             Preparing: 8.0%             Preparing: 8.1%             Preparing: 8.2%             Preparing: 8.3%             Preparing: 8.4%             Preparing: 8.5%             Preparing: 8.6%             Preparing: 8.7%             Preparing: 8.8%             Preparing: 8.9%             Preparing: 9.0%             Preparing: 9.1%             Preparing: 9.2%             Preparing: 9.3%             Preparing: 9.4%             Preparing: 9.5%             Preparing: 9.6%             Preparing: 9.7%             Preparing: 9.8%             Preparing: 9.9%             Preparing: 10.0%             Preparing: 10.1%             Preparing: 10.2%             Preparing: 10.3%             Preparing: 10.4%             Preparing: 10.5%             Preparing: 10.6%             Preparing: 10.7%             Preparing: 10.8%             Preparing: 10.9%             Preparing: 11.0%             Preparing: 11.1%             Preparing: 11.2%             Preparing: 11.3%             Preparing: 11.4%             Preparing: 11.5%             Preparing: 11.6%             Preparing: 11.7%             Preparing: 11.8%             Preparing: 11.9%             Preparing: 12.0%             Preparing: 12.1%             Preparing: 12.2%             Preparing: 12.3%             Preparing: 12.4%             Preparing: 12.5%             Preparing: 12.6%             Preparing: 33.5%             Preparing: 34.1%             Preparing: 38.7%             Preparing: 38.8%             Preparing: 43.4%             Preparing: 48.1%             Preparing: 100.0%             An error occurred preparing the update. 2024-11-15 11:59:14 \| v36.0 \| [erase-install] Timeout reached for PID 82808! 2024-11-15 11:59:14 \| v36.0 \| [erase-install] Reached end of script unexpectedly. This probably means startosinstall failed to complete within 60 minutes.  2024-11-15 11:59:14 \| v36.0 \| [erase-install] terminating the process 'caffeinate' process  2024-11-15 11:59:14 \| v36.0 \| [finish] sending quit message to dialog (/var/tmp/dialog.mqs) 2024-11-15 11:59:15 \| v36.0 \| [finish] Script exit code: 42
--
Error running script: return code was 42.
[STEP 3 of 5]
[STEP 4 of 5]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 5 of 5]

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

Environment (please complete the following information):

rhype commented 4 hours ago

I also tried with the latest version (v36.1 ) and updated the parameters to reinstall 15.1.0 in the upgrade-to-latest-macos.sh because the cached installer is install macos Sequoia.app and that failed as well.

grahampugh commented 2 hours ago

Looks like it took just too long. Try using the --no-timeout option.

rhype commented 1 hour ago

I am re-trying now and I will share as soon as I have an update. Thanks!

rhype commented 17 minutes ago

The problem was my Zscaler setup, disabling it gave me a successful outcome. We can close this issue now. Thanks for your time, I appreciate the help.