vatis-project / vatis-archive

Virtual Automated ATIS Generator for VATSIM
https://docs.vatis.clowd.io
GNU General Public License v3.0
38 stars 20 forks source link

Exception after "checking for new navigation data" #135

Closed neilenns closed 1 year ago

neilenns commented 1 year ago

This is happing to a fellow controller. On launch of vATIS he gets the "checking for new navigation data" message and then the app crashes:

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)

Log file contents:

2023-05-08 10:40:46.602 -07:00 [INF] vATIS version 4.0.0-beta.12 starting up
2023-05-08 10:40:48.140 -07:00 [INF] Downloading latest version information
2023-05-08 10:40:59.968 -07:00 [INF] Available version is 4.0.0.12, executing version is 4.0.0.12
2023-05-08 10:41:00.203 -07:00 [INF] Downloading airport navdata from https://github.com/vatis-project/navdata/releases/download/v1.0.0/airports.json

We've tried uninstalling and nuking the vATIS-4.0 folder from %localappdata% on his machine then reinstalling beta 12 but the exception still happens.

justinshannon commented 1 year ago

Is that the entirety of the exception stack trace?

neilenns commented 1 year ago

I believe so. Let me ask him


From: Justin Shannon @.> Sent: Tuesday, May 9, 2023 6:11:10 AM To: vatis-project/vatis @.> Cc: Neil Enns @.>; Author @.> Subject: Re: [vatis-project/vatis] Exception after "checking for new navigation data" (Issue #135)

Is that the entirety of the exception stack trace?

— Reply to this email directly, view it on GitHubhttps://github.com/vatis-project/vatis/issues/135#issuecomment-1540098513, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACIVHFTH73RHAN4TT2LGEATXFI665ANCNFSM6AAAAAAX2HY2NI. You are receiving this because you authored the thread.Message ID: @.***>

neilenns commented 1 year ago

He says yes, the rest was just version info for the assemblies, but will get me the entire thing in a day or two (he's away from his computer for the next few days).

justinshannon commented 1 year ago

In beta 13, the HttpClient is forced to use IPv4, which will hopefully fix this issue.

I'm theorizing that the user is getting the TaskCanceledException because the http request is timing out. I recall some vPilot users getting a similar error when the new http auth method was introduced; restarting the computer or router was a temporary solution for some users. The solution that was implemented in vPilot was to make the http request to the auth token endpoint using the IPv4 address.

neilenns commented 1 year ago

I let him know. He likely won't be able to try it for another day or so, but I'll report back once I hear results.

neilenns commented 1 year ago

Seems like that change fixed it:

Happy to report vATIS seems to work fine with beta 13!