linuxserver/docker-code-server

Cannot save API keys or passwords

dlemmort opened this issue · 9 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When entering API keys in extensions they won't be saved in VSCode, for example Code GPT fails completely and Genie AI forgets the API key every time I login, now I have been searching the logs and found a couple of things.

When starting code server I see the following in the logs:
[16:20:51] 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

I though installing libsecret might help this problem but now I see the following in the logs:
[21:39:29] 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: Cannot autolaunch D-Bus without X11 $DISPLAY

Following the vs code docs in the link I found that changing some settings in argv.json might help, but this file is unfortunately nowhere to be found (The following command should open that file, but that command doesn't work either: "Preferences: Configure Runtime Arguments")

Expected Behavior

Vscode should be able to use the in-memory credential store.

Steps To Reproduce

I run docker on debian with the following docker-compose:
vscode: image: lscr.io/linuxserver/code-server:latest container_name: vscode environment: - PUID=1000 - PGID=1000 - TZ=Europe/Amsterdam - SUDO_PASSWORD=************** - PROXY_DOMAIN=************* #optional - DEFAULT_WORKSPACE=/config/workspaces/obsidian #optional volumes: - /home/*******/appdata/vscode/config:/config - /home/*******/obsidian/vaults:/config/workspaces/obsidian ports: - 8445:8443 restart: unless-stopped labels: - swag=enable - swag_auth=authelia

Environment

- OS: Debian GNU/Linux 11 (bullseye)

CPU architecture

x86-64

Docker creation

I run docker on debian with the following docker-compose:
`
  vscode:
    image: lscr.io/linuxserver/code-server:latest
    container_name: vscode
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
      - SUDO_PASSWORD=**************
      - PROXY_DOMAIN=************* #optional
      - DEFAULT_WORKSPACE=/config/workspaces/obsidian #optional
    volumes:
      - /home/*******/appdata/vscode/config:/config
      - /home/*******/obsidian/vaults:/config/workspaces/obsidian
    ports:
      - 8445:8443
    restart: unless-stopped
    labels:
      - swag=enable
      - swag_auth=authelia`

Container logs

───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

setting up sudo access
setting sudo password using SUDO_PASSWORD env var
New password: Retype new password: passwd: password updated successfully
[custom-init] No custom files found, skipping...
starting with no password
[2023-08-16T19:39:23.332Z] info  code-server 4.16.1 94ef3776ad7bebfb5780dfc9632e04d20d5c9a6c
[2023-08-16T19:39:23.333Z] info  Using user-data-dir ~/data
[2023-08-16T19:39:23.341Z] info  Using config file ~/.config/code-server/config.yaml
[2023-08-16T19:39:23.341Z] info  HTTP server listening on http://0.0.0.0:8443/
[2023-08-16T19:39:23.341Z] info    - Authentication is disabled
[2023-08-16T19:39:23.341Z] info    - Not serving HTTPS
[2023-08-16T19:39:23.341Z] info    - Proxying the following domain:
[2023-08-16T19:39:23.341Z] info      - {{port}}.vscode.*****************
[2023-08-16T19:39:23.341Z] info  Using proxy URI in PORTS tab: //{{port}}.vscode.trommel.org
[2023-08-16T19:39:23.342Z] info  Session server listening on /config/data/code-server-ipc.sock
[ls.io-init] done.
[21:39:23]




[21:39:23] Extension host agent started.
[21:39:25] [172.18.0.6][304f84de][ManagementConnection] Unknown reconnection token (never seen).
[21:39:26] [172.18.0.6][1409fac0][ExtensionHostConnection] Unknown reconnection token (never seen).
File not found: /app/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /app/code-server/lib/vscode/out/vsda.js
[21:39:28] [172.18.0.6][294a3337][ManagementConnection] New connection established.
[21:39:29] 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: Cannot autolaunch D-Bus without X11 $DISPLAY
[21:39:29] [172.18.0.6][fb579332][ExtensionHostConnection] New connection established.
[21:39:29] [172.18.0.6][fb579332][ExtensionHostConnection] <227> Launched Extension Host Process.
[21:49:01] [172.18.0.6][294a3337][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[21:49:01] [172.18.0.6][fb579332][ExtensionHostConnection] <227> Extension Host Process exited with code: 0, signal: null.
File not found: /app/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /app/code-server/lib/vscode/out/vsda.js
[20:46:09] [172.18.0.6][1a79e510][ManagementConnection] New connection established.
[20:46:10] [172.18.0.6][1bdd83f9][ExtensionHostConnection] New connection established.
[20:46:10] [172.18.0.6][1bdd83f9][ExtensionHostConnection] <1967> Launched Extension Host Process.
[20:47:00] Getting Manifest... danielsanmedium.dscodegpt
[20:47:00] Installing extension: danielsanmedium.dscodegpt
[20:47:01] Extension signature verification is not done: danielsanmedium.dscodegpt
[20:47:02] Extracted extension to /config/extensions/.16b8ce64-dbf2-4cc3-b74a-97a41f461a45: danielsanmedium.dscodegpt
[20:47:02] Renamed to /config/extensions/danielsanmedium.dscodegpt-2.1.10-universal
[20:47:02] Extracting extension completed. danielsanmedium.dscodegpt
[20:47:02] Extension installed successfully: danielsanmedium.dscodegpt
[20:47:47] [172.18.0.6][1a79e510][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[20:47:47] [172.18.0.6][1bdd83f9][ExtensionHostConnection] <1967> Extension Host Process exited with code: 0, signal: null.
File not found: /app/code-server/lib/vscode/out/vsda.js
File not found: /app/code-server/lib/vscode/out/vsda_bg.wasm
[20:47:48] [172.18.0.6][113f551e][ManagementConnection] New connection established.
[20:47:48] [172.18.0.6][9f692d07][ExtensionHostConnection] New connection established.
[20:47:48] [172.18.0.6][9f692d07][ExtensionHostConnection] <2310> Launched Extension Host Process.
[20:49:49] [172.18.0.6][113f551e][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[20:49:49] [172.18.0.6][9f692d07][ExtensionHostConnection] <2310> Extension Host Process exited with code: 0, signal: null.
File not found: /app/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /app/code-server/lib/vscode/out/vsda.js
[09:09:59] [172.18.0.6][73efa943][ManagementConnection] New connection established.
[09:09:59] [172.18.0.6][97ec8b20][ExtensionHostConnection] New connection established.
[09:09:59] [172.18.0.6][97ec8b20][ExtensionHostConnection] <2706> Launched Extension Host Process.

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

This is non-trivial to solve. I have been playing with this in a private repo for a while, and I thought I found a solution, but it recently started to fail.

That's unfortunate! But I totally understand there are more important and easier to solve issues to address. Thanks for your comment, and thank you for the effort you put in this repo!