-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool crashes on url timeout #182
Comments
Hi @rvsanten, Thank you for reporting this important issue. |
Can confirm having this issue as well. Thanks for working on this issue @tomchavakis . Will follow this issue. Please let me know if I can test something for you. |
Hi @tomchavakis , thank you for your fast resolution. I'm sorry for my late response. The fix works well but the HTTP client will sometimes throw an I also noticed that Thank you for your fast support and I will try to help you out faster next time. Thanks! |
HI @dbeusink , |
@dbeusink, Can you pull the new code and run a test please to confirm that the update is fine? |
Can confirm it's working as expected; both exception types are handled and logged.
|
Thank you @dbeusink , I will release a new version in order to take advantage of the fix. Thank you for your support. |
Thank you for solving this so quickly, will integrate the new version somewhere next week. And @dbeusink thank you for testing and confirming! |
System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 10 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.TaskCompletionSourceWithCancellation
1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(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.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) --- End of inner exception stack trace --- --- 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 NugetUtility.Methods.ExportLicenseTexts(List
1 infos) in /home/runner/work/nuget-license/nuget-license/src/Methods.cs:line 1013at NugetUtility.Program.Execute(PackageOptions options) in /home/runner/work/nuget-license/nuget-license/src/Program.cs:line 71
See line:
nuget-license/src/Methods.cs
Line 976 in cd15113
I am using your tool for quite some time now, works great and helps me a lot! But now I ran into a problem that when there is a download timeout (export licenses) the application crashes. It would be nice when the execption is caught and logged. Now our build fails for difficult to troubleshoot error.
try..catch for the ExportLicenseTexts function ->
catch (TimeOutException ex)
{
WriteOutput($"Problem during download of License url: {fileToDownload} -> {ex.Message}");
}
The text was updated successfully, but these errors were encountered: