xcodes icon indicating copy to clipboard operation
xcodes copied to clipboard

Intermittent issue with installing versions

Open tsdevshop opened this issue 11 months ago • 2 comments

I'm experiencing something similar to #406 but without a company-managed Apple ID. Importantly, this is only happening intermittently, but it happens enough to be a blocker in many cases.

There are two commands that are failing intermittently:

  1. xcodes update --data-source apple
  2. xcodes install <version>

In both cases, I see the following error in the terminal:

The operation couldn’t be completed. (DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character '<' around line 1, column 1." UserInfo={NSDebugDescription=Unexpected character '<' around line 1, column 1., NSJSONSerializationErrorIndex=0}))))

From the error it seems like the endpoint that is being requested is returning HTML instead of JSON. Is there a way we can debug this by printing out the response from Apple's servers? Failing that, what curl command can I use to make a similar request, to see what Apple is returning?

Just to note that I'm also seeing the same issue in the Xcodes app.

Things I've tried:

  • Using xcodes signout and re-authenticating
  • Changing the password in my Apple account
Screenshots Screenshot 2025-01-10 at 13 51 57 Screenshot 2025-01-10 at 13 52 04

tsdevshop avatar Jan 10 '25 13:01 tsdevshop