/dev/trouble
Eric Roller's Development Blog

Xcode Upload: Copy Failed

- Posted in Xcode by

Trying to upload an app binary from within Xcode (26.0.1) to Apple's AppStoreConnect, be it either for validation or for distribution, currently fails for me with this error:

Xcode error message: copy failed

This doesn't give a lot of clues, but you can press on "Show Logs" and dig deeper.

In my case, the IDEDistributionPipeline.log file contained these (edited) lines near the bottom:

2025-10-18 13:28:19 +0000  Skipping stripping extended attributes because the codesign step will strip them.
[...]
2025-10-18 13:28:23 +0000  Processing step: IDEDistributionCreateIPAStep
2025-10-18 13:28:23 +0000  Running /usr/bin/rsync '-8aPhhE' [...edited...]
2025-10-18 13:28:23 +0000  rsync: on remote machine: --extended-attributes: unknown option
2025-10-18 13:28:23 +0000  rsync error: syntax or usage error (code 1) at main.c(1455) [server=3.0.9]
2025-10-18 13:28:23 +0000  rsync(34442): error: unexpected end of file
2025-10-18 13:28:23 +0000  /usr/bin/rsync exited with 1
2025-10-18 13:28:23 +0000  Step "<IDEDistributionCreateIPAStep: 0x85f38f2a0>" failed with error "Error Domain=IDEFoundationErrorDomain Code=1 "Copy failed" UserInfo={NSLocalizedDescription=Copy failed}"

So, apparently, the current version of rsync on Apple's server is not a version that supports "extended attributes". Or maybe codesign did not strip the extended attributes as it was told.

Neither is something that I can do much about. Waiting for a fix...

Update 2025-10-19

Apple’s Developer Support for “Binary Delivery and Processing” only offers administrative support and suggests using the forums instead…

Which rsync?

This stackoverflow thread suggests that it might be a wrong local version of rsync, and yes, I have a /usr/local/bin/rsync version that I use for backup scripts; the original /usr/bin/rsync is unchanged:

# rsync --version
rsync  version 3.0.9  protocol version 30
[...]
# /usr/bin/rsync --version
openrsync: protocol version 29
rsync version 2.6.9 compatible

It turns out, if I launch Xcode from the Finder, it works!

But if I launch Xcode via my xcode command-line alias, it inherits my local $PATH settings and uses my custom version of rsync. As a fix, I have updated my alias to cut out all /usr/local paths before opening Xcode:

alias xcode="ls | grep xcodeproj | \
    env PATH=$(echo $PATH|sed 's//usr/local/[^:]*://g') \
    xargs open -a /Applications/Xcode.app"