code-server icon indicating copy to clipboard operation
code-server copied to clipboard

User profiles are deleted when visited from another browser

Open ahfakt opened this issue 9 months ago • 7 comments
trafficstars

Is there an existing issue for this?

  • [x] I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows
  • Remote OS: RedHat
  • Remote Architecture: amd64
  • code-server --version: 4.96.2

Steps to Reproduce

  1. Create a profile on browser A and switch to it
  2. Open a different browser B
  3. See remote .local/share/code-server/User/profiles folder is empty.

Expected

Do not delete profile data on the remote and sync/init from it when visited from another browser.

Actual

Profiles are getting deleted on each different browser.

Logs


Screenshot/Video

No response

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • [x] I am using a secure context.

Notes

code-server is running in a container with unix socket configuration and accessed over nginx that runs on another container.

ahfakt avatar Jan 30 '25 19:01 ahfakt

Is the profile stored on the remote server or in the browser's local storage?

bilogic avatar Feb 02 '25 04:02 bilogic

Cross reference:

  • https://github.com/coder/code-server/issues/4212

benz0li avatar Feb 02 '25 07:02 benz0li

Is the profile stored on the remote server or in the browser's local storage?

Profile's configuration files (settings.json, extensions.js ...) is on the remote, '~/.local/share/code-server/User/profiles/profileid/'.

ahfakt avatar Feb 02 '25 07:02 ahfakt

Profiles are stored in the browser's local storage. Cross reference:

  • https://github.com/coder/code-server/issues/6922

benz0li avatar Feb 02 '25 07:02 benz0li

It's acceptable to set same configuration on each browser if it would be possible to make them don't overwrite other's configurations.

ahfakt avatar Feb 02 '25 07:02 ahfakt

I am experiencing this issue as well. Can’t use profiles with multiple browsers at the moment.

michaelr524 avatar Feb 06 '25 19:02 michaelr524

It sounds like there might be two issues?

  1. Profiles are stored in the browser instead of the server, so they are not shared between browsers, in other words a duplicate of https://github.com/coder/code-server/issues/4212.
  2. Profiles in one single browser are overwriting each other in some way? Does this happen in Codespaces? It sounds potentially like an upstream bug, but maybe it is caused by how we have a hybrid of settings on the server and state on the browser.

code-asher avatar Feb 18 '25 21:02 code-asher

Closing for now as an upstream issue, but if you test Codespaces and this is wrong let me know and we can reopen.

code-asher avatar May 22 '25 20:05 code-asher