Xcode xccov 命令抛出错误“无法在方案操作中加载覆盖率存档”

jsh*_*py8 5 xcode continuous-integration code-coverage xcodebuild ios

多年来我一直在 CI 上使用以下命令来生成代码覆盖率报告:

\n
xcrun xccov view --report --json path/to/App.xcresult > ./test_output/reports/xccov.json\n
Run Code Online (Sandbox Code Playgroud)\n

在最后一天(我不确定发生了什么变化),我开始收到此错误:

\n
2023-11-02 23:24:36.067 xccov[22876:146900] Requested but did not find extension point with identifier Xcode.IDEFoundation.IDEResultKitSerializationConverter\n
Run Code Online (Sandbox Code Playgroud)\n

其次是:

\n
Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load coverage archive in scheme action \'Testing project App with scheme App\' in result bundle" UserInfo={NSLocalizedDescription=Failed to load coverage archive in scheme action \'Testing project Handshake with scheme App\' in result bundle, NSUnderlyingError=0x600001c70870 {Error Domain=NSCocoaErrorDomain Code=260 "The file \xe2\x80\x9cMetadata.plist\xe2\x80\x9d couldn\xe2\x80\x99t be opened because there is no such file." UserInfo={NSFilePath=/tmp/action.xccovarchive/Metadata.plist, NSUnderlyingError=0x600001c707b0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}\n
Run Code Online (Sandbox Code Playgroud)\n

我已经到处寻找解决方案,但似乎无法确定问题是什么。我尝试了此处的解决方案来报告所有目标的覆盖范围,但没有运气。

\n

这种情况在Xcode 14.3Xcode 15中都会发生。我的项目也在使用测试计划。有没有人遇到过这个并知道问题可能是什么?

\n