code-server: Open Workspace while another Workspace is open doesn't work.

OS/Web Information

  • Web Browser: Firefox 87.0
  • Local OS: M1 Macbook Air, MacOS 11.2.3
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: x64
  • code-server --version: 3.9.2 109d2ce3247869eaeab67aa7e5423503ec9eb859

Steps to Reproduce

  1. Open and work on the workspace
  2. Click menu bar left top corner -> File -> Open Workspace
  3. Try to open

Expected

New workspace should open

Actual

Nothing happens and it also cd..s on the input area or says Please select a file.

Screenshot

https://user-images.githubusercontent.com/29011440/113875043-54c45e80-97f1-11eb-8706-fa14855950ef.mov

Notes

This issue can be reproduced in VS Code: No
At the video I attached has language that is not in English, but that is NOT why this happens.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 55 (20 by maintainers)

Commits related to this issue

Most upvoted comments

I have confirmed that this problem does not appear to exist in v4.16.1.

docker run -it --rm --name code-server -p 127.0.0.1:8080:8080 -v "$HOME/.config:/home/coder/.config" -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" codercom/code-server:4.16.1

It is worth noting that v4.17.0 included a significant update that might be at the root of this issue.

  • Update to Code 1.82.2. This includes an update to Node 18, which also means that the minimum glibc is now 2.28.

The diff between these two releases:

I gave a summary + response on https://github.com/coder/code-server/issues/6546, let’s continue there shall we?

@code-asher what do you think? Should I start another issue for it? Thanks.

(still presents

Although I have not had the opportunity to test this fix yet, I am guessing that the fix (reverting the local storage patch) actually removed another feature that we rely on in our environment, the ability to set some default User settings which will be pre-set in VScode, without the user needing to set them in each and every browser they open (home, work, etc). This was a core reason we picked code-server over gitpod’s implementation.

I’ll add this to the new issue that @bilogic is starting.

Finally put up a release candidate.

Thank you.

I would love to hear confirmation on whether the issue is resolved from anyone that was having the issue.

@code-asher I can confirm that

  1. this issue seems to be resolved.
  2. smoke tests^1 were successful.

code-server-4.19.1-rc.1-linux-amd64.tar.gz with Code 1.84.2 is deployed at https://coder.jupyter.b-data.ch; Image R (base:test-devtools-docker).

Issue appears to be fixed for me after testing with multiple browsers and across workspace reloads. Thank you for the prompt resolution of this issue! Greatly appreciated!

Finally put up a release candidate. I would love to hear confirmation on whether the issue is resolved from anyone that was having the issue.

@benz0li thank you for providing a release to test!

My pleasure.

I tried to put out a release candidate yesterday but for some reason the e2e test keeps failing…

No worries.

still looking into it.

Thanks for all your efforts. Much appreciated – as always.

Wow thanks! Yea, I was reading up, made my way through several errors. But it is faster to try your .deb. Thanks! 😃

  1. I would describe the problem as UI becomes unresponsive, opening another workspace is one of the ways of reproducing the problem.
  2. In my case, it sometimes happens when I launch my browser, and quickly clicking on the sidebar to switch to another side panel view
  3. It seems some action kills the connection between the PWA and the server
  4. Which are the last versions that worked properly for you guys? Mine was 4.13.0
  5. The next version I jumped to was 4.17.1
  6. It is not clear to me if it is a code-server or VSCode problem
  7. The issue is not a show stopper, but quite irritating when it happens

I am also experiencing this same issue on multiple different browsers (Safari and Chrome). It seemed like it started happening with the release of code-server 4.17.0.

It looks like I am not going to be able to get to this in the next two weeks, and I am going to be away from my keyboard for a few weeks after that, but I will try to check in periodically in case someone takes this up and submits a PR. If not I will see about scheduling some time for it after I get back.

Understood. Thank you @code-asher


Some additional details

While searching for a workaround, I was also able to reproduce this issue just by starting up code-server via systemd with a multi-folder workspace file, launching a private/incognito browsing window to https://code.example.com/, and logging in. The browser would redirect to https://code.example.com/?workspace=/home/me/.vscode/default.code-workspace and often show the same symptoms. Sometimes, it works initially, but a refresh in the browser window always causes it to break. There doesn’t appear to be a need for a second browser window to trigger this.

  • systemd unit file
[Unit]
Description=code-server
After=network.target

[Service]
# This environment variable is set to "trick" the Golang extension
# see: https://github.com/golang/vscode-go/issues/1246
Environment="CLOUD_SHELL=true"
Type=exec
WorkingDirectory=~
ExecStart=/usr/bin/code-server ./.vscode/default.code-workspace
Restart=always
User=%i

[Install]
WantedBy=default.target
  • VSCode workspace file
{
  "folders": [
    {
       "name": "project1",
       "path": "/home/me/project1"
    },
    {
      "name": "project2",
      "path": "/home/me/project2"
    },
  ],
  "settings": {
    "explorer.expandSingleFolderWorkspaces": false,
    "explorer.fileNesting.enabled": false
  }
}

In this example, code-server is started with a command like sudo systemctl start code-server@me.

It looks like I am not going to be able to get to this in the next two weeks, and I am going to be away from my keyboard for a few weeks after that, but I will try to check in periodically in case someone takes this up and submits a PR. If not I will see about scheduling some time for it after I get back.

I’ve love to see this fixed - we’d also be happy to sponsor the fix, if that helps.

(still presents

Interesting! Well at least this is a starting point 😃 Thanks for the update @SJang1 !

Finally got an error on the client-side on 3.9.3 fe2dc2deb08e378069891b622bb62ad1d261d1b1 when trying to press OK button on the Open Workspace.
No unusual logs on the server-side even for now.

  ERR B is undefined: onDidAccept@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:26098
q@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:23196
q/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:23154
fire@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:1836
set busy@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:19194
updateItems/H</<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:33533
promise callback*updateItems/H<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:32976
y@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:16608
updateItems@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:32904
tryUpdateItems@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:27831
async*handleValueChange@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:24504
insertText@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:30377
onDidAccept@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:26618
q@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:23196
pickResource/</<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:23319
fire@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:1836
show/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:568:27922
fire@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:1836
getUI/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:568:37685
fire@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:1836
g/</<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:46669
EventListener.handleEvent*a@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:68:6348
s@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:68:6571
g/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:46563
g@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:46534
getUI@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:568:37585
createQuickPick@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:568:42870
createQuickPick@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:658:77837
pickResource/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:21499
pickResource@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:21434
async*showOpenDialog@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1841:19430
async*pickResource@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1842:2754
pickWorkspaceAndOpenSimplified@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1842:1944
pickWorkspaceAndOpen@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1842:5010
Async*run@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:2743:81214
triggerAndDisposeAction@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1693:61398
async*createCommandHandler/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1693:61105
invokeFunction@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:622:29963
_tryExecuteCommand@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1645:3492
executeCommand/<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1645:3241
promise callback*executeCommand@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1645:3228
H/J<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:1768:4000
run@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:30024
runAction@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:30556
run@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:30423
onClick@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:33588
o/this.runOnceToEnableMouseUp</<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:106904
EventListener.handleEvent*a@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:68:6348
s@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:68:6571
o/this.runOnceToEnableMouseUp<@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:171:106748
doRun@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:23298
onTimeout@https://code-server-desktop.sjang.dev/static/fe2dc2deb08e378069891b622bb62ad1d261d1b1/usr/lib/code-server/lib/vscode/out/vs/workbench/workbench.web.api.js:57:23264

Update: There was no any unusual log on my side either. (On both server/client with --log debug like that video in the comment.)