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

[TS-392] Failed to parse output: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN #115

Closed
ben-manes opened this issue May 23, 2023 · 4 comments

Comments

@ben-manes
Copy link

ben-manes commented May 23, 2023

I observe that the analysis fails. It isn't clear if this is a configuration mistake, in which case the error could be more helpful.

Status: Downloaded newer image for codacy/codacy-analysis-cli:7.6.4
05/22 19:04:04 ERROR CodacyPlugins:11 - Failed to parse output: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN
 at [Source: (String)"No specified files"; line: 1, column: 3] - No specified files 
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN
 at [Source: (String)"No specified files"; line: 1, column: 3]
	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:703)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2853)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2831)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._matchToken(ReaderBasedJsonParser.java:2612)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1876)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:757)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4141)
	at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3971)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2[276](https://github.com/ben-manes/caffeine/actions/runs/5049430617/jobs/9058875700#step:5:288))

- classesDirectories: /src
  sourceDirectories: /src

	at com.codacy.tools.spotbugs.SpotBugs$.apply(SpotBugs.scala:70)
	at com.codacy.tools.scala.seed.DockerEngine.executeTool(DockerEngine.scala:53)
	at com.codacy.tools.scala.seed.DockerEngine.$anonfun$main$2(DockerEngine.scala:35)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
	at com.codacy.tools.scala.seed.DockerEngine.$anonfun$main$1(DockerEngine.scala:27)
	at scala.util.Success.flatMap(Try.scala:251)
	at com.codacy.tools.scala.seed.DockerEngine.main(DockerEngine.scala:26)
	at com.codacy.tools.spotbugs.Engine.main(Engine.scala)
           
	at com.codacy.plugins.runners.BinaryDockerRunner.$anonfun$run$4(BinaryDockerRunner.scala:84)
	at scala.util.Success.flatMap(Try.scala:251)
	at com.codacy.plugins.runners.BinaryDockerRunner.run(BinaryDockerRunner.scala:69)
	at com.codacy.plugins.results.traits.ToolRunner.$anonfun$apply$2(ToolRunner.scala:77)
	at com.codacy.plugins.results.traits.CodacyDocker$.$anonfun$usingDockerConfig$2(CodacyDocker.scala:45)
	at com.codacy.plugins.utils.FileHelper$.$anonfun$usingNewFile$2(FileHelper.scala:51)
	at scala.util.Try$.apply(Try.scala:213)
	at com.codacy.plugins.utils.FileHelper$.usingNewFile(FileHelper.scala:45)
	at com.codacy.plugins.results.traits.CodacyDocker$.usingConfigPath(CodacyDocker.scala:57)
	at com.codacy.plugins.results.traits.CodacyDocker$.$anonfun$usingDockerConfig$1(CodacyDocker.scala:39)
	at scala.Option.map(Option.scala:230)
	at com.codacy.plugins.results.traits.CodacyDocker$.usingDockerConfig(CodacyDocker.scala:38)
	at com.codacy.plugins.results.traits.ToolRunner.$anonfun$apply$1(ToolRunner.scala:76)
	at scala.util.Try$.apply(Try.scala:213)
	at com.codacy.plugins.results.traits.ToolRunner.apply(ToolRunner.scala:61)
	at com.codacy.plugins.results.traits.ToolRunner.run(ToolRunner.scala:49)
	at com.codacy.analysis.core.tools.Tool.run(Tool.scala:91)
	at com.codacy.analysis.core.analysis.CodacyPluginsAnalyser.analyse(CodacyPluginsAnalyser.scala:25)
	at com.codacy.analysis.cli.analysis.AnalyseExecutor.$anonfun$issues$1(AnalyseExecutor.scala:150)
	at scala.util.Success.flatMap(Try.scala:251)
	at com.codacy.analysis.cli.analysis.AnalyseExecutor.issues(AnalyseExecutor.scala:142)
	at com.codacy.analysis.cli.analysis.AnalyseExecutor.$anonfun$run$5(AnalyseExecutor.scala:66)
	at scala.collection.parallel.AugmentedIterableIterator.map2combiner(RemainsIterator.scala:116)
	at scala.collection.parallel.AugmentedIterableIterator.map2combiner$(RemainsIterator.scala:113)
	at scala.collection.parallel.immutable.ParHashSet$ParHashSetIterator.map2combiner(ParHashSet.scala:81)
	at scala.collection.parallel.ParIterableLike$Map.leaf(ParIterableLike.scala:1056)
	at scala.collection.parallel.Task.$anonfun$tryLeaf$1(Tasks.scala:53)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at scala.util.control.Breaks$$anon$1.catchBreak(Breaks.scala:67)
	at scala.collection.parallel.Task.tryLeaf(Tasks.scala:56)
	at scala.collection.parallel.Task.tryLeaf$(Tasks.scala:50)
	at scala.collection.parallel.ParIterableLike$Map.tryLeaf(ParIterableLike.scala:1053)
	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.internal(Tasks.scala:170)
	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.internal$(Tasks.scala:157)
	at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.internal(Tasks.scala:[440](https://github.com/ben-manes/caffeine/actions/runs/5049430617/jobs/9058875700#step:5:452))
	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute(Tasks.scala:150)
	at scala.collection.parallel.AdaptiveWorkStealingTasks$WrappedTask.compute$(Tasks.scala:149)
	at scala.collection.parallel.AdaptiveWorkStealingForkJoinTasks$WrappedTask.compute(Tasks.scala:440)
	at java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
@github-actions github-actions bot changed the title Failed to parse output: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN [TS-392] Failed to parse output: Unrecognized token 'No': was expecting 'null', 'true', 'false' or NaN May 23, 2023
@github-actions
Copy link

Internal ticket created : TS-392

@DMarinhoCodacy
Copy link
Contributor

Hello @ben-manes

Thanks for reporting this.

Can you run codacy/codacy-analysis-cli-action@master instead of 5cc54a7? When you run the pipeline, it runs for a old version of cli-action 7.6.3 instead of 7.9.1, which is the latest version.

Kind regards,
David Marinho

@ben-manes
Copy link
Author

I see, thanks. Can you perform regular releases? OSSF Scorecard will report unpinned actions as a supply chain vulnerability, where only hash versions are considered safe due to tag rewriting. It is easy to keep it updated using dependabot, and you can submit security incidents to github if a version is compromised. Otherwise there is a risk of a compromise like Codecov, SolarWinds, Jetbrains, etc. A dynamic version is really not in anyone's best interest.

ben-manes added a commit to ben-manes/caffeine that referenced this issue May 31, 2023
ben-manes added a commit to ben-manes/caffeine that referenced this issue May 31, 2023
@ben-manes
Copy link
Author

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

No branches or pull requests

2 participants