Xcode Cloud builds failing with random 502 errors when resolving packages

During SPM Package resolution we are seeing lots of 502 errors in the logs when Xcode Cloud tries to talk to github. Anyone else seeing this? Not sure how to get this issue resolved but it is impacted all of our builds.

Example of the error we're seeing. We see these for lots of different packages and even our own source (though in that case it looks like Xcode Cloud tried again and succeeded the second time).

xcodebuild: error: Could not resolve package dependencies:   Failed to clone repository https://github.com/zendesk/sdk_zendesk_ios:     Cloning into bare repository '/Volumes/workspace/DerivedData/SourcePackages/repositories/sdk_zendesk_ios-1d7ac730'...     error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502     fatal: expected flush after ref listing   Failed to clone repository https://github.com/apple/swift-async-algorithms:     Cloning into bare repository '/Volumes/workspace/DerivedData/SourcePackages/repositories/swift-async-algorithms-c3a8d752'...     fatal: unable to access 'http://github.com/apple/swift-async-algorithms/': The requested URL returned error: 502 

Replies

We had the same issue, but it seems to have been resolved now.

Not sure if this was fixed by something external, but in case it helps anyone, it started working for me after going Xcode -> Settings -> Accounts -> Source Control Accounts -> GitHub and switching "Clone Using:" to SSH and uploading an SSH key

  • UPDATE: This was not relevant to the issue we were facing with Xcode Cloud.

Add a Comment

I'm still seeing this issue. I'm already using an SSH key for GitHub auth so I don't think that was it. Looks like if I just wait, Apple might resolve it though.

Update: It's working now

  • Right. It stopped working shortly after I posted that. Something’s definitely up on the Xcode cloud side. Builds succeeded and then failed with no additional code or configuration changes

Add a Comment

Still broken for me on multiple accounts

Looks like things are working again for us.

Build kind of worked once, then failed when I tried 5 min later

But here is all ponies and rainbows https://developer.apple.com/system-status/

Still doesn't work for me. Also worked once and then just stopped working again

still the same for multiple accounts

  • upd: it's alive for me

Add a Comment

Getting repeated failures on Xcode Cloud. Packages are resolved successfully locally so It only seems to be affecting Xcode Cloud. Extract from log:


skipping cache due to an error: Failed to clone repository https://github.com/google/GoogleUtilities.git:

Cloning into bare repository '/Users/local/Library/Caches/org.swift.swiftpm/repositories/GoogleUtilities-5d0bbdf0'...

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502

fatal: expected flush after ref listing

Note that the 502 error seems to be occurring on various repositories, not just the one in the log extract

Yeah we're getting the same errors. Also stuff like this:

Same here ...

same here

Same

This is happening to our asdf packages fetched and installed by mise. It has been working flawlessly until today. Now, every other build on Xcode Cloud fails with either this or another asdf dependency.

cloning https://github.com/MontakOleg/asdf-mockolo
error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
fatal: expected 'packfile'
mise command ["git", "clone", "-q", "--depth", "1", "https://github.com/MontakOleg/asdf-mockolo", "/Users/local/.local/share/mise/plugins/mockolo"] exited with code 128

This is really hurting our workflow. Is anyone from Apple able to comment on a solution in progress or a workaround please?

Same