Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update xccov-to-sonarqube-generic.sh for xcode 11 #64

Merged

Conversation

emanuelschmoczer
Copy link
Contributor

@emanuelschmoczer emanuelschmoczer commented Sep 12, 2019

This PR would make xccov-to-sonarqube-generic.sh work with Xcode 11 (see #63) while not changing anything for previous versions.

@carlos21
Copy link

@emanuelschmoczer I'm getting this error using your fix:
"Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load result bundle" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7fcf4ae240a0 {Error Domain=IDEFoundation.ResultBundleError Code=0 "This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API."}}"

I'm using Xcode 11

any ideas? thanks in advance!

@grolz
Copy link

grolz commented Oct 2, 2019

@emanuelschmoczer I'm getting this error using your fix:
"Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load result bundle" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7fcf4ae240a0 {Error Domain=IDEFoundation.ResultBundleError Code=0 "This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API."}}"

I'm using Xcode 11

any ideas? thanks in advance!

We had the same issue and the reason for that error was: We called the script for testing purpose with Qutoes around the 1st Parameters i.e.:
xcov-to-sonarqube-generic.sh "param1" > sonarqube-generic-coverage.xml should be
xcov-to-sonarqube-generic.sh param1 > sonarqube-generic-coverage.xml
Hope it helps.

@vilchik-elena vilchik-elena removed their request for review October 9, 2019 09:00
@alban-auzeill alban-auzeill merged commit 81dc6ca into SonarSource:master Oct 15, 2019
xcrun xccov view --file-list "$xccovarchive_file" | while read -r file_name; do
convert_file "$xccovarchive_file" "$file_name"
local xccov_options=""
if [[ $xccovarchive_file == *".xcresult"* ]]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asterisk at the end of the pattern makes this test false positive for Xcode 10 as both
Build/Logs/Test/*.xcresult/*_Test/*.xccovarchive/ and
Build/Logs/Test/*.xcresult/ file paths contain .xcresult.
Proper test would be [[ $xccovarchive_file == *".xcresult/" ]]

@HrishiPolAleph
Copy link

Hi All,

I’m also getting same issue which you were getting Amit.

SGMUOB4KNG8WN:ios nxgdev09$ sh xccov-to-sonarqube-generic.sh “/DerivedData/Logs/Test/*.xcresult” > sonarqube.generic-coverage.xml

Error: Error Domain=XCCovErrorDomain Code=0 “Failed to load result bundle” UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7fdf41600e20 {Error Domain=IDEFoundation.ResultBundleError Code=0 “This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API.”}}

Could someone help us to identify the root cause in xcode11.3.

@BenteleFlorian
Copy link

Hi all,

unfortunately still experiencing the same issue using Xcode 11.4 and CocoaPods 1.9.1, both without and with quotes around the path to the test results.

Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load result bundle" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7ff3ce60b940 {Error Domain=IDEFoundation.ResultBundleError Code=0 "This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API."}}

@monolithic-adam
Copy link

I just got this error trying it out today with Xcode 11.5...
Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load result bundle" UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7fce00c355e0 {Error Domain=IDEFoundation.ResultBundleError Code=0 "This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API."}}

@JULIANCHO923
Copy link

JULIANCHO923 commented Aug 10, 2023

Hello using Xcode 14.2.0 is working fine, but I updated to Xcode 14.3.1 and I got the same issue on my pay package project:

Any idea how to verify my current installation or solve the issue?
Thanks in advance

xcrun xccov view --archive build/Logs/Test/xc.xcresult/ 2023-08-10 04:16:37.507 xccov[87054:7839316] Requested but did not find extension point with identifier Xcode.IDEFoundation.IDEResultKitSerializationConverter Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load coverage archive in scheme action 'Testing workspace pay with scheme Pay-Package' in result bundle" UserInfo={NSLocalizedDescription=Failed to load coverage archive in scheme action 'Testing workspace pay with scheme Pay-Package' in result bundle, NSUnderlyingError=0x600003b44660 {Error Domain=NSCocoaErrorDomain Code=260 "The file “Metadata.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/tmp/action.xccovarchive/Metadata.plist, NSUnderlyingError=0x600003b44540 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}

@joe-tingsanchali-sonarsource
Copy link
Contributor

joe-tingsanchali-sonarsource commented Aug 20, 2023

@JULIANCHO923 Please see #164, which may be related.

Also, check #146 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants