TCNOco / TcNo-Acc-Switcher

A Super-fast account switcher for Steam, Battle.net, Epic Games, Origin, Riot, Ubisoft and many others!
GNU General Public License v3.0
1.73k stars 121 forks source link

Error when loading Battle.net with private profile #228

Open ajzat34 opened 2 years ago

ajzat34 commented 2 years ago

Describe the bug Receiving an error if any battle.net accounts have private profiles.

To Reproduce Steps to reproduce the behavior:

  1. Add a battle.net account with a private profile, and add a battle tag
  2. enable: Show Overwatch SR and use the Overwatch profile picture
  3. wait until profile is loaded

Expected behavior Handle private profiles gracefully without An error has occurred. This application may no longer respond until reloaded. and without failing to load other accounts.

Screenshots TcNo Error

Desktop (please complete the following information):

Additional context

blazor.server.js:1 

       [2022-06-29T03:33:17.295Z] Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at TcNo_Acc_Switcher_Server.Pages.BattleNet.BattleNetSwitcherBase.BattleNetUser.FetchRank() in C:\Users\TCNO\Documents\GitHub\TcNo-Acc-Switcher\TcNo-Acc-Switcher-Server\Pages\BattleNet\BattleNetSwitcherBase.cs:line 135
   at TcNo_Acc_Switcher_Server.Pages.BattleNet.BattleNetSwitcherFuncs.InitOverwatchMode() in C:\Users\TCNO\Documents\GitHub\TcNo-Acc-Switcher\TcNo-Acc-Switcher-Server\Pages\BattleNet\BattleNetSwitcherFuncs.cs:line 173
   at TcNo_Acc_Switcher_Server.Pages.BattleNet.BattleNetSwitcherFuncs.LoadProfiles() in C:\Users\TCNO\Documents\GitHub\TcNo-Acc-Switcher\TcNo-Acc-Switcher-Server\Pages\BattleNet\BattleNetSwitcherFuncs.cs:line 133
   at TcNo_Acc_Switcher_Server.Pages.General.GeneralFuncs.HandleFirstRender(Boolean firstRender, String platform) in C:\Users\TCNO\Documents\GitHub\TcNo-Acc-Switcher\TcNo-Acc-Switcher-Server\Pages\General\GeneralFuncs.cs:line 756
   at TcNo_Acc_Switcher_Server.Pages.BattleNet.Index.OnAfterRenderAsync(Boolean firstRender) in C:\Users\TCNO\Documents\GitHub\TcNo-Acc-Switcher\TcNo-Acc-Switcher-Server\Pages\BattleNet\Index.razor:line 113
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
TCNOco commented 2 years ago

This issue has been fixed for the next release. Hopefully should be out tomorrow or the day after. I will post again here when it's out.