lastfm / lastfm-windows-desktop

Last.fm Desktop app for Windows (3.0)
GNU General Public License v3.0
10 stars 1 forks source link

App crashes when ws.audioscrobbler.com can't be reached during auth #13

Closed ben-xo closed 6 years ago

ben-xo commented 6 years ago

Needs to gracefully handle the site being unavailable during login / auth.

Expected:

Actual:

ben-xo commented 6 years ago

System.Net.Http.HttpRequestException occurred HResult=0x80131500 Message=An error occurred while sending the request. Source=mscorlib StackTrace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LastFM.ApiClient.HttpClient.<PerformRequest>d__131.MoveNext() in C:\Users\datateam\Documents\GitHub\lastfm-windows-desktop\DesktopScrobbler\LastFMApi\HttpClient.cs:line 99 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LastFM.ApiClient.HttpClient.<SendRequest>d__151.MoveNext() in C:\Users\datateam\Documents\GitHub\lastfm-windows-desktop\DesktopScrobbler\LastFMApi\HttpClient.cs:line 195 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LastFM.ApiClient.LastFMClient.<UnauthenticatedGet>d__281.MoveNext() in C:\Users\datateam\Documents\GitHub\lastfm-windows-desktop\DesktopScrobbler\LastFMApi\LastFMClient.cs:line 318 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LastFM.ApiClient.LastFMClient.<GetAuthToken>d__18.MoveNext() in C:\Users\datateam\Documents\GitHub\lastfm-windows-desktop\DesktopScrobbler\LastFMApi\LastFMClient.cs:line 92 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LastFM.ApiClient.LastFMClient.d__17.MoveNext() in C:\Users\datateam\Documents\GitHub\lastfm-windows-desktop\DesktopScrobbler\LastFMApi\LastFMClient.cs:line 80 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at DesktopScrobbler.AuthenticationUi.d__4.MoveNext() in C:\Users\datateam\Documents\GitHub\lastfm-windows-desktop\DesktopScrobbler\DesktopScrobbler\AuthenticationUi.cs:line 29

Inner Exception 1: WebException: Unable to connect to the remote server

Inner Exception 2: SocketException: No connection could be made because the target machine actively refused it 127.0.0.5:80

VorTechS commented 6 years ago

Fixed. The authentication process was missing exception handlers for token retrieval.