Setting a password throws strange Error: �ڴ���Դ���㣬�����������”
TylerLeonhardt opened this issue · comments
Description
hi 👋 I’m opening this on behalf of @buzzers they hit a bug in node-keytar while using VS Code.
Steps to Reproduce
I figured I would make it easy on them by having them use the @emacs-grammarly/keytar-cli
- npx @emacs-grammarly/keytar-cli set-pass testingvscode testingvscode testingvscode
Expected behavior:
Should set the password just fine.
Actual behavior:
Reproduces how often:
Always
Versions
VS Code Version: 1.71.0 (user setup)
Commit: microsoft/vscode@784b017
DateTime: 2022-09-01T07:36:10.600Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS Version: Windows_NT x64 10.0.19044
But then also repro’d in node standalone using the CLI.
Additional Information
original issue in vscode: microsoft/vscode#160500
Debugging found that the error was caused by the WriteCred
function returning code 8.
This is due to Windows Credential Manager being filled with too many credentials to continue writing, after deleting some saved credentials this error went away.
I think the problem that probably needs to be solved most here is the garbled error message.
Also I found that just encoding the error message to utf8 displayed it correctly.
@buzzers here is a doc we have for a similar issue. Glad you're unblocked.
https://code.visualstudio.com/docs/editor/settings-sync#_windows