Xcode watchOS 9 runtime issue

Hi,

I am attempting to run my app in Xcode 14 beta 4. It requires me to download the watchOS 9 runtime in order to build it, with a prompt which states the following:

Download Xcode support for watchOS 9.0?
This scheme builds an embedded Apple Watch app. watchOS 9.0 must be installed in order to run the scheme.

The first time I tried this, it downloaded but then showed an error which I can't remember. However, the main issue is that now I can no longer try it again. Every time I try to build my app, it shows the same prompt, but this time the download of the watchOS 9 runtime fails every time with the same message:


Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA
Domain: SimDiskImageErrorDomain
Code: 5
User Info: {
    DVTErrorCreationDateKey = "2022-07-31 14:12:11 +0000";
    unusableErrorDetail = "";
}
--


System Information

macOS Version 12.4 (Build 21F79)
Xcode 14.0 (21322) (Build 14A5284g)
Timestamp: 2022-07-31T16:12:11+02:00

As a result, I am unable to build my app. If I run the command "xcrun simctl runtime list" then I can see the 862D055C-0B48-4F10-BAF9-EB4B35F559FA that it is referring to:

== Disk Images ==
-- iOS --
iOS 12.4 (16G73) - 66A29B59-5BEF-496D-BFB0-F9C1F21A6F28 (Ready)
iOS 13.7 (17H22) - 2A03BB12-25EB-40C8-9AAC-70B0169225A7 (Ready)
iOS 14.5 (18E182) - 8C98D5B2-2130-40D4-B220-E6CDBD67F41C (Ready)
iOS 16.0 (20A5328h) - 8F909927-98C9-4FAB-8B90-048BB9A45031 (Ready)
-- watchOS --
watchOS 9.0 (20R5332f) - A8C24E46-2134-4373-8BFE-3DB9AE1F2A3D (Unusable - Other Failure: Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA)
watchOS 9.0 (20R5332f) - 862D055C-0B48-4F10-BAF9-EB4B35F559FA (Ready)
watchOS 9.0 (20R5332f) - 2A633A9E-C9C8-4AB0-AF67-45A84AC94F09 (Unusable - Other Failure: Duplicate of A8C24E46-2134-4373-8BFE-3DB9AE1F2A3D)
watchOS 9.0 (20R5332f) - 8067AFE2-75DE-460E-9E78-02CA664D0D1A (Unusable - Other Failure: Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA)
watchOS 9.0 (20R5332f) - E06DB92C-832A-429C-B8F8-376D62AA4BB9 (Unusable - Other Failure: Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA)
watchOS 9.0 (20R5332f) - ABCC542C-D2EC-472C-B82B-33E3D530D717 (Unusable - Other Failure: Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA)
watchOS 9.0 (20R5332f) - 47EACFB4-B1D2-4C9C-9276-A253F6370528 (Unusable - Other Failure: Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA)
watchOS 9.0 (20R5332f) - 6C85F221-7D10-4BE1-9573-66E8B8A805A2 (Unusable - Other Failure: Duplicate of 862D055C-0B48-4F10-BAF9-EB4B35F559FA)

However, attempts to delete it have been unsuccessful. I have uninstalled Xcode, deleted various Xcode cache files, data in the ~/Library/Developer folder as well as in the /Library/Developer folder, but it still seems to persist. It doesn't seem to be easy to delete a runtime from this list.

If I run the command "xcrun simctl runtime delete 862D055C-0B48-4F10-BAF9-EB4B35F559FA", then I get the following error:

Cannot stage disk image or bundle for delete: 862D055C-0B48-4F10-BAF9-EB4B35F559FA
Underlying error (domain=NSCocoaErrorDomain, code=4):
	“862D055C-0B48-4F10-BAF9-EB4B35F559FA.dmg” couldn’t be moved to “NSIRD_simdiskimaged_mn8bfc” because either the former doesn’t exist, or the folder containing the latter doesn’t exist.
	The file doesn’t exist.

Does anyone have any ideas about how I can resolve this?

Post not yet marked as solved Up vote post of jRustonApps Down vote post of jRustonApps
5.0k views
  • I had a similar issue and resolved by first deleting the watchOS 9.0 image that was (Ready). After deleting that one I could delete the others.

Add a Comment

Replies

It seems this issue has been resolved. I'm not entirely sure how, but I did a macOS update and now it downloaded and installed successfully.

I had this exact same issue with Xcode 14. It worked for the first time after downloading but I keep getting the download prompt after a day .What worked in my case is I have deleted the existing Watch OS 9.0 from Xcode ->Preferences -> Platforms.Then deleted derived folder.Quit Xcode and launched it back and then tried to build and upon getting this watch OS 9.0 download pop up again,I have downloaded it again. This worked.

After Long time Of many repeated downloads of the simulators and delete the old one from settings I got the right solution

According To Apple Xcode 14 Release Notes There was this issue:

It Seems If you manually unmount or detach a simulator runtime disk image (such as by using diskutil eject or umount), Simulator and Xcode may not be able to determine whether the runtime is installed or not. Attempts to re-download the runtime results in failure with a duplicate runtime error. (89589210)

Workaround:

Restarting causes Simulator to re-mount the runtime disk image. But this might not work so I Open Terminal And Remount The Images Manually Using this Command

xcrun simctl runtime add

Alternately you can use xcrun simctl runtime to locate the affected runtime disk image, delete it, then use Xcode to re-download it.