0

Recently I updated to the latest Xcode on my MacBook Pro (16-inch 2019), and it it was hang in the process of installation. I looked at question like Latest version of Xcode stuck on installation (12.5) but it was not clear if my installation process was actually stuck. How do I know if install process is actually progressing or not?

hshib
  • 1,691
  • 1
  • 17
  • 22
  • Marco Eidinger: [How to monitor progress of Xcode installation from App Store](https://marcoeidinger.medium.com/how-to-monitor-progress-of-xcode-installation-from-app-store-4fb4077ee5aa), March 2022 – Martin Thoma Aug 03 '23 at 08:49

1 Answers1

0

Turned out that my installation was much longer than I expected and eventually it completed successfully.

I found that the installation daemon installd logs its progress in /var/log/install.log. And here is an example of the complete process.

First, it starts like this:

2023-01-23 10:35:31-05 MacBook-Pro installd[867]: PackageKit: Bundle com.apple.USDLib.FormatLoader-Xcode is nested inside upgrade-bundle or atomic-update-bundle and will not be version-checked
2023-01-23 10:35:31-05 MacBook-Pro installd[867]: PackageKit: Bundle com.apple.dt.Xcode.LicenseAgreementXPCService is nested inside upgrade-bundle or atomic-update-bundle and will not be version-checked
2023-01-23 10:35:31-05 MacBook-Pro installd[867]: PackageKit: Bundle com.apple.dt.Xcode.PlaygroundLiveViewHost is nested inside upgrade-bundle or atomic-update-bundle and will not be version-checked
2023-01-23 10:35:31-05 MacBook-Pro installd[867]: PackageKit: Bundle com.apple.dt.Xcode.PlaygroundStub-macosx is nested inside upgrade-bundle or atomic-update-bundle and will not be version-checked
2023-01-23 10:35:31-05 MacBook-Pro installd[867]: PackageKit: Bundle com.apple.dt.Xcode.XcodeSelectXPCService is nested inside upgrade-bundle or atomic-update-bundle and will not be version-checked
2023-01-23 10:38:09-05 MacBook-Pro installd[867]: PackageKit: Extracting file:///var/folders/5f/044xz5057bb6266jr42vbt6m0000gr/C/com.apple.appstoreagent/com.apple.appstore/140F09B0-B312-4CDD-92F0-CE847B4D62CF/encrypted7887227484858260315.pkg#Xcode.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root, uid=0)

This "Extracting file" can take a while. About 11 minutes on my system.

2023-01-23 10:38:09-05 MacBook-Pro installd[867]: PackageKit: Extracting file:///var/folders/5f/044xz5057bb6266jr42vbt6m0000gr/C/com.apple.appstoreagent/com.apple.appstore/140F09B0-B312-4CDD-92F0-CE847B4D62CF/encrypted7887227484858260315.pkg#Xcode.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root, uid=0)
2023-01-23 10:48:56-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app

Then it gets busy for a while with this first line of "Applying atomic-update", until it starts spewing out large number of "Applying atomic-update" down the bundle tree.

2023-01-23 10:48:56-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app
2023-01-23 11:04:38-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app/Contents/Applications/Accessibility Inspector.app
2023-01-23 11:04:38-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app/Contents/Applications/Accessibility Inspector.app/Contents/Frameworks/AccessibilityAuditDeviceManager.framework
2023-01-23 11:04:38-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app/Contents/Applications/Accessibility Inspector.app/Contents/Frameworks/AccessibilityAuditDeviceManager.framework/Versions/A/XPCServices/axAuditService.xpc
...
2023-01-23 11:05:07-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app/Contents/XPCServices/com.apple.dt.Xcode.PlaygroundStub-macosx.xpc
2023-01-23 11:05:07-05 MacBook-Pro installd[867]: PackageKit: Applying atomic-update from bundle at Applications/Xcode.app/Contents/XPCServices/com.apple.dt.Xcode.XcodeSelectXPCService.xpc
2023-01-23 11:05:07-05 MacBook-Pro installd[867]: PackageKit: Verifying code signature on /Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root/Applications/Xcode.app

After large amount of output, I guess for all the files within the bundle for short period of time - about 30 seconds on my system - it stops with message "Verifying code signature on ...". This process, again, takes a while. About 20 minutes on my system.

2023-01-23 11:05:07-05 MacBook-Pro installd[867]: PackageKit: Verifying code signature on /Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root/Applications/Xcode.app
2023-01-23 11:26:06-05 MacBook-Pro installd[867]: PackageKit: Writing receipt for com.apple.pkg.Xcode to /Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root

After the signature verification, it is almost done. It spews out the last batch of large output like the following, "shoving" it way though the last stretch:

2023-01-23 11:26:06-05 MacBook-Pro installd[867]: PackageKit: Writing receipt for com.apple.pkg.Xcode to /Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: prevent user idle system sleep
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: suspending backupd
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Wrote MAS receipt into Applications/Xcode.app
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Wrote MAS Metadata into Applications/Xcode.app
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/CC2B12E9-2987-4241-861A-0AC222E42FBA.sandboxTrash for sandbox /Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox
2023-01-23 11:26:07-05 MacBook-Pro install_monitor[16343]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Shoving /Library/InstallerSandboxes/.PKInstallSandboxManager/CC2B12E9-2987-4241-861A-0AC222E42FBA.activeSandbox/Root (2 items) to /
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Touched bundle /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/GPUToolsPlatform/GPUToolsAgent.app
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Touched bundle /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Helpers/backgroundinstruments.app
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Touched bundle /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Interface Builder/Plug-ins/CocoaPlugin.ibplugin/Contents/Resources/IBCocoaSimulator.app
2023-01-23 11:26:07-05 MacBook-Pro installd[867]: PackageKit: Touched bundle /Applications/Xcode.app/Contents/Applications/Accessibility Inspector.app
...
 file:///Applications/Xcode.app/Contents/Developer/usr/share/xcs/CouchDB/lib/erlang/lib/ssl-5.3.3/ebin/ssl.app for uid 504
2023-01-23 11:26:27-05 MacBook-Pro appstoreagent[861]: PackageKit: Registered bundle file:///Applications/Xcode.app/Contents/Developer/usr/share/xcs/CouchDB/lib/erlang/lib/stdlib-1.19.4/ebin/stdlib.app for uid 504
2023-01-23 11:26:27-05 MacBook-Pro appstoreagent[861]: PackageKit: Registered bundle file:///Applications/Xcode.app/Contents/Developer/usr/share/xcs/CouchDB/lib/erlang/lib/syntax_tools-1.6.13/ebin/syntax_tools.app for uid 504
2023-01-23 11:26:27-05 MacBook-Pro appstoreagent[861]: PackageKit: Registered bundle file:///Applications/Xcode.app/Contents/Developer/usr/share/xcs/CouchDB/lib/erlang/lib/xmerl-1.3.6/ebin/xmerl.app for uid 504
2023-01-23 11:26:27-05 MacBook-Pro installd[867]: PackageKit: Removing client PKInstallDaemonClient pid=861, uid=504 (/System/Library/PrivateFrameworks/AppStoreDaemon.framework/Support/appstoreagent)

At this point, Xcode installation is complete, but installd is too shy to declare its accomplishment with clear log like "Xcode installation complete". With "Removing client..." it seems to be doing some kind of clean up, and installd continue to spin with high CPU, but while it is happening, Xcode in App Store is no longer spinning and you can open it successfully at this point.

hshib
  • 1,691
  • 1
  • 17
  • 22