{"action":"created","issue":{"url":"https://api.github.com/repos/codacy/sbt-codacy-coverage/issues/38","repository_url":"https://api.github.com/repos/codacy/sbt-codacy-coverage","labels_url":"https://api.github.com/repos/codacy/sbt-codacy-coverage/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/codacy/sbt-codacy-coverage/issues/38/comments","events_url":"https://api.github.com/repos/codacy/sbt-codacy-coverage/issues/38/events","html_url":"https://github.com/codacy/sbt-codacy-coverage/issues/38","id":196273337,"number":38,"title":"codacyCoverage not working on Travis CI (commitUuid not found?)","user":{"login":"guilgaly","id":6560742,"avatar_url":"https://avatars.githubusercontent.com/u/6560742?v=3","gravatar_id":"","url":"https://api.github.com/users/guilgaly","html_url":"https://github.com/guilgaly","followers_url":"https://api.github.com/users/guilgaly/followers","following_url":"https://api.github.com/users/guilgaly/following{/other_user}","gists_url":"https://api.github.com/users/guilgaly/gists{/gist_id}","starred_url":"https://api.github.com/users/guilgaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilgaly/subscriptions","organizations_url":"https://api.github.com/users/guilgaly/orgs","repos_url":"https://api.github.com/users/guilgaly/repos","events_url":"https://api.github.com/users/guilgaly/events{/privacy}","received_events_url":"https://api.github.com/users/guilgaly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mrfyda","id":593860,"avatar_url":"https://avatars.githubusercontent.com/u/593860?v=3","gravatar_id":"","url":"https://api.github.com/users/mrfyda","html_url":"https://github.com/mrfyda","followers_url":"https://api.github.com/users/mrfyda/followers","following_url":"https://api.github.com/users/mrfyda/following{/other_user}","gists_url":"https://api.github.com/users/mrfyda/gists{/gist_id}","starred_url":"https://api.github.com/users/mrfyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrfyda/subscriptions","organizations_url":"https://api.github.com/users/mrfyda/orgs","repos_url":"https://api.github.com/users/mrfyda/repos","events_url":"https://api.github.com/users/mrfyda/events{/privacy}","received_events_url":"https://api.github.com/users/mrfyda/received_events","type":"User","site_admin":false},"assignees":[{"login":"mrfyda","id":593860,"avatar_url":"https://avatars.githubusercontent.com/u/593860?v=3","gravatar_id":"","url":"https://api.github.com/users/mrfyda","html_url":"https://github.com/mrfyda","followers_url":"https://api.github.com/users/mrfyda/followers","following_url":"https://api.github.com/users/mrfyda/following{/other_user}","gists_url":"https://api.github.com/users/mrfyda/gists{/gist_id}","starred_url":"https://api.github.com/users/mrfyda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrfyda/subscriptions","organizations_url":"https://api.github.com/users/mrfyda/orgs","repos_url":"https://api.github.com/users/mrfyda/repos","events_url":"https://api.github.com/users/mrfyda/events{/privacy}","received_events_url":"https://api.github.com/users/mrfyda/received_events","type":"User","site_admin":false},{"login":"rtfpessoa","id":902384,"avatar_url":"https://avatars.githubusercontent.com/u/902384?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfpessoa","html_url":"https://github.com/rtfpessoa","followers_url":"https://api.github.com/users/rtfpessoa/followers","following_url":"https://api.github.com/users/rtfpessoa/following{/other_user}","gists_url":"https://api.github.com/users/rtfpessoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfpessoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfpessoa/subscriptions","organizations_url":"https://api.github.com/users/rtfpessoa/orgs","repos_url":"https://api.github.com/users/rtfpessoa/repos","events_url":"https://api.github.com/users/rtfpessoa/events{/privacy}","received_events_url":"https://api.github.com/users/rtfpessoa/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-12-18T12:35:08Z","updated_at":"2016-12-28T12:12:44Z","closed_at":null,"body":"Cross-reference: I also asked [a question on stackoverflow](http://stackoverflow.com/q/41204252/3801695).\r\n\r\n--------\r\n\r\nI have set up a Scala/SBT project with Travis CI and Codacy integration. The sources are visible at https://github.com/guilgaly/itunes-dap-sync.\r\n\r\nI wanted to be able to view a code coverage report in Codacy, so I added the following SBT plugins:\r\n\r\n    addSbtPlugin(\"org.scoverage\" % \"sbt-scoverage\" % \"1.5.0\")\r\n    addSbtPlugin(\"com.codacy\" % \"sbt-codacy-coverage\" % \"1.3.7\")\r\n\r\nAnd I was able to upload coverage data to Codacy with the following commands, on my computer:\r\n\r\n    export CODACY_PROJECT_TOKEN=<my token>\r\n    sbt clean coverage test\r\n    sbt coverageReport\r\n    sbt coverageAggregate\r\n    sbt codacyCoverage\r\n\r\nTo automatically upload coverage data from the Travis CI build, I set up the CODACY_PROJECT_TOKEN environment variable for the project, and used the following .travis.yml configuration:\r\n\r\n    language: scala\r\n    scala:\r\n      - 2.12.1\r\n    jdk:\r\n      - oraclejdk8\r\n    script:\r\n      - sbt clean coverage test\r\n    after_success:\r\n      - sbt coverageReport\r\n      - sbt coverageAggregate\r\n      - sbt codacyCoverage\r\n\r\nBut in the Travis CI build log, I see that codacyCoverage fails, with `java.lang.RuntimeException: Failed to upload data. Reason: Request handler not found: /2.0/coverage//scala`:\r\n\r\n    [info] Loading project definition from /home/travis/build/guilgaly/itunes-dap-sync/project\r\n    [info] Set current project to itunes-dap-sync (in build file:/home/travis/build/guilgaly/itunes-dap-sync/)\r\n    [info] Defining {.}/*:javaHome\r\n    [info] The new value will be used by *:compilers, *:console::compilers and 6 others.\r\n    [info]  Run `last` for details.\r\n    [info] Reapplying settings...\r\n    [info] Set current project to itunes-dap-sync (in build file:/home/travis/build/guilgaly/itunes-dap-sync/)\r\n    [info] Uploading coverage data...\r\n    java.lang.RuntimeException: Failed to upload data. Reason: Request handler not found: /2.0/coverage//scala\r\n        at scala.sys.package$.error(package.scala:27)\r\n        at com.codacy.CodacyCoveragePlugin$$anonfun$7.apply(CodacyCoveragePlugin.scala:79)\r\n        at com.codacy.CodacyCoveragePlugin$$anonfun$7.apply(CodacyCoveragePlugin.scala:64)\r\n        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1$$anonfun$apply$2.apply(FileHelper.scala:21)\r\n        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1$$anonfun$apply$2.apply(FileHelper.scala:19)\r\n        at scala.Option.map(Option.scala:145)\r\n        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1.apply(FileHelper.scala:19)\r\n        at com.codacy.api.helpers.FileHelper$$anonfun$withTokenAndCommit$1.apply(FileHelper.scala:18)\r\n        at com.codacy.api.helpers.FileHelper$$anonfun$withCommit$2.apply(FileHelper.scala:34)\r\n        at com.codacy.api.helpers.FileHelper$$anonfun$withCommit$2.apply(FileHelper.scala:33)\r\n        at scala.Option.map(Option.scala:145)\r\n        at com.codacy.api.helpers.FileHelper$.withCommit(FileHelper.scala:33)\r\n        at com.codacy.api.helpers.FileHelper$.withTokenAndCommit(FileHelper.scala:18)\r\n        at com.codacy.CodacyCoveragePlugin$.com$codacy$CodacyCoveragePlugin$$codacyCoverageCommand(CodacyCoveragePlugin.scala:64)\r\n        at com.codacy.CodacyCoveragePlugin$AutoImport$$anonfun$baseSettings$2.apply(CodacyCoveragePlugin.scala:31)\r\n        at com.codacy.CodacyCoveragePlugin$AutoImport$$anonfun$baseSettings$2.apply(CodacyCoveragePlugin.scala:30)\r\n        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)\r\n        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)\r\n        at sbt.std.Transform$$anon$4.work(System.scala:63)\r\n        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)\r\n        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)\r\n        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)\r\n        at sbt.Execute.work(Execute.scala:237)\r\n        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)\r\n        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)\r\n        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)\r\n        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)\r\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n        at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n    [error] (*:codacyCoverage) Failed to upload data. Reason: Request handler not found: /2.0/coverage//scala\r\n\r\nIt seems that the URL `/2.0/coverage//scala` is missing the commitUuid part. However, judging from the sbt-codacy-coverage code, Travis' `TRAVIS_COMMIT` env variable should be picked up for that. I added `echo \"TRAVIS_COMMIT $TRAVIS_COMMIT\"` to my `after_success` script, and it does print the commit's hash.\r\n\r\nAny idea what might cause this issue?"},"comment":{"url":"https://api.github.com/repos/codacy/sbt-codacy-coverage/issues/comments/269469028","html_url":"https://github.com/codacy/sbt-codacy-coverage/issues/38#issuecomment-269469028","issue_url":"https://api.github.com/repos/codacy/sbt-codacy-coverage/issues/38","id":269469028,"user":{"login":"rtfpessoa","id":902384,"avatar_url":"https://avatars.githubusercontent.com/u/902384?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfpessoa","html_url":"https://github.com/rtfpessoa","followers_url":"https://api.github.com/users/rtfpessoa/followers","following_url":"https://api.github.com/users/rtfpessoa/following{/other_user}","gists_url":"https://api.github.com/users/rtfpessoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfpessoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfpessoa/subscriptions","organizations_url":"https://api.github.com/users/rtfpessoa/orgs","repos_url":"https://api.github.com/users/rtfpessoa/repos","events_url":"https://api.github.com/users/rtfpessoa/events{/privacy}","received_events_url":"https://api.github.com/users/rtfpessoa/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T12:12:44Z","updated_at":"2016-12-28T12:12:44Z","body":"Sorry for the delay in the answer. This kind of got lost in the backlog. We are looking at this now and should have an answer soon.\r\n\r\nFor future bugs I recommend you to drop up an email at `support at codacy dot com` or use the in app support."}}
{"actor":{"display_login":"rtfpessoa"}}