I found this post while searching for an error encountered while running UI tests on an automated build machine. We were able to fix the issue by prepending arch -arm64 to the xcodebuild command, which tells xcodebuild to run using the apple silicon architecture rather than x86 under rosetta. E.g. arch -arm64 xcodebuild test