archived-codacy / sbt-codacy-coverage

Sbt plugin for uploading Scala code coverage to Codacy https://www.codacy.com
18 stars 22 forks source link

java.lang.RuntimeException: Failed to upload data. Reason: not found #51

Closed pathikrit closed 6 years ago

pathikrit commented 6 years ago

Scala Version (2.10.x / etc)

Scala 2.11.x/Scala 2.12.x

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

Darwin osxny-105 15.6.0 Darwin Kernel Version 15.6.0: Tue Jan 30 11:45:51 PST 2018; root:xnu-3248.73.8~1/RELEASE_X86_64 x86_64

JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Library Dependencies

addSbtPlugin("com.eed3si9n"              % "sbt-unidoc"              % "0.4.1")
addSbtPlugin("com.github.gseitz"         % "sbt-release"             % "1.0.8")
addSbtPlugin("com.jsuereth"              % "sbt-pgp"                 % "1.1.1")
addSbtPlugin("org.scoverage"             % "sbt-scoverage"           % "1.5.1")
addSbtPlugin("com.timushev.sbt"          % "sbt-updates"             % "0.3.4")
addSbtPlugin("com.typesafe.sbt"          % "sbt-ghpages"             % "0.6.2")
addSbtPlugin("com.updateimpact"          % "updateimpact-sbt-plugin" % "2.1.3")
addSbtPlugin("org.xerial.sbt"            % "sbt-sonatype"            % "2.3")
addSbtPlugin("com.codacy"                % "sbt-codacy-coverage"     % "1.3.12")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat"            % "0.1.3")
addSbtPlugin("com.geirsson"              % "sbt-scalafmt"            % "1.5.1")

Expected Behavior

This should work:

sbt coverage +test coverageReport coverageAggregate codacyCoverage

Actual Behavior

> sbt coverage +test coverageReport coverageAggregate codacyCoverage
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/pbhowmick/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/pbhowmick/Projects/better-files/project
[info] Loading settings from build.sbt,version.sbt ...
[info] Set current project to better-files-root (in build file:/Users/pbhowmick/Projects/better-files/)
[info] Defining ThisBuild / coverageEnabled
[info] The new value will be used by Compile / compile / scalacOptions, akka / Compile / compile / scalacOptions and 3 others.
[info]  Run `last` for details.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pbhowmick/Projects/better-files/)
[info] Setting Scala version to 2.11.12 on 3 projects.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pbhowmick/Projects/better-files/)
[info] Updating ...
[info] Updating core...
[info] downloading https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-plugin_2.11/1.3.1/scalac-scoverage-plugin_2.11-1.3.1.jar ...
[info] downloading https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-runtime_2.11/1.3.1/scalac-scoverage-runtime_2.11-1.3.1.jar ...
[info]  [SUCCESSFUL ] org.scoverage#scalac-scoverage-plugin_2.11;1.3.1!scalac-scoverage-plugin_2.11.jar (113ms)
[info]  [SUCCESSFUL ] org.scoverage#scalac-scoverage-runtime_2.11;1.3.1!scalac-scoverage-runtime_2.11.jar (127ms)
[info] Done updating.
[info] Done updating.
[info] Updating akka...
[info] Done updating.
[info] Compiling 12 Scala sources to /Users/pbhowmick/Projects/better-files/core/target/scala-2.11/classes ...
[info] Non-compiled module 'compiler-bridge_2.11' for Scala 2.11.12. Compiling...
[info] Run completed in 45 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info]   Compilation completed in 8.119s.
[info] [info] Cleaning datadir [/Users/pbhowmick/Projects/better-files/core/target/scala-2.11/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [info] Instrumentation completed [1485 statements]
[info] [info] Wrote instrumentation file [/Users/pbhowmick/Projects/better-files/core/target/scala-2.11/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/pbhowmick/Projects/better-files/core/target/scala-2.11/scoverage-data]
[info] Done compiling.
[info] Compiling 1 Scala source to /Users/pbhowmick/Projects/better-files/akka/target/scala-2.11/classes ...
[info] Compiling 13 Scala sources and 1 Java source to /Users/pbhowmick/Projects/better-files/core/target/scala-2.11/test-classes ...
[info] [info] Cleaning datadir [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.11/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [info] Instrumentation completed [41 statements]
[info] [info] Wrote instrumentation file [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.11/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.11/scoverage-data]
[info] Done compiling.
[info] Done compiling.
better.files.ManagedResourceSpec$$anonfun$18$$anon$3@20a338d2 better.files.ManagedResourceSpec$$anonfun$18$$anon$3@5d0a7faa
[info] FileWatcherSpec:
[info] file watcher
[info] - should watch directories !!! CANCELED !!!
[info]   FileWatcherSpec.this.isCI was false (FileWatcherSpec.scala:11)
[info] Run completed in 1 second, 660 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 1, ignored 0, pending 0
[info] No tests were executed.
[info] ResourceSpec:
[info] Resource
[info] - can look up from the context class loader
[info] - can look up from a specified class loader
[info] - can look up from the call site
[info] - can look up from a statically-known type
[info] - can look up from a java.lang.Class
[info] - can look up a file in another package
[info] - should require a concrete type
[info] ShapelessScannerSpec:
[info] Shapeless Scanner
[info] - should parse HList
[info] Shapeless Scanner
[info] - should parse case class
[info] ManagedResourceSpec:
[info] managed resources
[info] - should map correctly
[info] - should flatMap correctly
[info] - should handle exceptions correctly
[info] - should handle disposal exceptions correctly
[info] - should handle non-local returns correctly
[info] - should handle multiple exceptions correctly
[info] - should give fatal exceptions precedence
[info] - should support for-comprehension
[info] - should handle multiple managed resources
[info] - should handle multiple managed resources in a flatmap
[info] - should handle multiple operations on managed resources
[info] GlobSpec:
[info] glob
[info] - should match plain file (e.g. 'file.ext')
[info] - should match path without glob (e.g. 'sub/dir/file.ext')
[info] - should match file-glob (e.g. '*.ext')
[info] - should match fixed sub dir and file-glob  (e.g. '**/subdir/*.ext')
[info] - should use parent dir for matching (e.g. plain 'subdir/*.ext')
[info] - should match sub-directory glob with plain file (e.g. 'subdir/*/file.ext')
[info] - should match sub-directory glob with file-glob (e.g. 'subdir/*/*.ext')
[info] - should match deep sub-directory glob with plain file (e.g. 'subdir/**/file.ext')
[info] - should match deep sub-directory glob with file-glob (e.g. 'subdir/**/*.ext')
[info] - should match deep file-glob (e.g. 'subdir/**.ext')
[info] - should match everything (e.g. 'subdir/**')
[info] - should work with links (e.g. 'link_to_a/**.txt')
[info] - should not use dir name as wildcard (e.g. dirname is **)
[info] Regex
[info] - should match all txt-files under sub-directory (e.g. '.*/.*\\.txt')
[info] - should match the same if `Regex` is used
[info] - should use parent dir for matching (e.g. plain 'subdir/*.ext' instead of '**/subdir/*.ext)
[info] - should not use dir name as wildcard (e.g. dirname is .*)
[info] FileMonitorSpec:
[info] file watcher
[info] - should watch single files !!! CANCELED !!!
[info]   FileMonitorSpec.this.isCI was false (FileMonitorSpec.scala:9)
[info] - should watch directories to configurable depth !!! IGNORED !!!
[info] ScannerSpec:
[info] splitter
[info] - should split
[info] scanner
[info] - should parse files
[info] - should parse longs/booleans
[info] - should parse custom parsers
[info] - should parse empty tokens
[info] EncodingBenchmark:
[info] - encoding
[info]   + Charset=UTF-8, write=1665 ms 
[info]   + Charset=UTF-8, read=3 ms 
[info]   + ------------- 
[info]   + Charset=UTF-8, write=761 ms 
[info]   + Charset=UTF-8, read=0 ms 
[info] FileSpec:
[info] files
[info] - can be instantiated
[info] - can be instantiated with anchor
[info] - can be instantiated with non-existing abs anchor
[info] - can be instantiated with non-existing relative anchor
[info] - should do basic I/O
[info] - should handle BOM
[info] - should hide/unhide
[info] - should support parent/child
[info] - should support siblings
[info] - should support sorting
[info] - must have .size
[info] - should support equality
[info] - should create if not exist directory structures
[info] - should treat symlinks transparently in convenience methods
[info] - should support chown/chgrp
[info] - should detect file locks
[info] - should support ln/cp/mv
[info] - should support creating hard links with ln
[info] - should support custom charset
[info] - should support hashing algos
[info] - should compute correct checksum for non-zero length string
[info] - should copy
[info] - should move
[info] - should delete
[info] - should touch
[info] - should md5
[info] - should support file in/out
[info] - should zip/unzip directories
[info] - should zip/unzip single files
[info] - should ungzip
[info] - should gzip
[info] - should read bytebuffers
[info] - should convert readers to inputstreams and writers to outputstreams
[info] - should serialize/deserialize !!! CANCELED !!!
[info]   "2.11.12" did not start with "2.12" (FileSpec.scala:543)
[info] - should serialize/deserialize primitives
[info] - should count number of open file descriptors
[info] ScannerBenchmark:
[info] - scanner
[info]   + Warming up ... 
[info]   + Testing JavaScanner for correctness 
[info]   + Testing StringBuilderScanner for correctness 
[info]   + Testing CharBufferScanner for correctness 
[info]   + Testing StreamingScanner for correctness 
[info]   + Testing IterableScanner for correctness 
[info]   + Testing IteratorScanner for correctness 
[info]   + Testing BetterFilesScanner for correctness 
[info]   + Testing ArrayBufferScanner for correctness 
[info]   + Testing FastJavaIOScanner2 for correctness 
[info]   + Testing FastJavaIOScanner for correctness 
[info]   + Running benchmark ... 
[info]   + JavaScanner              : 2980 ms 
[info]   + StringBuilderScanner     : 23053 ms 
[info]   + CharBufferScanner        : 21631 ms 
[info]   + StreamingScanner         :  260 ms 
[info]   + IterableScanner          :  422 ms 
[info]   + IteratorScanner          :  380 ms 
[info]   + BetterFilesScanner       : 2713 ms 
[info]   + ArrayBufferScanner       :  353 ms 
[info]   + FastJavaIOScanner2       :  325 ms 
[info]   + FastJavaIOScanner        :  240 ms 
[info] Run completed in 54 seconds, 531 milliseconds.
[info] Total number of tests run: 79
[info] Suites: completed 9, aborted 0
[info] Tests: succeeded 79, failed 0, canceled 2, ignored 1, pending 0
[info] All tests passed.
[success] Total time: 85 s, completed May 22, 2018 1:22:33 PM
[info] Setting Scala version to 2.12.6 on 3 projects.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pbhowmick/Projects/better-files/)
[info] Updating ...
[info] Updating core...
[info] downloading https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-runtime_2.12/1.3.1/scalac-scoverage-runtime_2.12-1.3.1.jar ...
[info]  [SUCCESSFUL ] org.scoverage#scalac-scoverage-runtime_2.12;1.3.1!scalac-scoverage-runtime_2.12.jar (45ms)
[info] Done updating.
[info] Done updating.
[info] Updating akka...
[info] Done updating.
[info] Compiling 12 Scala sources to /Users/pbhowmick/Projects/better-files/core/target/scala-2.12/classes ...
[info] Run completed in 48 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info] [info] Cleaning datadir [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [info] Instrumentation completed [1485 statements]
[info] [info] Wrote instrumentation file [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-data]
[info] Done compiling.
[info] Compiling 1 Scala source to /Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/classes ...
[info] Compiling 2 Scala sources to /Users/pbhowmick/Projects/better-files/core/target/scala-2.12/test-classes ...
[info] [info] Cleaning datadir [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-data]
[info] [info] Beginning coverage instrumentation
[info] [info] Instrumentation completed [41 statements]
[info] [info] Wrote instrumentation file [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-data/scoverage.coverage.xml]
[info] [info] Will write measurement data to [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-data]
[info] Done compiling.
[info] Done compiling.
[info] FileMonitorSpec:
[info] file watcher
[info] - should watch single files !!! CANCELED !!!
[info]   FileMonitorSpec.this.isCI was false (FileMonitorSpec.scala:9)
[info] - should watch directories to configurable depth !!! IGNORED !!!
[info] ResourceSpec:
[info] Resource
[info] - can look up from the context class loader
[info] - can look up from a specified class loader
[info] - can look up from the call site
[info] - can look up from a statically-known type
[info] - can look up from a java.lang.Class
[info] - can look up a file in another package
[info] - should require a concrete type
better.files.ManagedResourceSpec$$anon$3@28ded897 better.files.ManagedResourceSpec$$anon$3@6130b621
[info] ManagedResourceSpec:
[info] managed resources
[info] - should map correctly
[info] - should flatMap correctly
[info] - should handle exceptions correctly
[info] - should handle disposal exceptions correctly
[info] - should handle non-local returns correctly
[info] - should handle multiple exceptions correctly
[info] - should give fatal exceptions precedence
[info] - should support for-comprehension
[info] - should handle multiple managed resources
[info] - should handle multiple managed resources in a flatmap
[info] - should handle multiple operations on managed resources
[info] ScannerSpec:
[info] GlobSpec:
[info] glob
[info] - should match plain file (e.g. 'file.ext')
[info] - should match path without glob (e.g. 'sub/dir/file.ext')
[info] - should match file-glob (e.g. '*.ext')
[info] - should match fixed sub dir and file-glob  (e.g. '**/subdir/*.ext')
[info] - should use parent dir for matching (e.g. plain 'subdir/*.ext')
[info] - should match sub-directory glob with plain file (e.g. 'subdir/*/file.ext')
[info] - should match sub-directory glob with file-glob (e.g. 'subdir/*/*.ext')
[info] - should match deep sub-directory glob with plain file (e.g. 'subdir/**/file.ext')
[info] - should match deep sub-directory glob with file-glob (e.g. 'subdir/**/*.ext')
[info] - should match deep file-glob (e.g. 'subdir/**.ext')
[info] - should match everything (e.g. 'subdir/**')
[info] - should work with links (e.g. 'link_to_a/**.txt')
[info] - should not use dir name as wildcard (e.g. dirname is **)
[info] Regex
[info] - should match all txt-files under sub-directory (e.g. '.*/.*\\.txt')
[info] - should match the same if `Regex` is used
[info] - should use parent dir for matching (e.g. plain 'subdir/*.ext' instead of '**/subdir/*.ext)
[info] - should not use dir name as wildcard (e.g. dirname is .*)
[info] splitter
[info] - should split
[info] scanner
[info] - should parse files
[info] - should parse longs/booleans
[info] - should parse custom parsers
[info] - should parse empty tokens
[info] FileWatcherSpec:
[info] file watcher
[info] - should watch directories !!! CANCELED !!!
[info]   FileWatcherSpec.this.isCI was false (FileWatcherSpec.scala:11)
[info] Run completed in 348 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 1, ignored 0, pending 0
[info] No tests were executed.
[info] ShapelessScannerSpec:
[info] Shapeless Scanner
[info] - should parse HList
[info] Shapeless Scanner
[info] - should parse case class
[info] EncodingBenchmark:
[info] - encoding
[info]   + Charset=UTF-8, write=1379 ms 
[info]   + Charset=UTF-8, read=1 ms 
[info]   + ------------- 
[info]   + Charset=UTF-8, write=1159 ms 
[info]   + Charset=UTF-8, read=0 ms 
[info] FileSpec:
[info] files
[info] - can be instantiated
[info] - can be instantiated with anchor
[info] - can be instantiated with non-existing abs anchor
[info] - can be instantiated with non-existing relative anchor
[info] - should do basic I/O
[info] - should handle BOM
[info] - should hide/unhide
[info] - should support parent/child
[info] - should support siblings
[info] - should support sorting
[info] - must have .size
[info] - should support equality
[info] - should create if not exist directory structures
[info] - should treat symlinks transparently in convenience methods
[info] - should support chown/chgrp
[info] - should detect file locks
[info] - should support ln/cp/mv
[info] - should support creating hard links with ln
[info] - should support custom charset
[info] - should support hashing algos
[info] - should compute correct checksum for non-zero length string
[info] - should copy
[info] - should move
[info] - should delete
[info] - should touch
[info] - should md5
[info] - should support file in/out
[info] - should zip/unzip directories
[info] - should zip/unzip single files
[info] - should ungzip
[info] - should gzip
[info] - should read bytebuffers
[info] - should convert readers to inputstreams and writers to outputstreams
[info] - should serialize/deserialize
[info] - should serialize/deserialize primitives
[info] - should count number of open file descriptors
[info] ScannerBenchmark:
[info] - scanner
[info]   + Warming up ... 
[info]   + Testing JavaScanner for correctness 
[info]   + Testing StringBuilderScanner for correctness 
[info]   + Testing CharBufferScanner for correctness 
[info]   + Testing StreamingScanner for correctness 
[info]   + Testing IterableScanner for correctness 
[info]   + Testing IteratorScanner for correctness 
[info]   + Testing BetterFilesScanner for correctness 
[info]   + Testing ArrayBufferScanner for correctness 
[info]   + Testing FastJavaIOScanner2 for correctness 
[info]   + Testing FastJavaIOScanner for correctness 
[info]   + Running benchmark ... 
[info]   + JavaScanner              : 3038 ms 
[info]   + StringBuilderScanner     : 22428 ms 
[info]   + CharBufferScanner        : 22361 ms 
[info]   + StreamingScanner         :  233 ms 
[info]   + IterableScanner          :  373 ms 
[info]   + IteratorScanner          :  349 ms 
[info]   + BetterFilesScanner       : 1965 ms 
[info]   + ArrayBufferScanner       :  254 ms 
[info]   + FastJavaIOScanner2       :  296 ms 
[info]   + FastJavaIOScanner        :  182 ms 
[info] Run completed in 54 seconds, 31 milliseconds.
[info] Total number of tests run: 80
[info] Suites: completed 9, aborted 0
[info] Tests: succeeded 80, failed 0, canceled 1, ignored 1, pending 0
[info] All tests passed.
[success] Total time: 76 s, completed May 22, 2018 1:23:50 PM
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pbhowmick/Projects/better-files/)
[info] Waiting for measurement data to sync...
[info] Waiting for measurement data to sync...
[info] Waiting for measurement data to sync...
[info] Reading scoverage instrumentation [/Users/pbhowmick/Projects/better-files/target/scala-2.12/scoverage-data/scoverage.coverage.xml]
[warn] No coverage data, skipping reports
[info] Reading scoverage instrumentation [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-data/scoverage.coverage.xml]
[info] Reading scoverage instrumentation [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-data/scoverage.coverage.xml]
[info] Reading scoverage measurements...
[info] Generating scoverage reports...
[info] Written Cobertura report [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/coverage-report/cobertura.xml]
[info] Written XML coverage report [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-report/scoverage.xml]
[info] Written HTML coverage report [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-report/index.html]
[info] Statement coverage.: 0.00%
[info] Branch coverage....: 0.00%
[info] Coverage reports completed
[info] All done. Coverage was [0.00%]
[info] Reading scoverage measurements...
[info] Generating scoverage reports...
[info] Written Cobertura report [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/coverage-report/cobertura.xml]
[info] Written XML coverage report [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-report/scoverage.xml]
[info] Written HTML coverage report [/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-report/index.html]
[info] Statement coverage.: 72.53%
[info] Branch coverage....: 67.86%
[info] Coverage reports completed
[info] All done. Coverage was [72.53%]
[success] Total time: 2 s, completed May 22, 2018 1:23:52 PM
[info] Aggregating coverage from subprojects...
[info] Found 2 subproject report files [/Users/pbhowmick/Projects/better-files/akka/target/scala-2.12/scoverage-report/scoverage.xml,/Users/pbhowmick/Projects/better-files/core/target/scala-2.12/scoverage-report/scoverage.xml]
[info] Generating scoverage reports...
[info] Written Cobertura report [/Users/pbhowmick/Projects/better-files/target/scala-2.12/coverage-report/cobertura.xml]
[info] Written XML coverage report [/Users/pbhowmick/Projects/better-files/target/scala-2.12/scoverage-report/scoverage.xml]
[info] Written HTML coverage report [/Users/pbhowmick/Projects/better-files/target/scala-2.12/scoverage-report/index.html]
[info] Statement coverage.: 70.58%
[info] Branch coverage....: 66.90%
[info] Coverage reports completed
[info] Aggregation complete. Coverage was [70.58]
[info] All done. Coverage was [70.58%]
[success] Total time: 1 s, completed May 22, 2018 1:23:53 PM
[info] Uploading coverage data...
[error] java.lang.RuntimeException: Failed to upload data. Reason: not found
[error]         at scala.sys.package$.error(package.scala:27)
[error]         at com.codacy.CodacyCoveragePlugin$.$anonfun$codacyCoverageCommand$8(CodacyCoveragePlugin.scala:81)
[error]         at com.codacy.api.helpers.FileHelper$.$anonfun$withTokenAndCommit$3(FileHelper.scala:21)
[error]         at scala.Option.map(Option.scala:146)
[error]         at com.codacy.api.helpers.FileHelper$.$anonfun$withTokenAndCommit$1(FileHelper.scala:19)
[error]         at com.codacy.api.helpers.FileHelper$.$anonfun$withCommit$2(FileHelper.scala:34)
[error]         at scala.Option.map(Option.scala:146)
[error]         at com.codacy.api.helpers.FileHelper$.withCommit(FileHelper.scala:33)
[error]         at com.codacy.api.helpers.FileHelper$.withTokenAndCommit(FileHelper.scala:18)
[error]         at com.codacy.CodacyCoveragePlugin$.com$codacy$CodacyCoveragePlugin$$codacyCoverageCommand(CodacyCoveragePlugin.scala:66)
[error]         at com.codacy.CodacyCoveragePlugin$AutoImport$.$anonfun$baseSettings$1(CodacyCoveragePlugin.scala:34)
[error]         at com.codacy.CodacyCoveragePlugin$AutoImport$.$anonfun$baseSettings$1$adapted(CodacyCoveragePlugin.scala:31)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:263)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:272)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:263)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (codacyCoverage) Failed to upload data. Reason: not found
[error] Total time: 2 s, completed May 22, 2018 1:23:55 PM

Reproducible Test Case

See: https://travis-ci.org/pathikrit/better-files/builds/382231885

rtfpessoa commented 6 years ago

Hi @pathikrit that seems like a permission issue. Can you confirm you have an environment variable named CODACY_PROJECT_TOKEN with the token you can find in Project > Settings > Integrations?

pathikrit commented 6 years ago

Yes, I have the CODACY_PROJECT_TOKEN:

image

rtfpessoa commented 6 years ago

The version of the lib seems the latest and the token seems to be correctly exported. I did some tests and cannot replicate the issue.

Can you retry the build to make sure it was not some problem with the API at that time? If not, can you check if the token is being correctly encrypted? Your token should end with eb2, can you confirm this?

pathikrit commented 6 years ago

It ends with jQ !

image

rtfpessoa commented 6 years ago

That is the issue. You need to get the token from Project -> Settings -> Integrations -> Add Integration -> Project API.

Check https://github.com/codacy/sbt-codacy-coverage#updating-codacy for any more details.

let me know if it works.

pathikrit commented 6 years ago

Ok, my bad, I updated the token and it worked: https://travis-ci.org/pathikrit/better-files

Feedback:

rtfpessoa commented 6 years ago

I added some more info to the README and eventually we will try to improve the messages.

Just out of curiosity, how did you find about the account token?