XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`xcodes runtime install` no longer working

NachoSoto opened this issue · comments

Looks like Apple must have changed something, this has stopped working today:

$ sudo xcodes runtimes install "iOS 14.5" 

Leads to

Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not a valid property list.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data})))

@NachoSoto

If you go into your Xcode > Settings > Platforms and hit the refresh - does it work there?

Seems to be broken for me there too (which is the url Xcodes is using to get the info) - so looks like perhaps an Apple issue?

4ImcEPWRPdr6NlUu92a5tm31

Same issue here, I'm not able to install any OS using Xcode or xcodes. Seems like an Apple issue...

You're right. Looks like the response is just empty:

curl 'https://devimages-cdn.apple.com/downloads/xcode/simulators/index2.dvtdownloadableindex' \
-H 'Host: devimages-cdn.apple.com' \
-H 'If-None-Match: "3fe4f8deaace328312f2cad8b2a9c94c"' \
-H 'Accept: */*' \
-H 'If-Modified-Since: Thu, 25 Jan 2024 18:10:28 GMT' \
-H 'User-Agent: Xcode/22503 CFNetwork/1490.0.4 Darwin/23.2.0' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Connection: keep-alive'
HTTP/1.1 200 OK
x-amz-id-2: Ku2mQimK/rbp7nHSZ3peG2che7wpEJDZILMZceHZYRpn8gepGAoOEd8LmGVCsYj52N29sHBY8u4=
x-amz-request-id: CT0NCY3AF6HZF1XB
Date: Tue, 30 Jan 2024 22:09:37 GMT
Last-Modified: Tue, 30 Jan 2024 04:31:41 GMT
x-amz-server-side-encryption: AES256
x-amz-version-id: cDhwQHOubjWo0RD0wneYxK6zartyiYd9
Accept-Ranges: bytes
Content-Type: text/plain
Server: AmazonS3
Content-Length: 0
Cache-Control: max-age=600, public
Via: http/1.1 ussjc9-edge-lx-002.ts.apple.com (acdn/133.14417), http/1.1 ussjc9-edge-bx-007.ts.apple.com (acdn/224.14428)
X-Cache: hit-fresh, hit-fresh
CDNUUID: feb4cca2-be85-4bf4-95fd-5005d4b7260a-3017373680
Access-Control-Allow-Origin: *
Etag: "d41d8cd98f00b204e9800998ecf8427e"
Age: 422
Connection: keep-alive

I'll keep an eye on it. Hopefully they don't change the url.

@NachoSoto @adamsousa Looks to be back up now.

It's the same issue?
I can get other versions of 16 through this install command, but iOS 15.5 version cannot be installed.

sudo xcodes runtimes install "iOS 15.5"

Found existing Runtime that will be used, at /Users/username/Downloads/com.apple.pkg.iPhoneSimulatorSDK15_5-15.5.1.1653527639.dmg.
Mounting DMG
Error: Failed executing: `/usr/bin/hdiutil attach -nobrowse -plist /Users/username/Downloads/com.apple.pkg.iPhoneSimulatorSDK15_5-15.5.1.1653527639.dmg` (1).
username ~ % /usr/bin/hdiutil attach -nobrowse -plist /Users/username/Downloads/com.apple.pkg.iPhoneSimulatorSDK15_5-15.5.1.1653527639.dmg
hdiutil: attach failed - image not recognized

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK15_5-15.5.1.1653527639.dmg

image

@MattKiazyk
Hi bro, dou you have any idea for above issue?

Yeah 12 through 15 are failing with this:

Downloading Runtime iOS 12.4: 100%
Mounting DMG
Error: Failed executing: `/usr/bin/hdiutil attach -nobrowse -plist /Users/distiller/Downloads/com.apple.pkg.iPhoneSimulatorSDK12_4-12.4.1.1568665771.dmg` (1).

Anything below iOS 16, please use the old way via Xcode to install new simulators/runtimes or try to install manually.

The old way via Xcode

We use this from CI. Are you saying you don't plan to support this moving forward now that Apple seemingly broke it?

@MattKiazyk that's not a viable option, since it's broken in Xcode for these versions as well. We'll just have to wait out this being fixed on Apple's side.

Yeah 12 through 15 are failing with this:

Downloading Runtime iOS 12.4: 100%
Mounting DMG
Error: Failed executing: `/usr/bin/hdiutil attach -nobrowse -plist /Users/distiller/Downloads/com.apple.pkg.iPhoneSimulatorSDK12_4-12.4.1.1568665771.dmg` (1).

Sorry, after looking more, looks like those url's are returning zero bytes still! Who knows if Apple will fix those?

My other comment was around that if you're wanting a specific runtime version, install that xcode version when it was baked in. That wont' work for all, but it might get you by?

Looks to be resolved now

Glad to hear that @daniel-beard! Closing issue!

Looks like iOS 12 and 13 are broken again lol

sudo xcodes runtimes install "iOS 13.7"

Error: typeMismatch(Swift.Int, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "sdkToSeedMappings", intValue: nil), _PlistKey(stringValue: "Index 110", intValue: 110), CodingKeys(stringValue: "seedNumber", intValue: nil)], debugDescription: "Expected to decode Int but found a string/data instead.", underlyingError: nil))
Error: typeMismatch(Swift.Int, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "sdkToSeedMappings", intValue: nil), _PlistKey(stringValue: "Index 110", intValue: 110), CodingKeys(stringValue: "seedNumber", intValue: nil)], debugDescription: "Expected to decode Int but found a string/data instead.", underlyingError: nil))

Exited with code exit status 1

Looks like it's broken for all runtimes because the seedNumber value is sometimes an integer and sometimes a string now.

<dict>
                <key>buildUpdate</key>
                <string>21E5184i</string>
                <key>platform</key>
                <string>com.apple.platform.iphoneos</string>
                <key>seedNumber</key>
                <integer>1</integer>
            </dict>
            <dict>
                <key>buildUpdate</key>
                <string>23E5180g</string>
                <key>platform</key>
                <string>com.apple.platform.macosx</string>
                <key>seedNumber</key>
                <integer>1</integer>
            </dict>
            <dict>
                <key>buildUpdate</key>
                <string>21E5195d</string>
                <key>platform</key>
                <string>com.apple.platform.iphoneos</string>
                <key>seedNumber</key>
                <string>2</string>
            </dict>
            <dict>
                <key>buildUpdate</key>
                <string>21T5196c</string>
                <key>platform</key>
                <string>com.apple.platform.watchos</string>
                <key>seedNumber</key>
                <string>2</string>
            </dict>
            <dict>
                <key>buildUpdate</key>
                <string>21L5206e</string>
                <key>platform</key>
                <string>com.apple.platform.appletvos</string>
                <key>seedNumber</key>
                <string>2</string>
            </dict>
            ```

They've fixed it @NachoSoto! Glad I don't have to make new versions!

Until they break it again in a few days lol