Skip to content

[Bug]: error logs about password retrieval from keytar and failure to access OS credential store #6408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
AntoineMorcos opened this issue Aug 30, 2023 · 3 comments · Fixed by #6450
Closed
4 tasks done
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@AntoineMorcos
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows
  • Remote OS: Ubuntu
  • Remote Architecture: x86_64
  • code-server --version: 4.16.1

Steps to Reproduce

  1. start code server on ubuntu docker container (as a subprocess of a python script)
  2. inspect logs

Expected

Not expecting use of keytar since vscode docs vscode state it's deprecated in version 1.80 and higher (code-server v4.16.1 corresponds to Code v1.80.2)

Actual

Logs show attempt to get password from keytar, then it fails and points out that os credential store could not be accessed

Logs

[17:05:44] ExtensionManagementService#cleanUp
[17:05:44] Extension host agent started.
[17:05:44] Extension VSIX downloads cache dir does not exist
[2023-08-30T17:05:44.795Z] debug redirecting from / to ./?workspace=<path
[17:05:44] No uninstalled extensions found.
[17:05:44] ExtensionManagementService#removeGeneratedFolders
[17:05:44] [File Watcher (node.js)] ... (excludes: <none>, includes: <all>)
[17:05:44] Started initializing default profile extensions in extensions installation folder. <file>
[17:05:44] Started scanning user extensions o {
  scheme: 'file',
  authority: '',
  path: ...,
  query: '',
  fragment: '',
  _formatted: ...,
  _fsPath: ...
}
[17:05:47] Going to get password from keytar: <account>
[17:05:47] Started scanning system extensions
[17:05:47] Started scanning user extensions o {
  scheme: 'file',
  authority: '',
  path: '.../extensions.json',
  query: '',
  fragment: '',
  _formatted: '.../extensions.json',
  _fsPath: '.../extensions.json'
}
[17:05:47] Scanning extensions using UI language: en
[17:05:47] Started scanning system extensions
[17:05:47] Started scanning user extensions o {
  scheme: 'file',
  authority: '',
  path: '.../extensions.json',
  query: '',
  fragment: '',
  _formatted: '.../extensions.json',
  _fsPath: '.../extensions.json'
}
[17:05:47] Doing get password from keytar: <account>       <--------
[17:05:47] Did not get a password from keytar for account: <account>       <--------
[17:05:47] [File Watcher (node.js)] Request to start watching: <path>/code-server/User/keybindings.json (excludes: <...>, includes: <all>)
[17:05:47] Using the in-memory credential store as the operating system's credential store could not be accessed. Please see https://aka.ms/vscode-server-keyring on how to set this up. Details: libsecret-1.so.0: cannot open shared object file: No such file or directory <-------

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

Two things I'm not sure about:

  • Is failure to access the operating system credential store is the result of the earlier failure attempting to retrieve keytar passwords. ?
  • Is this happening in extension host initialization ?

Is this expected behavior ? If that's the case, would you please suggest the recommended fix/setup on my side ?

@AntoineMorcos AntoineMorcos added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Aug 30, 2023
@AntoineMorcos
Copy link
Author

AntoineMorcos commented Aug 31, 2023

This is the difference I see in the logs compared to version 4.7.0, after Extension host agent started.

[09:16:31] Started initializing default profile extensions in extensions installation folder. <file>
[09:16:31] Completed initializing default profile extensions in extensions installation folder. <file>
File not found: <path>/code-server-v4.16.1-linux-x86_64/lib/vscode/out/vsda_bg.wasm
File not found: <path>/code-server-v4.16.1-linux-x86_64/lib/vscode/out/vsda.js
[09:16:33] [172.31.17.224][08f5a111][ManagementConnection] New connection established.
[09:16:34] Using the in-memory credential store as the operating system's credential store could not be accessed. Please see https://aka.ms/vscode-server-keyring on how to set this up. Details: libsecret-1.so.0: cannot open shared object file: No such file or directory
[09:16:34] [172.31.17.224][7daec656][ExtensionHostConnection] New connection established.

@benz0li
Copy link
Contributor

benz0li commented Sep 4, 2023

For containers: Use environment variables to provide credentials. See #5072 (comment) ff for more information.

@AntoineMorcos
Copy link
Author

@benz0li Thanks for pointing me to that thread. However this fix seems specific to git extensions ? I am getting the error in v4.16.0 on startup without installing any extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants