codecov / codecov-exe

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

codecov.exe fails with 403 #45

Closed aelassas closed 5 years ago

aelassas commented 5 years ago

Hi,

When I try to upload my report I get the following error:

2018-11-20 14:18:50 VRB One or more errors occurred. (The remote server returned an error: (403) Forbidden.)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Codecov.Upload.HttpWebRequest.Put(Uri url) in C:\projects\codecov-exe\Source\Codecov\Upload\HttpWebRequest.cs:line 57
   at Codecov.Upload.Upload.Uploader() in C:\projects\codecov-exe\Source\Codecov\Upload\Upload.cs:line 36
2018-11-20 14:18:50 VRB Uploader failed.
2018-11-20 14:18:50 VRB Trying to upload using WebClient in PowerShell.
2018-11-20 14:18:51 VRB Exception lors de l'appel de ´┐¢UploadString´┐¢ avec ´┐¢3´┐¢ argument(s): ´┐¢La demande a ´┐¢t´┐¢ abandonn´┐¢e: Impossible de cr´┐¢er un
canal s´┐¢curis´┐¢ SSL/TLS.´┐¢
Au caract´┐¢re Ligne:5 : 17
+ ...             $client.UploadString('https://codecov.io/upload/v4?branch ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
   at Codecov.Terminal.Terminal.Run(String command, String commandArguments) in C:\projects\codecov-exe\Source\Codecov\Terminal\Terminal.cs:line 71
2018-11-20 14:18:51 VRB Failed to ping codecov.
2018-11-20 14:18:51 VRB Uploader failed.
2018-11-20 14:18:51 FTL Failed to upload the report.
   at Codecov.Upload.Uploads.Uploader() in C:\projects\codecov-exe\Source\Codecov\Upload\Uploads.cs:line 34
   at Codecov.Program.UploadFacade.Uploader() in C:\projects\codecov-exe\Source\Codecov\Program\UploadFacade.cs:line 119
   at Codecov.Program.Run.Runner(IEnumerable`1 args) in C:\projects\codecov-exe\Source\Codecov\Program\Run.cs:line 20

Here is the command I am using:

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

Can you please help me to fix this?

Kind regards,

AdmiringWorm commented 5 years ago

hmm, this error looks related to the SSL certificate (although I'm not entirely sure). Basically, it seems it's unable to create a trusted SSL/TLS connection.

@stevepeak have there been any changes to the SSL certificate on the webserver that would cause this error? Stricter rules of the allowed SSL connection kinds perhaps?

ViktorHofer commented 5 years ago

ping @stevepeak @AdmiringWorm this is still happening. That currently hinders us to use codecov-exe.

AdmiringWorm commented 5 years ago

A new release of codecov-exe was released just now which possibly fixes this issue. (currently indexing of nuget).

If anyone are able to test out the new changes when nuget is done indexing (Version 1.6.0), I would appreciate it.

aelassas commented 5 years ago

I tried to test but I got the following error message;

Error: Os { code: 2, kind: NotFound, message: "Specified file not found." }
AdmiringWorm commented 5 years ago

@aelassas I made some changed to the package, so it could be I changed the path (without meaning to).

What is the full path to the executable that you tried to launch (sounds like you tried to launch the executable for the wrong platform)

AdmiringWorm commented 5 years ago

oh wait, I think I have made a mistake when creating the executable (perhaps).

I will investigate and get back to you

aelassas commented 5 years ago

I tried to launch the executable on windows 10.

AdmiringWorm commented 5 years ago

nope, tested the nuget package and it should work.

Which package did you try it with? Nuget, chocolatey or the .NET Core CLI one?

I tried to launch the executable on windows 10.

Directly? how this you try launching it? What paths (or was it double clicking), what arguments. A path with or without the .exe? Just trying to narrow it down.

AdmiringWorm commented 5 years ago

@aelassas

I tried to launch the executable on windows 10.

I don't suppose you are using Cake.Codecov? If so, it hasn't yet been updated to pick the correct paths for the nuget package, so it incorrectly picks up the unix variant instead of the windows one. I hope to get that updated today.

aelassas commented 5 years ago

No, I'm not using Cake.Codecov. I'm using codecov.exe from the nuget package.

aelassas commented 5 years ago

@AdmiringWorm The version 1.6.1 resolves this issue. Thanks.

AdmiringWorm commented 5 years ago

That is great to hear. I guess changing from WebClient to HttpClient helped. 😃