codecov / codecov-exe

.exe report uploader for Codecov https://codecov.io
MIT License
25 stars 21 forks source link

Uploader failed #82

Closed aelassas closed 4 years ago

aelassas commented 5 years ago

When I try to upload the report with the version 1.7.0 using the command:

codecov.exe --required --verbose --root "D:\dev\Wexflow\src" -f "Wexflow_coverage.xml" --token myToken -n Wexflow

I get the following error;

              _____          _
             / ____|        | |
            | |     ___   __| | ___  ___ _____   __
            | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
            | |___| (_) | (_| |  __/ (_| (_) \ V /
             \_____\___/ \____|\___|\___\___/ \_/
                                         exe-1.7.0

2019-07-28 10:43:33 WRN No CI detected.
2019-07-28 10:43:34 INF Git detected.
2019-07-28 10:43:34 INF Project root: D:\dev\Wexflow\src
2019-07-28 10:43:35 INF Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
2019-07-28 10:43:35 INF Reading reports.
2019-07-28 10:43:35 INF Wexflow_coverage.xml
2019-07-28 10:43:35 INF Uploading Reports.
2019-07-28 10:43:37 INF url: https://codecov.io
2019-07-28 10:43:38 VRB api endpoint: https://codecov.io/upload/v4?branch=master&commit=e917efe4a437ecd7365be32c3c20884272cf12ad&build=&tag=&pr=&name=Wexflow&flags=&slug=aelassas%2FWexflow&token=myToken&package=exe-1.7.0&build_url=&yaml=&job=&service=
2019-07-28 10:43:39 INF query: https://codecov.io/upload/v4?branch=master&commit=e917efe4a437ecd7365be32c3c20884272cf12ad&build=&tag=&pr=&name=Wexflow&flags=&slug=aelassas%2FWexflow&package=exe-1.7.0&build_url=&yaml=&job=&service=
2019-07-28 10:43:40 VRB Trying to upload using HttpClient
2019-07-28 10:43:40 INF Pinging Codecov
2019-07-28 10:43:42 INF Uploading
2019-07-28 10:44:03 VRB One or more errors occurred. (Error while copying content to a stream.)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Codecov.Upload.CodecovUploader.CreateResponse(HttpRequestMessage request) in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/CodecovUploader.cs:line 56
   at Codecov.Upload.CodecovUploader.Put(Uri url) in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/CodecovUploader.cs:line 94
   at Codecov.Upload.Upload.Uploader() in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/Upload.cs:line 36
2019-07-28 10:44:03 VRB Uploader failed.
2019-07-28 10:44:03 INF Uploading to Codecov
2019-07-28 10:45:43 VRB One or more errors occurred. (A task was canceled.)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Codecov.Upload.CodecovUploader.CreateResponse(HttpRequestMessage request) in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/CodecovUploader.cs:line 56
   at Codecov.Upload.CodecovFallbackUploader.Put(Uri url) in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/CodecovFallbackUploader.cs:line 37
   at Codecov.Upload.Upload.Uploader() in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/Upload.cs:line 36
2019-07-28 10:45:43 VRB Uploader failed.
2019-07-28 10:45:43 FTL Failed to upload the report.
   at Codecov.Upload.Uploads.Uploader() in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/Uploads.cs:line 34
   at Codecov.Program.UploadFacade.Uploader() in /home/appveyor/projects/codecov-exe/Source/Codecov/Program/UploadFacade.cs:line 120
   at Codecov.Program.Run.Uploader() in /home/appveyor/projects/codecov-exe/Source/Codecov/Program/Run.cs:line 67
   at Codecov.Program.Run.Runner(IEnumerable`1 args) in /home/appveyor/projects/codecov-exe/Source/Codecov/Program/Run.cs:line 20

But when I try to upload using --slug:

codecov.exe --required --slug aelassas/Wexflow --verbose --root "D:\dev\Wexflow\src" -f "Wexflow_coverage.xml" --token myToken -n Wexflow

It succeeds after an error:

              _____          _
             / ____|        | |
            | |     ___   __| | ___  ___ _____   __
            | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
            | |___| (_) | (_| |  __/ (_| (_) \ V /
             \_____\___/ \____|\___|\___\___/ \_/
                                         exe-1.7.0

2019-07-28 10:45:57 WRN No CI detected.
2019-07-28 10:45:57 INF Git detected.
2019-07-28 10:45:57 INF Project root: D:\dev\Wexflow\src
2019-07-28 10:45:57 INF Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
2019-07-28 10:45:57 INF Reading reports.
2019-07-28 10:45:57 INF Wexflow_coverage.xml
2019-07-28 10:45:57 INF Uploading Reports.
2019-07-28 10:45:58 INF url: https://codecov.io
2019-07-28 10:45:59 VRB api endpoint: https://codecov.io/upload/v4?branch=master&commit=e917efe4a437ecd7365be32c3c20884272cf12ad&build=&tag=&pr=&name=Wexflow&flags=&slug=aelassas%2FWexflow&token=myToken&package=exe-1.7.0&build_url=&yaml=&job=&service=
2019-07-28 10:45:59 INF query: https://codecov.io/upload/v4?branch=master&commit=e917efe4a437ecd7365be32c3c20884272cf12ad&build=&tag=&pr=&name=Wexflow&flags=&slug=aelassas%2FWexflow&package=exe-1.7.0&build_url=&yaml=&job=&service=
2019-07-28 10:46:00 VRB Trying to upload using HttpClient
2019-07-28 10:46:00 INF Pinging Codecov
2019-07-28 10:46:01 INF Uploading
2019-07-28 10:46:30 VRB One or more errors occurred. (Error while copying content to a stream.)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Codecov.Upload.CodecovUploader.CreateResponse(HttpRequestMessage request) in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/CodecovUploader.cs:line 56
   at Codecov.Upload.CodecovUploader.Put(Uri url) in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/CodecovUploader.cs:line 94
   at Codecov.Upload.Upload.Uploader() in /home/appveyor/projects/codecov-exe/Source/Codecov/Upload/Upload.cs:line 36
2019-07-28 10:46:30 VRB Uploader failed.
2019-07-28 10:46:30 INF Uploading to Codecov
2019-07-28 10:47:24 INF View reports at: https://codecov.io/github/aelassas/Wexflow/commit/e917efe4a437ecd7365be32c3c20884272cf12ad
2019-07-28 10:47:24 VRB response: https://codecov.io/upload/v2?branch=master&commit=e917efe4a437ecd7365be32c3c20884272cf12ad&build=&tag=&pr=&name=Wexflow&flags=&slug=aelassas%2FWexflow&token=70fc9dbc-b291-4fd9-8991-0b2316cff8d7&package=exe-1.7.0&build_url=&yaml=&job=&service=

I'm using codecov.exe version 1.7.0 on windows 10 x64 from cmd.

AdmiringWorm commented 5 years ago

I have been trying to reproduce the error locally myself by cloning your repository and setting using the same arguments you mentioned and a similar remote url as you mentioned in issue #79 .

Unfortunately I am unable to reproduce the error that you're seeing, as such I am forced to put this issue on hold until a later date.

aelassas commented 5 years ago

@AdmiringWorm I've made Wexflow_coverage.xml available for you here: https://aelassas.github.io/wexflow/Wexflow_coverage.xml

AdmiringWorm commented 5 years ago

I will try with that coverage, I do not believe it would make any difference though. But better safe than sorry.

AdmiringWorm commented 5 years ago

I am afraid that I am still unable to reproduce the issue.

I did notice that the bash edition of codecov repeats the request some times, this may be one of the reason why it do that.

For now, I recommend that you use command where you set the slug yourself.

aelassas commented 5 years ago

@AdmiringWorm Ok, thanks.

AraHaan commented 4 years ago

@AdmiringWorm uh question so I use codecov-exe 1.4.0 and I just started using it in github actions; is there a build yet that detects github actions now or no?

AdmiringWorm commented 4 years ago

@AraHaan yes there is, the 1.8.0version added support for github actions.

Do note though that you will still need to pass in the codecov token for it to actually be able to push the coverage reports to codecov.io.

EDIT: All release notes are available on the releases page where I will always add when support for a new CI is available.

AraHaan commented 4 years ago

alright thanks; but don't we need to like encrypt the token?

AdmiringWorm commented 4 years ago

@AraHaan of course you would need to do that, which can be done under the Repository Settings -> Secrets section

image

Use the name CODECOV_TOKEN as the environment variable name, and you don't even need to pass anything to codecov-exe yourself.

The drawback is obviously that this won't work on Pull Requests, but unfortunately there is no native support for github actions on codecov.io yet (due to missing information available in an action).

EDIT: It is possible that you will need to set the environment variable itself in the worflow yaml file.

    env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Anyways, this is getting far off topic. Please reach out to me in the gitter channel if you got any more questions.

AraHaan commented 4 years ago

Alright thanks; got it working now.

AdmiringWorm commented 4 years ago

@aelassas I know this is an old issue now, but if you still use codecov-exe can you test if you are still seeing this error when using the latest version (1.11.2 was published a few moments ago).

AdmiringWorm commented 4 years ago

Closing due to no response, assuming that the issue have been fixed.