vscode: Cannot persist / load GitHub Authentication SignIn Token to macOS Ventura Beta 2 Keychain

Issue Type: Bug

Using the latest macOS 13.0 Beta (22A5286j), I experience an issue / bug that reloading Window or restarting logs me out of all the extensions, e.g. Copilot, Settings Sync, Github Issues & Pull Request.

VS Code version: Code - Insiders 1.69.0-insider (668c538b8d2fec1258ed786ae212124d6d68023c, 2022-06-23T05:16:19.393Z) OS version: Darwin arm64 22.0.0 Restricted Mode: No

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 7, 39, 28
Memory (System) 64.00GB (40.71GB free)
Process Argv –crash-reporter-id 092694b8-f2ad-4473-8608-b513d685cc96
Screen Reader no
VM 0%
Extensions (16)
Extension Author (truncated) Version
iconify ant 0.3.3
vscode-eslint dba 2.2.2
gitlens-insiders eam 2022.6.2205
prettier-vscode esb 9.5.0
copilot-labs Git 0.1.176
copilot-nightly Git 1.30.6180
vscode-pull-request-github Git 0.44.0
better-shellscript-syntax jef 1.1.0
i18n-ally lok 2.8.1
vscode-docker ms- 1.22.0
remote-containers ms- 0.240.0
vscode-github-issue-notebooks ms- 0.0.119
material-icon-theme PKi 4.18.1
fortnite-vscode-theme sdr 1.3.0
svelte-vscode sve 105.17.0
windicss-intellisense voo 0.23.5

(4 theme extensions excluded)

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
vsc_aa:30263845
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
wslgetstarted:30449409
vscscmwlcmt:30465136
cppdebug:30492333
pylanb8912:30496796
vsclangdf:30492506
c4g48928:30513948

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 10
  • Comments: 49 (9 by maintainers)

Most upvoted comments

@alexanderniebuhr @und3fined, I found an even better workaround! Simply remove the encryption module:

rm -rf "/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-encrypt"

@alexanderniebuhr it’ll be in Insiders on Friday or Monday at the latest.

Thanks for all the info so far! It’s been very helpful. We will be investigating this issue next week since we’ve already started our VS Code release process.

@deepak1556 @TylerLeonhardt Just verified with newest release, and it seems to work.

Version: 1.70.0-insider
Commit: 052d5b0027f6c9d64c8ca35955cb5117ba94d5d7
Date: 2022-07-13T05:30:15.129Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin arm64 22.0.0

@alexanderniebuhr @und3fined, I found an even better workaround! Simply remove the encryption module:

rm -rf "/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-encrypt"

yesss it works for me as well

@rotu Wow. it’s magic =))

Note: Allow update/deteled app on Privacy & Security > App Management With backslash command:

rm -rf /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-encrypt

If that succeeds, then the problem is possibly in vscode.

@TylerLeonhardt I can both get and set values with keytar-cli and they do show up in the Keychain Access utility.

Having the same behaviour as @rotu. Using suggested package keytar-cli, gives the following outputs

alexanderniebuhr@Alexanders-MBP ~ % npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authentication     
[ { account: 'github.auth', password: 'ASD' } ]
alexanderniebuhr@Alexanders-MBP ~ % npx @emacs-grammarly/keytar-cli set-pass -s vscode-insidersvscode.github-authentication -a github.auth -p TEST
Successfully set the password for github.auth@vscode-insidersvscode.github-authentication!
alexanderniebuhr@Alexanders-MBP ~ % npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authentication
[ { account: 'github.auth', password: 'TEST' } ]

Even using the package atom/node-keytar in a demo project works.

import keytar from "keytar"

const a = await keytar.findCredentials("vscode-insidersvscode.github-authentication")
console.log(a)
await keytar.setPassword("vscode-insidersvscode.github-authentication", "github.auth", "TEST2")
const b = await keytar.findCredentials("vscode-insidersvscode.github-authentication")
console.log(b)
alexanderniebuhr@Alexanders-MBP playground % node keytar.js
[ { account: 'github.auth', password: 'TEST' } ]
[ { account: 'github.auth', password: 'TEST2' } ]

Therefore I really think there is some issue in VSCode, actually I don’t think the issue would be that it can’t save or read. I think there is a problem prompting or using the root password. Therefore it is not authenticated to do so.

Can we get some higher priority on this?

workaround worked for me. I was close to throwing the whole computer out the window 😃

In addition to the error message initially reported in the “GitHub Authentication” output, I’m seeing this in “Log (main)”:

[2022-06-24 23:03:25.187] [main] [warning] Error attempting to set a password: Password is required. [2022-06-24 23:03:25.388] [main] [warning] Error attempting to set a password: Password is required. [2022-06-24 23:03:25.592] [main] [warning] Error attempting to set a password: Password is required.

Any ETA on this coming to stable? @deepak1556

Shouldn’t this issue be closed when it’s confirmed fixed?

The merged fix seems to only apply to the arm64 build of VSCode, however this issue also happens on the universal insider builds, which either means that universal builds need a similar fix, or the issue is still there.

Fix will be coming for both in a new insider build tomorrow!

@alexanderniebuhr thanks for verifying, we are aware of the issue as well. Currently tracked in https://github.com/microsoft/vscode/pull/154762

The issue was closed as part of fix in the module and another side effect is for our release bot to track fixes shipped in a certain insider version so that certain github actions can work https://github.com/microsoft/vscode-github-triage-actions. Issue will be closed to signal for verification and if issue persists then it will be reopened for further investigation.

Great. I will verify the solution and let you know!