PowerShell / SecretStore

MIT License
158 stars 24 forks source link

Exception when calling `Get-SecretStoreConfiguration` and `Set-Secret` #56

Closed AjayKMehta closed 3 years ago

AjayKMehta commented 3 years ago

I installed both SecretStore and SecretManagement modules and tried to follow the examples in the blog post announcing the release. However, I get the exceptions shown below:

Screenshot 2021-03-26 103957

PS Version info:

Name                           Value
----                           -----
PSVersion                      7.1.2
PSEdition                      Core
GitCommitId                    7.1.2
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
PaulHigin commented 3 years ago

I have not seen this error. I suspect there may be some conflict between previous versions. Make sure you uninstall any previous versions of SecretStore and SecretManagement. Also try unregistering any extension vaults and re-register. Be sure and try with a new instance of PowerShell shell.

If you continue seeing this, examine the error record exception and innerexception that includes stack information.

$err = Get-Error
$err.Exception
$err.Exception.StackTrace
$err.Exception.InnerException
$err.Exception.InnerException.StackStrace

Otherwise, I would need a repro.

PaulHigin commented 3 years ago

Or just run Get-Error and it will dump all error information. Another thing you can try is to reset the SecretStore. If you used an older version there may be a conflict (although I haven't seen any). But beware as it erases all of your existing secrets.

Reset-SecretStore
AjayKMehta commented 3 years ago

Thanks, @PaulHigin. I initially had installed a preview version which I deleted.

Reset-SecretStore resolved the issue.

JSPATRICK1 commented 2 years ago

95