Skip to content

Extension is not enabled after restart #78

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
wwbmmm opened this issue Mar 7, 2019 · 18 comments
Closed

Extension is not enabled after restart #78

wwbmmm opened this issue Mar 7, 2019 · 18 comments
Labels
bug Something isn't working

Comments

@wwbmmm
Copy link

wwbmmm commented Mar 7, 2019

  • code-server version: v1.31.1-100
  • OS Version: Ubuntu 18.10

Steps to Reproduce

  1. Install one extension
  2. restart code-server, then you can see all extensions is disabled, and can't be enabled again.

image

@kylecarbs
Copy link
Member

Will investigate. Is this using the docker command?

@wwbmmm
Copy link
Author

wwbmmm commented Mar 8, 2019

Will investigate. Is this using the docker command?

Yes, I use docker command, and use -d option to specify data directory to a docker volumn. So when I rerun docker command, the old data will be used.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 8, 2019

@kylecarbs should we modify the one-liner to also mount a data directory?

@nhooyr nhooyr added bug Something isn't working needs-investigation labels Mar 8, 2019
@kylecarbs
Copy link
Member

That's probably a good idea.

nhooyr added a commit that referenced this issue Mar 9, 2019
@nhooyr nhooyr reopened this Mar 9, 2019
@nhooyr
Copy link
Contributor

nhooyr commented Mar 9, 2019

So in order to fix this, code-server needs to stop putting binaries into the data directory and reusing them as it'll screw with things on macOS for example. Best to use a temp dir or name the binaries with their OS and arch.

@fedelemantuano
Copy link

I have the same issue in

Distributor ID: Debian
Description:    Debian GNU/Linux 9.8 (stretch)
Release:        9.8
Codename:       stretch

With binary version:

server/0.0.0 linux-x64 node-v8.9.3
1.31.1-100

I use server without root permission.

@kylecarbs
Copy link
Member

@nhooyr the only binary we unpack is ripgrep. That shouldn't prevent any loads though.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 10, 2019

There is some pty.node binary in .code-server.

@fedelemantuano
Copy link

Yes. My data folder is in /var/lib/vscode and pty.node is in /var/lib/vscode/dependencies.

@kylecarbs
Copy link
Member

It's probably best if we keep data in one place, and move temporary unpacked items to another folder. I suppose we could just keep them in <tmpdir>/code-server/

@fedelemantuano
Copy link

Hi,
I run the server with this code:

/opt/vscode/code-server -d /var/lib/vscode --cert=fullchain.pem --cert-key=privkey.pem development

Can you explain me what I have to change?

@krazyito65
Copy link

krazyito65 commented Mar 11, 2019

Same issue to me, extensions are disabled on restart and if i change folders they become disabled. the only way for me to re-enable is to uninstall / install again

Running on CentOS7, manual build with yarn.

@lucasygu
Copy link

lucasygu commented Mar 13, 2019

Same here using docker build from Dockerfile.

I notice that when refreshing the browser, the file user-data-dir/CachedExtensions/user will be regenerated. However it cannot be generated correctly.

It is always like following:
{ "input": { "ourVersion": "1.32.0", "locale": "en", "devMode": false, "absoluteFolderPath": "/root/.local/share/.code-server/extensions", "isBuiltin": false, "isUnderDevelopment": false, "tanslations": {} }, "result": [] }

"result": [] is always empty, including no information of installed extensions. Normally it should contain all extensions information.

Again another file user-data-dir/globalStorage/stage.json is not properly generated in the same way.

For example, if the extension "Markdown All in One" is manually disabled, this file supposes to include the information whether a extension is disabled or not, like
"extensionsIdentifiers/disabled":"[{\"id\":\"yzhang.markdown-all-in-one\",\"uuid\":null}]"
However it is not in the file.

@fedelemantuano
Copy link

With this release 1.32.0-245 my issue is solved. Now the extensions are enabled also after restart.

@foresthoffman
Copy link
Contributor

@wwbmmm did release 1.32.0-245 fix the issue for you as well?

@krazyito65
Copy link

krazyito65 commented Mar 15, 2019

I can say based on my testing with #209 I have seen the issue still come up on CentOS 7 on the new release, it happened when i would use 'open folder' and then i would try to disable the extensions all together and then Enable (workspace), when I swap folders around my python extension was unable to work for me (I could not re-enable it).

@parimanur
Copy link

parimanur commented Apr 12, 2019

Seeing this issue with the latest release (code-server1.696-vsc1.33.0-linux-x64 ). Any workaround for the issue?
Extension:

Name: Python
Id: ms-python.python
Version: 2019.3.6558
Publisher: ms-python
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.5 LTS
Release:	16.04
Codename:	xenial

Seeing this without the docker and using just the binary.

@kylecarbs
Copy link
Member

Should be fixed with latest versions.

code-asher pushed a commit that referenced this issue Jun 19, 2019
* build: fix yarn corruption issues

Closes #100

Thanks @zerdos

* Dockerfile: add default Entrypoint and mount data dir

Closes #170
Closes #78

Thanks @ay-b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants