Xcode cloud builds are are failing

Xcode cloud builds were failing with the following error. It wasn't the problem before yesterday morning 26.Apr.2023 before 1:00 PM.

Please let me know what the issue is or if there is anything I can do to solve this.

Additional information:

The app is a react-native app.

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 fatal: expected flush after ref listing info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. [in /Volumes/workspace/repository/ios] [!] Invalid Podfile file: cannot load such file -- /Volumes/workspace/repository/node_modules/react-native/scripts/react_native_pods.

from /Volumes/workspace/repository/ios/Podfile:1

-------------------------------------------

require_relative '../node_modules/react-native/scripts/react_native_pods'

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

-------------------------------------------

Error Command exited with non-zero exit-code: 1

Post not yet marked as solved Up vote post of csaicharan Down vote post of csaicharan
2.3k views

Replies

I'm having this issue also in my "Run ci_post_clone.sh script" step. I've beenseeing it since last friday (May 5th 2023). Here is th log. It happens during downloading packages, but every time it's with a different package.

[!] Error installing GoogleUtilities
[!] /usr/bin/git clone https://github.com/google/GoogleUtilities.git /Volumes/workspace/tmp/d20230508-7885-fjz83v --template= --single-branch --depth 1 --branch CocoaPods-7.11.0
Cloning into '/Volumes/workspace/tmp/d20230508-7885-fjz83v'...
error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
fatal: expected flush after ref listing

It seems like there might not be enough memory on the machine for downloading the library?

If anyone on apple's side is looking into this, my log summary is here

I also started having the same issue this evening, the error persists even after multiple retries.

[!] Error installing FirebaseCoreDiagnostics
[!] /usr/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /Volumes/workspace/tmp/d20230513-11348-iqm6nt --template= --single-branch --depth 1 --branch CocoaPods-9.2.0
Cloning into '/Volumes/workspace/tmp/d20230513-11348-iqm6nt'...
error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
fatal: expected flush after ref listing
Error
Command exited with non-zero exit-code: 1

I also suspect it's a memory problem.

We are experiencing the same flakiness, every ±10th build fails, not always the same lib but always 502 curl 22 from github repos

I'm also experiencing this, would love if the apple dev's could provide some kind of solution as we're wasting cloud build hours

I've also been seeing this for the last month and a half since we started using Xcode Cloud. I really want to use Xcode Cloud but we have lots of failed builds, probably one in 5-10, which is way to frequent. Seems like maybe Github is rate limiting the Xcode Cloud servers or something. What makes you think it would be a memory issue?

Same:

[!] Error installing PromisesObjC

[!] /usr/bin/git clone https://github.com/google/promises.git /Volumes/workspace/tmp/d20231016-10650-c4fygs --template= --single-branch --depth 1 --branch 2.3.1

Seeing this happening a lot today, on more than 50% of xcode cloud builds. example:

 Could not resolve package dependencies:
  Couldn’t update repository submodules:
    Submodule 'external/catch' (https://github.com/catchorg/Catch2.git) registered for path 'external/catch'
    Submodule 'src/external/sha-1' (https://github.com/clibs/sha1.git) registered for path 'src/external/sha-1'
    Submodule 'src/external/sha-2' (https://github.com/kalven/sha-2.git) registered for path 'src/external/sha-2'
    Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/external/catch'...
    error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
    fatal: expected 'packfile'
    fatal: clone of 'https://github.com/catchorg/Catch2.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/external/catch' failed
    Failed to clone 'external/catch'. Retry scheduled
    Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1'...
    error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
    fatal: expected 'packfile'
    fatal: clone of 'https://github.com/clibs/sha1.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1' failed
    Failed to clone 'src/external/sha-1'. Retry scheduled
    Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-2'...
    fatal: unable to access 'http://github.com/kalven/sha-2.git/': The requested URL returned error: 502
    fatal: clone of 'https://github.com/kalven/sha-2.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-2' failed
    Failed to clone 'src/external/sha-2'. Retry scheduled
    Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/external/catch'...
    Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1'...
    fatal: unable to access 'http://github.com/clibs/sha1.git/': The requested URL returned error: 502
    fatal: clone of 'https://github.com/clibs/sha1.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1' failed
    Failed to clone 'src/external/sha-1' a second time, aborting
  Couldn’t update repository submodules: