Comments (13)
Yes! Now it's working like a charm 👍👏
Thanks!
from codacy-coverage-reporter.
@replaysMike sorry for the delay getting back to you. This should not affect the coverage posting. Can you confirm this is just a error message?
from codacy-coverage-reporter.
Due to no answering since some time ago, I'm closing this issue.
from codacy-coverage-reporter.
I'm reopening the issue. Thank you for reporting.
from codacy-coverage-reporter.
@guibranco a possible workaround is to tweak the logging level and disable Jansi
.
E.g. write a file logback.xml
with this content:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>false</withJansi>
<encoder>
<pattern>%date %-16level %-10.-10logger %message %n</pattern>
</encoder>
</appender>
<logger name="application" level="ERROR"/>
<root level="WARN">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
And run the reporter passing the new configuration:
java -jar ./codacy-test-reporter.jar report -Dlogback.configurationFile=logback.xml -l CSharp -t %CODACY_PROJECT_TOKEN% -r "%CD%\Tests\%SOLUTION_NAME%.Tests\coverage.cobertura.xml"
I'm sorry but I don't have access to a windows machine to test, can you check and report the result?
from codacy-coverage-reporter.
@andreaTP I'll try soon, and then I'll let you know if this works!
from codacy-coverage-reporter.
@guibranco my bad for the arguments order, sorry for the trouble!
Does it solves the issue?
from codacy-coverage-reporter.
It worked with 7.6.8
and 7.7.0
7.6.8 log: https://ci.appveyor.com/project/guibranco/viacep/builds/32012715
7.7.0 log: https://ci.appveyor.com/project/guibranco/viacep/builds/32012758
from codacy-coverage-reporter.
Thank you very much for testing it!
Closing the issue as solved 🎉
from codacy-coverage-reporter.
The error keeping throwing in AppVeyor with Windows.
My example is with VS 2019 image.
C# language (.Net Standard for library, .Net Core for tests).
Yes, it is just an error message that can be interpreted by some filters as error in build process.
Currently, for my projects, no problem...
Some example (error starts at line 318):
AppVeyor build history
Here's a snippet:
java -jar ./codacy-test-reporter.jar report -l CSharp -t %CODACY_PROJECT_TOKEN% -r "%CD%\Tests\%SOLUTION_NAME%.Tests\coverage.cobertura.xml"
05:17:29,982 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [jar:file:/C:/projects/viacep/codacy-test-reporter.jar!/logback-test.xml]
05:17:29,998 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@50a638b5 - URL [jar:file:/C:/projects/viacep/codacy-test-reporter.jar!/logback-test.xml] is not of type file
05:17:30,159 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
05:17:30,159 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
05:17:30,159 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
05:17:30,188 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
05:17:30,285 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI WindowsAnsiOutputStream for the console.
05:17:30,285 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create WindowsAnsiOutputStream. Falling back on the default stream. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:40)
at at ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:88)
at at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:79)
at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at at org.log4s.package$.getLogger(package.scala:8)
at at com.codacy.helpers.LoggerHelper$.getLogger(LoggerHelper.scala:18)
at at com.codacy.helpers.LoggerHelper$.logger(LoggerHelper.scala:11)
at at com.codacy.rules.ConfigurationRules.<init>(ConfigurationRules.scala:16)
at at com.codacy.di.Components.configRules$lzycompute(Components.scala:14)
at at com.codacy.di.Components.configRules(Components.scala:14)
at at com.codacy.di.Components.validatedConfig$lzycompute(Components.scala:12)
at at com.codacy.di.Components.validatedConfig(Components.scala:12)
at at com.codacy.CodacyCoverageReporter$.run(CodacyCoverageReporter.scala:13)
at at com.codacy.configuration.parser.ConfigurationParsingApp.run(ConfigurationParser.scala:13)
at at com.codacy.configuration.parser.ConfigurationParsingApp.run(ConfigurationParser.scala:11)
at at caseapp.CommandAppWithPreCommand$$anonfun$main$1.apply(CommandAppWithPreCommand.scala:97)
at at caseapp.CommandAppWithPreCommand$$anonfun$main$1.apply(CommandAppWithPreCommand.scala:82)
at at scala.Option.foreach(Option.scala:257)
at at caseapp.CommandAppWithPreCommand.main(CommandAppWithPreCommand.scala:82)
at at com.codacy.CodacyCoverageReporter.main(CodacyCoverageReporter.scala)
Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream
at at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56)
at ... 37 common frames omitted
05:17:30,285 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
05:17:30,285 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
05:17:30,285 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
05:17:30,285 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@50b472aa - Registering current configuration as safe fallback point
03/28 05:17:30 INFO c.c.rules.ConfigurationRules:101 - Using API base URL: https://api.codacy.com
03/28 05:17:30 INFO com.codacy.rules.ReportRules:126 - Commit UUID not provided, using latest commit of current directory:
4d9b439fec67f8da53362740009cba4c9084563e Guilherme Branco Stracini <[email protected]> Sat Mar 28 05:15:43 UTC 2020
03/28 05:17:30 INFO com.codacy.rules.ReportRules:48 - Parsing coverage data from: C:\projects\viacep\Tests\ViaCEP.Tests\coverage.cobertura.xml ...
03/28 05:17:31 INFO com.codacy.rules.ReportRules:81 - Generated report: C:\projects\viacep\Tests\ViaCEP.Tests\codacy-coverage.json (0.32 kB)
03/28 05:17:31 INFO com.codacy.rules.ReportRules:82 - Uploading coverage data...
03/28 05:17:33 INFO c.c.CodacyCoverageReporter$:31 - Coverage data uploaded. Coverage received successfully.
from codacy-coverage-reporter.
@andreaTP I put the file in a "Build" directory in the repository and I'm passing it as a reference in the build, it's generating an error and breaking the build process...
Unrecognized argument: -Dlogback.configurationFile=C:\projects\test-coverage-error\Build\logback.xml
This is how my build section is in the appveyor.yml:
build_script:
- dotnet build %SOLUTION_NAME%.sln
- dotnet test .\Tests\%SOLUTION_NAME%.Tests\%SOLUTION_NAME%.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat="opencover"
- codecov -f %CD%\Tests\%SOLUTION_NAME%.Tests\coverage.opencover.xml
- dotnet test .\Tests\%SOLUTION_NAME%.Tests\%SOLUTION_NAME%.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura"
- java -jar ./codacy-test-reporter.jar report -Dlogback.configurationFile="%CD%\Build\logback.xml" -l CSharp -t %CODACY_PROJECT_TOKEN% -r "%CD%\Tests\%SOLUTION_NAME%.Tests\coverage.cobertura.xml"
from codacy-coverage-reporter.
It works if I switch the arguments order, passing the -D... right after the -jar option
Example:
build_script:
- dotnet build %SOLUTION_NAME%.sln
- dotnet test .\Tests\%SOLUTION_NAME%.Tests\%SOLUTION_NAME%.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat="opencover"
- codecov -f %CD%\Tests\%SOLUTION_NAME%.Tests\coverage.opencover.xml
- dotnet test .\Tests\%SOLUTION_NAME%.Tests\%SOLUTION_NAME%.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura"
- java -jar -Dlogback.configurationFile="%CD%\Build\logback.xml" ./codacy-test-reporter.jar report -l CSharp -t %CODACY_PROJECT_TOKEN% -r "%CD%\Tests\%SOLUTION_NAME%.Tests\coverage.cobertura.xml"
from codacy-coverage-reporter.
Hi @guibranco,
The problem should be fixed now that we disabled Jansi on our default configuration.
Could you try the latest version (it was fixed in 7.6.8
) without the -Dlogback.configurationFile="%CD%\Build\logback.xml"
part?
Thank you!
from codacy-coverage-reporter.
Related Issues (20)
- [CY-5947] Multiple vulnerabilities found in published Docker image HOT 3
- [CY-5948] Add a Security Policy HOT 2
- [CY-5949] Multiple vulnerabilities found in compiled java jar HOT 2
- [CY-5950] Adopt a software composition analysis solution HOT 3
- [DOCS-381] Add troubleshooting for "Failed to upload coverage report ... connect timed out" HOT 9
- [DOCS-382] Clarify required account API token permissions for uploading coverage HOT 1
- [DOCS-389] Update Gradle task examples for uploading coverage to Codacy HOT 1
- [CY-6234] Wrong checksum for codacy-coverage-reporter-linux 13.9.14 in GithubAction HOT 5
- [CY-6444] 13:10:10 breaks on Heroku CI HOT 4
- [CY-6692] Feature Request: Support `--codacy-reporter-version` argument HOT 2
- [TS-193] Feature request: Glob pattern for reports HOT 1
- [TS-231] Can't guess the report language HOT 4
- [TS-264] Glob report only uploads first file HOT 2
- [TS-511] 13.13.3 is broken HOT 7
- [TS-548] Support running `get.sh` script on ARM machines HOT 1
- [TS-549] Exception in thread "main" java.lang.NumberFormatException: For input string: "18446744073709551615" HOT 8
- [TS-675] Failed to upload coverage report when using version 13.13.14 HOT 2
- Coverage upload is always skipped when enabling `skip` in CircleCI Orb TCE-805 HOT 2
- [TCE-818] Calling coverage-reporter with final flag HOT 2
- Will the coverage upload be skipped only if `--skip` or `-s` is passed in? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codacy-coverage-reporter.