sourcegraph / cody-vs

Cody for Visual Studio - an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://sourcegraph.com/cody
9 stars 4 forks source link

After upgrading to latest, now getting this error on launch. #125

Closed inzi closed 4 hours ago

inzi commented 4 hours ago

VS Pro 2022 64bit - Version 17.10.3 Cody-vs 0.0.3

It worked fine for one launch.

When it failed to launch, observed the error below. I uninstalled VSIX, then tried re-installing. Still won't open.

21:40:35.692: [ProcessId:25120] [ThreadId:1] Info [Create] Version: 0.1.9058.1217-VS2022 Release build (compiled: 10/19/2024 12:40:34 AM) 21:40:35.716: [ProcessId:25120] [ThreadId:1] Info [InitializeServices] Visual Studio version: 17.10.35013.160 21:40:35.978: [ProcessId:25120] [ThreadId:37] Info [CreateConnector] Process agent connector created 21:40:36.936: [ProcessId:25120] [ThreadId:37] Error [InitializeAgent] Agent initialization failed. Something went wrong. Pleaes see the inner exception for more details. at Microsoft.VisualStudio.Shell.Connected.CredentialStorage.Utilities.ExecuteWrappedAction(Action action) at Microsoft.VisualStudio.Shell.Connected.CredentialStorage.VsCredentialService.Retrieve(IVsCredentialKey credentialKey) at Cody.VisualStudio.Services.SecretStorageService.Get(String key) at Cody.Core.Settings.UserSettingsService.get_AccessToken() in D:\a\cody-vs\cody-vs\src\Cody.Core\Settings\UserSettingsService.cs:line 79 at Cody.Core.Infrastructure.ConfigurationService.GetConfiguration() in D:\a\cody-vs\cody-vs\src\Cody.Core\Infrastructure\ConfigurationService.cs:line 67 at Cody.Core.Infrastructure.ConfigurationService.GetClientInfo() in D:\a\cody-vs\cody-vs\src\Cody.Core\Infrastructure\ConfigurationService.cs:line 31 at Cody.VisualStudio.CodyPackage.<b__36_0>d.MoveNext() Key not valid for use in specified state.

at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.VisualStudio.Services.Common.TokenStorage.RegistryTokenStorageHelper.UnprotectTokenValue(String cipherText) at Microsoft.VisualStudio.Services.Common.TokenStorage.RegistryTokenStorageHelper.CreateTokenFromDataIfMatch(RegistryKey subkey, RegistryTokenStorage storage, String identityToMatch) at Microsoft.VisualStudio.Services.Common.TokenStorage.RegistryTokenStorage.RetrieveToken(VssTokenKey tokenKey) at Microsoft.VisualStudio.Shell.Connected.CredentialStorage.VsCredentialService.<>c__DisplayClass4_0.b__0() at Microsoft.VisualStudio.Shell.Connected.CredentialStorage.Utilities.ExecuteWrappedAction(Action action)

inzi commented 4 hours ago

I deleted keys in registry here: Computer\HKEY_CURRENT_USER\Software\Microsoft\VSCommon\14.0\ClientServices\TokenStorage\VisualStudio

Relaunched VS Pro, Cody loaded and was able to provide token. Seems to be loading now.