Giter Site home page Giter Site logo

Comments (14)

ferrerod avatar ferrerod commented on July 27, 2024 5

removing the xcov code coverage output before the next run allows it to succeed consistently

from danger-xcov.

timfuqua avatar timfuqua commented on July 27, 2024 1

I'm actually not using Danger, just vanilla xcov (1.7.5). I just found this thread through googling the exact string "Error occured while exporting xccovreport from xcresult", and there were only like 2 hits.

I can't provide a solid example project, since I'm encountering this with one of my employer's projects, but I doubt it would be hard to reproduce. Here's my directory structure:

.
β”œβ”€β”€ [typical fastlane files]
β”œβ”€β”€ README.md
β”œβ”€β”€ report.xml
└── test_output
    β”œβ”€β”€ code-coverage
    β”‚Β Β  β”œβ”€β”€ index.html
    β”‚Β Β  β”œβ”€β”€ resources
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ application.css
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ application.js
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ bootstrap.min.css
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ bootstrap.min.js
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ file_cpp.png
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ file_objc.png
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ file_swift.png
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ jquery.min.js
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ main.css
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ main.js
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ opensans.css
    β”‚Β Β  β”‚Β Β  └── xcov_logo.png
    β”‚Β Β  β”œβ”€β”€ xccovarchive-0.xccovarchive
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Coverage
    β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Index
    β”‚Β Β  β”‚Β Β  └── Metadata.plist
    β”‚Β Β  └── xccovreport-0.xccovreport
    β”œβ”€β”€ report.html
    └── report.junit

All I'm doing to get around this is running a rm -rf ../fastlane/test_output/code-coverage before the next call to xcov.

Maybe the -0 on the .xccovarchive and .xccovreport is messing things up?

from danger-xcov.

GG-beyond avatar GG-beyond commented on July 27, 2024 1

removing the xcov code coverage output before the next run allows it to succeed consistently

Correct, I would like to solve this bug@joshdholtz

from danger-xcov.

kumareshsaran avatar kumareshsaran commented on July 27, 2024 1

The below issue happened to me also

Error occured while exporting xccovreport from xcresult '/Users/wooyoung.chung/Development/xxx/build/Logs/Test/Test-Transient Testing-2020.05.29_11-13-05--0700.xcresult'
Make sure you have both Xcode 11 selected and pointing to the correct xcresult file

This issue happened because the root project folder contains old test report file.
delete the old report file before the unit test stage.

rm -rf ./fastlane/<<output_folder>>

unit_test:
  allow_failure: true
  stage: unit_test
  script:
   - rm -rf fastlane/xcov_report
   - bundle exec fastlane tests
  tags:

from danger-xcov.

intoxicated avatar intoxicated commented on July 27, 2024

weird thing is sometime it works and sometimes it doesn't

from danger-xcov.

intoxicated avatar intoxicated commented on July 27, 2024

it seems like if output path exists, it fails

from danger-xcov.

timfuqua avatar timfuqua commented on July 27, 2024

it seems like if output path exists, it fails

I'm experiencing this behavior as well. I can get around this in my CI, but I feel like this is a bug.

from danger-xcov.

joshdholtz avatar joshdholtz commented on July 27, 2024

πŸ‘‹ Hello! Would either of you be able to provide any more detail on this?

To be honest... I don’t use xcov in personal projects so also not with danger but I’m happy to look into! Would be good to have any info that you may have that would help πŸ€·β€β™‚οΈ

from danger-xcov.

joshdholtz avatar joshdholtz commented on July 27, 2024

I really appreciate the info! I’ll try and find some time in my queue for this 😊

from danger-xcov.

pradyhk avatar pradyhk commented on July 27, 2024

worked for me when i used project parameter instead of workspace..

from danger-xcov.

clivejefferies avatar clivejefferies commented on July 27, 2024

I have a weird experience with this. It was working with removing the file, like advised. Then I had problems and updated Ruby and Fastlane. I can see it getting removed and then added back after scan, but I still get the error.

from danger-xcov.

stherold avatar stherold commented on July 27, 2024

I started to get the error too today :-/

from danger-xcov.

ivanglushko avatar ivanglushko commented on July 27, 2024

This fails when the output folder exists the workaround is to delete a folder each time you run the command:

lane :coverage do
	top_dir = `git rev-parse --show-toplevel`.strip
	output_dir = "#{top_dir}/fastlane/output/coverage"
	# workaround if the output folder exists xcov fails
	if Dir.exist?(output_dir)
		FileUtils.remove_dir(output_dir)
	end
	xcov(
	  workspace: "Example/Example.xcworkspace",
	  scheme: "Example",
	  output_directory: output_dir,
	  markdown_report: true
	)
end

from danger-xcov.

Blackjacx avatar Blackjacx commented on July 27, 2024

In our case it was due to the usage of an outdated dependency. After the dependency has been released using the newest Xcode version, the issue has been gone πŸ‘

from danger-xcov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.