This repository was archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
client crashes if stored credentials cannot be decrypted #85
Copy link
Copy link
Open
Description
steps to reproduce:
- Have a
settings.jsonstored at...\AppData\Roaming\Tgstation.Server.ControlPanel - Attempt to start client
- If
settings.jsonis from a different installation or otherwise cannot be decoded, application crashes at boot
Deleting settings.json provides a workaround but you lose your settings.
In this case the settings.json was from a previous installation of Windows and was carried over.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Key not valid for use in specified state.
at System.Security.Cryptography.ProtectedData.ProtectOrUnprotect(Byte[] inputData, Byte[] optionalEntropy, DataProtectionScope scope, Boolean protect)
at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
at Tgstation.Server.ControlPanel.Models.Credentials.Decrypt() in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\Models\Credentials.cs:line 65
at Tgstation.Server.ControlPanel.Models.Credentials.get_Password() in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\Models\Credentials.cs:line 18
at Tgstation.Server.ControlPanel.ViewModels.MainWindowViewModel.get_GitHubToken() in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\ViewModels\MainWindowViewModel.cs:line 104
at Tgstation.Server.ControlPanel.ViewModels.MainWindowViewModel.UpdateGitHubClient() in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\ViewModels\MainWindowViewModel.cs:line 192
at Tgstation.Server.ControlPanel.ViewModels.MainWindowViewModel..ctor(IUpdater updater) in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\ViewModels\MainWindowViewModel.cs:line 164
at Tgstation.Server.ControlPanel.App..ctor() in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\App.xaml.cs:line 17
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance[T]()
at Avalonia.Controls.AppBuilderBase`1.<>c__45`1.<Configure>b__45_0() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 87
at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 306
at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 179
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 174
at Tgstation.Server.ControlPanel.Program.Main(String[] args) in S:\workspace\Tgstation.Server.ControlPanel\src\Tgstation.Server.ControlPanel\Program.cs:line 17
Metadata
Metadata
Assignees
Labels
No labels