Skip to content

Timeout flag not working correctly when publishing to github #424

@sanjay900

Description

@sanjay900

OS

Linux (Ubuntu 22.04 LTS), Windows Server Core (Version 10.0.20348.169), macOS (15.1, 24B83)

Programming Language

dotnet 8.0

VPK Version

Velopack CLI 0.0.1015

Library Version

Nuget 0.0.869

What happened?

When i upload large releases to GitHub, they time out after around 100 seconds, which i have to assume means some timeout isn't being set and the Default HTTPClient Timeout is still being used somewhere.

I was hoping that the new --timeout flag would help here, but it does not seem to have an effect on the timeouts for uploading to GitHub.

I am running vpk upload github --repoUrl {url} --publish --releaseName {release_name} --tag {tag_name} --token {token} --merge --timeout 30

Relevant log output

[23:56:47 INF] Velopack CLI 0.0.1015, for distributing applications.
[23:56:50 INF] Preparing to upload 2 asset(s) to GitHub
[23:57:00 INF] Found existing release (Builder v10.1.309 ). Merge flag is enabled.
[23:57:00 INF] Uploading asset 'SantrollerConfiguratorBuilder-10.1.309-osx-full.nupkg'..
[23:58:40 ERR] The operation was canceled., retrying in 1 second.
[23:58:41 INF] (retry 1) Uploading asset 'SantrollerConfiguratorBuilder-10.1.309-osx-full.nupkg'..
[00:00:21 ERR] The operation was canceled., retrying in 1 second.
[00:00:22 INF] (retry 2) Uploading asset 'SantrollerConfiguratorBuilder-10.1.309-osx-full.nupkg'..
[00:02:02 ERR] The operation was canceled., will not try again.
[00:02:02 FTL] The operation was canceled.
System.Threading.Tasks.TaskCanceledException: The operation was canceled.
 ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
 ---> System.Net.Http.HttpRequestException: Error while copying content to a stream.
 ---> System.IO.IOException: Unable to write data to the transport connection: Operation canceled.
 ---> System.Net.Sockets.SocketException (89): Operation canceled
   --- 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.GetResult(Int16 token)
   at System.Net.Security.SslStream.<WriteSingleChunk>g__CompleteWriteAsync|157_1[TIOAdapter](ValueTask writeTask, Byte[] bufferToReturn)
   at System.Net.Security.SslStream.WriteAsyncChunked[TIOAdapter](ReadOnlyMemory`1 buffer, CancellationToken cancellationToken)
   at System.Net.Security.SslStream.WriteAsyncInternal[TIOAdapter](ReadOnlyMemory`1 buffer, CancellationToken cancellationToken)
   at System.IO.Stream.<CopyToAsync>g__Core|27_0(Stream source, Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
   at System.IO.Strategies.BufferedFileStreamStrategy.CopyToAsyncCore(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
   at System.Net.Http.HttpContent.<CopyToAsync>g__WaitAsync|56_0(ValueTask copyTask)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpContent.<CopyToAsync>g__WaitAsync|56_0(ValueTask copyTask)
   at System.Net.Http.HttpConnection.SendRequestContentAsync(HttpRequestMessage request, HttpContentWriteStream stream, Boolean async, CancellationToken cancellationToken)
   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.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Octokit.Internal.HttpClientAdapter.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /_/Octokit/Http/HttpClientAdapter.cs:line 206
   at Octokit.Internal.HttpClientAdapter.Send(IRequest request, CancellationToken cancellationToken, Func`2 preprocessResponseBody) in /_/Octokit/Http/HttpClientAdapter.cs:line 50
   at Octokit.Connection.RunRequest(IRequest request, CancellationToken cancellationToken, Func`2 preprocessResponseBody) in /_/Octokit/Http/Connection.cs:line 792
   at Octokit.Connection.Run[T](IRequest request, CancellationToken cancellationToken, Func`2 preprocessResponseBody) in /_/Octokit/Http/Connection.cs:line 783
   at Octokit.ApiConnection.Post[T](Uri uri, Object data, String accepts, String contentType, CancellationToken cancellationToken)
   at Velopack.Deployment.GitHubRepository.UploadFileAsAsset(GitHubClient client, Release release, String filePath) in ./vpk/Velopack.Deployment/GitHubRepository.cs:line 162
   at Velopack.Deployment.DownRepository`1.RetryAsync(Func`1 block, String message, Int32 maxRetries) in ./vpk/Velopack.Deployment/_Repository.cs:line 148
   at Velopack.Deployment.DownRepository`1.RetryAsync(Func`1 block, String message, Int32 maxRetries)
   at Velopack.Deployment.GitHubRepository.UploadMissingAssetsAsync(GitHubUploadOptions options) in ./vpk/Velopack.Deployment/GitHubRepository.cs:line 115
   at Velopack.Vpk.ProgramCommandExtensions.<>c__DisplayClass3_0`2.<<Add>b__0>d.MoveNext() in ./vpk/Velopack.Vpk/Program.cs:line 279

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