Closed cah-iswaria-sasi closed 4 days ago
Please add the Slather part of your fastlane console output. I know other people have sonarqube working with slather 2.8.0 so we need to figure out what's different/going wrong for you.
@jarrodlombardo-EventBase @ksuther
log is clean, no errors reported.
i can see slather is doing its work but observed sonarqube.xml file is empty with no data and printing 1st 2 lines. shared you the lines in below comment xml version 1.0 \n coverage version 1.0 ?
eg:
o/p in fastlane log
19:56:30: --- Step: slather ---
19:56:30: $ slather coverage --jenkins --sonarqube-xml --build-directory ./Packages/Account/DerivedData --source-directory ./Packages/Account/Sources --output-directory ./sonar-reports/Account --verbose --scheme XXXX --binary-basename Account.o ./XXX.xcodeproj [19:56:31]: ▸ Slathering... [19:56:33]: ▸ Processing coverage file: /Users/iswaria.sasi/Documents/sourcecode/projectXXXX/Packages/Account/DerivedData/Account/Build/ProfileData/7C717D9C-73E8-453A-9028-13E27FCDC35B/Coverage.profdata [19:56:33]: ▸ Against binary files: [19:56:33]: ▸ /Users/iswaria.sasi/Documents/sourcecode/projectXXXX/Packages/Account/DerivedData/Account/Build/Products/Debug-iphonesimulator/Account.o [19:56:33]: ▸ Slathered
We dont use any .slather.yml instead passing the commands directly in fastlane
My xcode version in local is 15.2, BM has 15.0.1 in my local, i m getting .xml report generated properly but
build machine , generating only 2 lines inside report
=> <?xml version="1.0"?>
=>
i now have switched the versions 2.8.2, 2.8.1, 2.8.0, 2.75 ..... nothing works to generate the sonarqube-generic-coverage.xml. can you someone tell the root cause why its not generating from slather?
we have a release by next week. if this not solved, we are doomed 😢 . if anything related to coverage_serive: sonarqube_xml have been changed, kindly check and fix it pls.
@ksuther @jarrodlombardo-EventBase
Hello I am getting the same issue. I have tried with updating all the latest the versions of Slather. I have tried installing XCode 15.4 since 15.2 was not available. But still slather is generating report with empty sonarqube_xml data. Kindly look into this on urgent basis?
i Just verified the .xcresult file generated after test and i can able to see the coverage % in it.
not sure why slather is generating empty sonarqube-generic-coverage.xml file (46 bytes)
can we have any update here
This issue is resolved, i upgraded the MacOS from sonoma 14.1.1 to 14.5 and downgraded some versions to fix the issue.. slather started generating coverage xml files for sonarqube-generic-coverage.xml format. Hope this information helps for anyone who is going through this issue.
issue : slather 2.8.0 fastlane 2.221.1 downgraded to 2.217.0 ruby 3.3.3 rubygems 3.5.13 bundler 2.5.13 downgraded to 2.4.6 (locked) xcode version 15.0.1 macos - sonoma 14.5
closing this issue @ksuther @jarrodlombardo-EventBase
I'm glad this resolved, but what changed with your upgrade? My guess is your DerivedData folder moved or something else controlled by MacOS or XCode changed, but do you have any idea what it was?
@jarrodlombardo-EventBase i am actually not sure what was the exact issue. i switched back to the old versions when it was working fine with latest macos 14.5. it worked.. but issue still persists with newer versions... somewhere ther is discrepency.
in my Local, which had newer versions for everything is working perfectly fine... but same thing on Old version Macos/Ruby/bundler it wasnt working. please try to fix the discrepency in old and same versions.. we shall need to update newer versions anytime soon.
That's just it though; the issue is something in your system (OS, Env, something), not Slather. Without knowing what is going wrong with the system, we can't modify Slather to try to work around whatever is changing in your system.
This is what i am getting for sonarqube_xml format:
sonarqube-generic-coverage.xml: report is empty. i have verified .profdata nd binary files are generating properly under each packages. earlier was using 2.7.5 slather, was working fine.. suddenly it stopped working.
means, .xml file is empty . i am using slather 2.8.0 fastlane 2.221.1 ruby 3.3.3 bundler 2.5.13 xcode version 15.0.1 macos - sonoma 14.5
sometimes its working fine in my local, can see .xml fine.. i have upgraded versions on Build Machine (Mac) same to my local , but in BM its not working as expected. .xml file is empty
sonarqube_xml, its failing to generate .xml file for coverage