Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install Simulators with Xcode 13.3 #840

Closed
Tracked by #9136
mattleibow opened this issue Mar 26, 2022 · 4 comments
Closed
Tracked by #9136

Can't install Simulators with Xcode 13.3 #840

mattleibow opened this issue Mar 26, 2022 · 4 comments
Labels
apple iOS/tvOS/WatchOS/Mac Catalyst area emulator Related to an emulator/Simulator

Comments

@mattleibow
Copy link
Member

Full log: https://gist.github.com/mattleibow/4d551394ca711f4fffe0bf16f106c33f
CI build: https://dev.azure.com/xamarin/public/_build/results?buildId=58576&view=logs&s=d749bf34-c6fe-53af-7b97-b5d9438515d1&j=abf35427-a90f-5194-b09a-51213529ce25

info: Downloaded 4,792.0 MB in 00:01:25
info: Mounting '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg' into '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg-mount'...
dbug: Running hdiutil attach /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg -mountpoint /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg-mount -quiet -nobrowse
dbug: Process hdiutil exited with 0
info: Expanding '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg-mount/iPhoneSimulatorSDK14_5.pkg' into '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer-expanded-pkg'...
dbug: Running pkgutil --expand /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg-mount/iPhoneSimulatorSDK14_5.pkg /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer-expanded-pkg
dbug: Process pkgutil exited with 0
info: Creating fixed package '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed.pkg' from '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer-expanded-pkg'...
dbug: Running pkgutil --flatten /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer-expanded-pkg /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed.pkg
dbug: Process pkgutil exited with 0
info: Installing '/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed.pkg'...
dbug: Running sudo installer -pkg /var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed.pkg -target / -verbose -dumplog
dbug: Process sudo exited with 1
dbug: Error output:
      Mar 25 22:03:21  installer[43404] <Debug>: Referenced component packages (1) trustLevel=100
      Mar 25 22:03:21  installer[43404] <Debug>: -[IFPKGDerivedDocument sortedPackageLocations]: result = (
      	    "file://localhost"
      	)
      Mar 25 22:03:21  installer[43404] <Debug>: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
      Mar 25 22:03:21  installer[43404] <Debug>: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/private/var/folders/_8/hms5xvl569sgtlt0m_5y0l040000gn/T/simulator-installer/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed.pkg
      Mar 25 22:03:21  installer[43404] <Info>: Set authorization level to root for session
      Mar 25 22:03:21  installer[43404] <Info>: Authorization is being checked, waiting until authorization arrives.
      Mar 25 22:03:21  installer[43404] <Info>: Administrator authorization granted.
      Mar 25 22:03:21  installer[43404] <Info>: Packages have been authorized for installation.
      Mar 25 22:03:21  installer[43404] <Debug>: Will use PK session
      Mar 25 22:03:21  installer[43404] <Debug>: Using authorization level of root for IFPKInstallElement
      Mar 25 22:04:18  installer[43404] <Info>: Starting installation:
      Mar 25 22:04:18  installer[43404] <Notice>: Configuring volume "Macintosh HD"
      Mar 25 22:04:18  installer[43404] <Info>: Preparing disk for local booted install.
      Mar 25 22:04:18  installer[43404] <Notice>: Free space on "Macintosh HD": 357.53 GB (357525172224 bytes).
      Mar 25 22:04:18  installer[43404] <Notice>: Create temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.43404VtP1Oc"
      Mar 25 22:04:18  installer[43404] <Notice>: IFPKInstallElement (1 packages)
      Mar 25 22:04:18  installer[43404] <Info>: Current Path: /usr/sbin/installer
      Mar 25 22:04:18  installer[43404] <Info>: Current Path: /usr/bin/sudo
      Mar 25 22:04:18  installer[43404] <Notice>: PackageKit: Enqueuing install with framework-specified quality of service (utility)
      Mar 25 22:08:23  installer[43404] <Debug>: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=120 "An unexpected error occurred while moving files to the final destination." UserInfo={NSUnderlyingError=0x60000b164690 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}, NSLocalizedDescription=An unexpected error occurred while moving files to the final destination., arguments=(
      	    "-f",
      	    "-s",
      	    "/Library/InstallerSandboxes/.PKInstallSandboxManager/7A793056-D484-46B6-861E-EC1B3ECABC42.activeSandbox/Root",
      	    "/"
      	)}
      Mar 25 22:08:23  installer[43404] <Error>: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
      
fail: Failed to install package:
      installer: Package name is com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed
      installer: Installing at base path /
      installer: Preparing for installation….....
      installer: Preparing the disk….....
      installer: Preparing com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325-fixed….....
      installer: Waiting for other installations to complete….....
      installer: Configuring the installation….....
      installer: 	
      installer: Validating packages….....
      installer: Writing files….....
      installer: Running package scripts….....
      installer: Validating packages….....
      installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.)
@premun premun added apple iOS/tvOS/WatchOS/Mac Catalyst area emulator Related to an emulator/Simulator labels Mar 29, 2022
@premun premun changed the title xharness can't install simulators with xcode 13.3 Can't install Simulators with Xcode 13.3 Mar 31, 2022
@rmarinho
Copy link
Member

This is breaking the MAUI team, all or device tests on iOS depend on this feature that was working before

@premun
Copy link
Member

premun commented Apr 11, 2022

Copying details from the Teams thread:

Seems like that this command is broken with Xcode 13.3:

(succeeded, stdout) = await ExecuteCommand("sudo", TimeSpan.FromMinutes(15), "installer", "-pkg", fixed_path, "-target", "/", "-verbose", "-dumplog");

This is the actual error:

Apr 8 09:17:23 installer[5578] : install:didFailWithError:Error Domain=PKInstallErrorDomain Code=120 "An unexpected error occurred while moving files to the final destination." UserInfo={NSUnderlyingError=0x600002cec930 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}, NSLocalizedDescription=An unexpected error occurred while moving files to the final destination., arguments=(
"-f",
"-s",
"/Library/InstallerSandboxes/.PKInstallSandboxManager/1A93F4FD-ED1E-403E-9164-E1743BEEC14B.activeSandbox/Root",
"/"
)}

@premun
Copy link
Member

premun commented Apr 12, 2022

Seems like this is only happening on MAUI infra as I can repro locally and on Helix: https://helix.dot.net/api/jobs/681c4639-9427-4dc6-ad18-1097bb4dc1ae/workitems/sudo-rm-rfv-usersh/console?api-version=2019-06-17

@premun
Copy link
Member

premun commented Apr 28, 2022

This seems like an issue with MAUI infra (permissions set up wrong) as they cannot install a .pkg. Nothing to do with XHarness at that level.

Works in Helix without problems as shown above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple iOS/tvOS/WatchOS/Mac Catalyst area emulator Related to an emulator/Simulator
Projects
None yet
Development

No branches or pull requests

3 participants