Skip to content

System.Net.Http.HttpRequestException Gitea Update Source #690

@KennyTK

Description

@KennyTK

OS

Windows 10.0.19044

Programming Language

dotnet 8.0

VPK Version

vpk 0.0.1298

Library Version

Nuget v0.0.1298

What happened?

While using a Gitea Update Source, the following error is thrown in event viewer and MyProgram fails to start. I believe this is an issue with TLS and handshake with Gitea but I am not experienced with http.

https://stackoverflow.com/questions/57376575/using-httpclient-httpwebrequest-for-https-tls1-2/57377861#57377861

Relevant log output

Application: MyProgram.exe CoreCLR Version: 8.0.1725.26602 .NET Version: 8.0.17 Description: The process was terminated due to an unhandled exception. Exception Info: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host. --- End of inner exception stack trace --- at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token) at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async) at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at Velopack.Sources.HttpClientFileDownloader.TryDownloadThenLowercase[T](Func2 downloadFunc, String url) at Velopack.Sources.HttpClientFileDownloader.TryDownloadThenLowercase[T](Func2 downloadFunc, String url) at Velopack.Sources.HttpClientFileDownloader.DownloadString(String url, IDictionary2 headers, Double timeout) at Velopack.Sources.GiteaSource.GetReleases(Boolean includePrereleases) at Velopack.Sources.GitBase1.GetReleaseFeed(IVelopackLogger logger, String appId, String channel, Nullable1 stagingId, VelopackAsset latestLocalRelease) at Velopack.UpdateManager.CheckForUpdatesAsync() at MyProgram.Program.UpdateMyApp() at MyProgram.Program.Main() at MyProgram.Program.<Main>()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions