Skip to content

Tracker displays "Updating to latest version failed" when there is no new release #4687

@ChrisNolan

Description

@ChrisNolan

Expected Behavior

I'd expect that error message, Updating to latest version failed (MainWindow_StatusBarUpdate_UpdateFailed) to only show when there is a 'latest' version.

Actual Behavior

It shows the error even if there is just a network issue checking if there is a latest version.

Steps to reproduce behavior

Start the tracker. 'Sleep' your computer. Wake your computer.

The tracker's 'timer' code, if the 20 minutes have passed, will run the CheckForUpdates immediately -- while the network is still reconnecting. This results in an error that isn't retried, and instead ends up throwing the error which triggers the wrong message.

Log/Screenshots

11:05:49 PM|Info|Updater.SquirrelUpdate >> Checking for updates (ignoreDelta=False)
11:05:50 PM|Info|Updater.SquirrelUpdate >> No new update available
11:25:49 PM|Info|Updater.SquirrelUpdate >> Checking for updates (ignoreDelta=False)
11:25:50 PM|Info|Updater.SquirrelUpdate >> No new update available
11:45:51 PM|Info|Updater.SquirrelUpdate >> Checking for updates (ignoreDelta=False)
11:45:51 PM|Info|Updater.SquirrelUpdate >> No new update available
12:05:49 AM|Info|Updater.SquirrelUpdate >> Checking for updates (ignoreDelta=False)
12:05:50 AM|Info|Updater.SquirrelUpdate >> No new update available
7:38:46 AM|Error|Updater.CheckForUpdates >> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'api.github.com'
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.UpdateManager.<GitHubUpdateManager>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Hearthstone_Deck_Tracker.Utility.Updating.Updater.<GetUpdateManager>d__11.MoveNext() in D:\a\Hearthstone-Deck-Tracker\Hearthstone-Deck-Tracker\Hearthstone Deck Tracker\Utility\Updating\Updater.Squirrel.cs:line 70
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Hearthstone_Deck_Tracker.Utility.Updating.Updater.<CheckForUpdates>d__9.MoveNext() in D:\a\Hearthstone-Deck-Tracker\Hearthstone-Deck-Tracker\Hearthstone Deck Tracker\Utility\Updating\Updater.Squirrel.cs:line 34
7:43:43 AM|Info|OverlayWindow.SetTopmost >> Hearthstone window not found
7:49:41 AM|Info|Helper.EnsureClientLogConfig >> client.config is up-to-date

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions