Skip to content
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

Can't enable one snippets extension #112532

Closed
danielo515 opened this issue Dec 15, 2020 · 23 comments
Closed

Can't enable one snippets extension #112532

danielo515 opened this issue Dec 15, 2020 · 23 comments
Assignees

Comments

@danielo515
Copy link

Issue Type: Bug

Hello,
I have one extension that I can not enable, and I don't see a reason why.
This is the extension ID: danielo515.danielo-node-snippets
I would love to see any error message or any hint telling me why.

Regards

VS Code version: Code 1.52.0 (940b5f4, 2020-12-10T22:46:53.673Z)
OS version: Darwin x64 20.1.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2900)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 3
Memory (System) 32.00GB (0.31GB free)
Process Argv --crash-reporter-id 3bf10e6d-54c9-4df4-8aaa-781f2b9fc1b9
Screen Reader no
VM 0%
Extensions (107)
Extension Author (truncated) Version
yaml2json ahe 0.0.3
project-manager ale 12.0.1
auto-add-brackets ali 0.11.0
Handlebars and 0.4.1
jest-snippets and 1.8.0
All-Autocomplete Ati 0.0.23
tailwind-docs aus 1.4.0
vscode-django bat 1.0.1
file-browser bod 0.2.10
vscode-tailwindcss bra 0.5.6
better-toml bun 0.3.2
npm-intellisense chr 1.3.1
path-intellisense chr 2.3.0
keymapceditor-vsc Cia 0.7.6
vscode-devtools-for-chrome cod 0.0.7
bracket-pair-colorizer Coe 1.0.61
vscode-svgviewer css 2.0.0
python-snippets cst 0.0.8
danielo-node-snippets dan 1.8.9
danielo-vsc-tools dan 1.0.2
vscode-eslint dba 2.1.14
javascript-ejs-support Dig 1.3.1
pyinit Dio 0.0.3
githistory don 0.6.14
python-extension-pack don 1.6.0
jest-test-language-support dpl 1.30.2
es7-react-js-snippets dsz 3.0.0
gitlens eam 11.0.6
EditorConfig Edi 0.16.4
vscode-powertools ego 0.63.0
prettier-vscode esb 5.8.0
esy-vscode esy 0.0.2
vimL fal 0.0.3
flow-for-vscode flo 1.5.0
auto-close-tag for 0.5.9
auto-complete-tag for 0.1.0
auto-rename-tag for 0.1.5
reasonml fre 1.0.38
monkey-c ghi 0.4.0
lintlens ghm 3.0.0
vscode-pull-request-github Git 0.22.0
go gol 0.19.1
vscode-graphql Gra 0.3.13
vscode-nginx-conf-hint han 0.1.0
githd hui 2.2.4
fuzzy-search jac 0.0.3
yuml Jai 3.5.1
search-editor-apply-changes jak 0.1.1
svg joc 1.4.2
vscode-peacock joh 3.9.1
styled-components-snippets jon 0.10.0
open-in-vim jon 0.6.0
vscode-styled-components jpo 1.4.1
magit kah 0.6.0
vscode-home-assistant kee 1.13.0
MagicPython mag 1.1.0
vscode-wrap-console-log mid 1.7.2
dotenv mik 1.0.1
vscode-docker ms- 1.8.1
python ms- 2020.12.422005962
vscode-pylance ms- 2020.12.2
jupyter ms- 2020.12.414227025
remote-containers ms- 0.154.0
remote-ssh ms- 0.62.0
remote-ssh-edit ms- 0.62.0
remote-ssh-explorer ms- 0.56.0
vscode-remote-extensionpack ms- 0.20.0
vscode-typescript-next ms- 4.2.20201211
debugger-for-chrome msj 4.12.11
vscode-purty mva 0.6.0
color-highlight nau 2.3.0
incrementor nms 1.0.3
indent-rainbow ode 7.4.0
docthis oou 0.8.2
vscode-react-refactor pla 1.0.5
python-string-sql ptw 1.1.0
vscode-yaml red 0.13.0
partial-diff ryu 1.4.1
jinjahtml sam 0.15.0
vscode-javascript-booster sbu 14.0.1
bash-beautify sha 0.1.1
code-settings-sync Sha 3.4.3
vscode-fileutils sle 3.4.2
code-spell-checker str 1.10.2
vscode-stylelint sty 0.85.0
control-snippets svi 1.9.1
json-schema-validator tbe 0.1.0
open-spec-file the 0.0.6
highlight-matching-tag vin 0.10.0
template-strings vit 0.0.6
vscode-icons vsc 11.0.0
vim vsc 1.18.5
vscode-ansible vsc 0.5.2
vspacecode VSp 0.8.5
whichkey VSp 0.8.4
vscode-wakatime Wak 4.0.9
literally-html web 0.1.3
jinja who 0.0.8
vscode-file-extra wil 3.1.0
glean wix 5.1.0
change-case wma 1.0.0
disable-eslint-rule Woo 0.0.2
jinja2-snippet-kit Wya 2.0.0
template yon 1.1.5
markdown-all-in-one yzh 3.4.0
vscode-open-in-github ziy 1.3.6
es6-string-javascript zjc 1.0.1
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
openlogontheside:30221877
python763:30178808
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
python504:30227505
vswsl492cf:30211402
wsl2promptcf:30224613
vstry244:30236573
unusedprompt:30224610
folderexplorercf:30224615
openfilemenucf:30224648
pythonvsded773:30236629
vsjup459cf:30229594

@jrieken
Copy link
Member

jrieken commented Dec 15, 2020

I have one extension that I can not enable, and I don't see a reason why.

What does that mean?

@jrieken jrieken added the info-needed Issue requires more information from poster label Dec 15, 2020
@danielo515
Copy link
Author

Hope this screenshot clarifies it.
As you can see, extension is disabled, but the only option I get is to uninstall, there is no option to enable it
image

@jrieken jrieken assigned sandy081 and unassigned jrieken Dec 15, 2020
@jrieken
Copy link
Member

jrieken commented Dec 15, 2020

letting @sandy081 comment

@sandy081
Copy link
Member

Can you please try on a different user data directory, eg:

  • Start code from command line - code --user-data-dir <new directory>
  • Install your extension
  • Disable it
  • Reload window and see if you can enable the extension

@danielo515
Copy link
Author

@sandy081 followed that steps (ran code --user-data-dir ~/vscode-data-test ) and this is what happened:

  • All my extensions got installed automatically
  • Got a gazillion notifications
  • Got a gazillion welcome to XXX screens
  • Extensions started to install their dependencies and my CPU skyrocket
  • My extension was already installed in the same state as I described before. I uninstalled, installed again and restarted VSCode. Same result

Will it help if I link to the repo of the extension? I have another extension with the same exact config and that works (not sure why).
Is there any other mode more isolated?

@sandy081
Copy link
Member

sandy081 commented Jan 4, 2021

Hmm, let's try it on clean slate by also pointing to a different extensions dir code --user-data-dir <new directory> --extensions-dir <new directory>

@danielo515
Copy link
Author

This is what I tried:

code --user-data-dir /tmp/user-data --extensions-dir /tmp/extensions

I was able to install the extension, but none of the available snippets on any of the contributed file types were suggested.

@sandy081
Copy link
Member

So is this extension enabled after installing?

@danielo515
Copy link
Author

danielo515 commented Jan 15, 2021

Nope, it does not appear as enabled, and I don't get any of the snippets as suggestion, this is how it looks like (it does not says disabled, but doesn't look like an enabled extension either)
image

In fact, you can not enable nor disable it:
image

@sandy081
Copy link
Member

sandy081 commented Jan 27, 2021

Seems this extension is disabled in environment. Can you please check if you have following environment args set up anywhere (in your user env or while launching VS Code)

  • --disable-extensions or
  • --disable-extensions <extensionid>

@danielo515
Copy link
Author

but wouldn't that disable all extensions and not just one?

@sandy081
Copy link
Member

If you provide extension id with --disable-extensions <extension-id> then only given extension is disabled.

@danielo515
Copy link
Author

Ok.
I never setup such option in any of my bashrc,.profile or zsh ini files. What do you mean by environment args set up? Is there any way I can check that from within VSCode?

@sandy081
Copy link
Member

Can you please enable log level to trace using command Set Log Level and provide us with window log available in F1 > Open View > Log (Window) ? You can check in that log for --disable-extensions configuration.

@danielo515
Copy link
Author

Hello @sandy081
Anything else that I should do?
I set it to Trace, reloaded the window,search for the extension, opened the mentioned window and here is the result. I searched for the disable term with no results.
File is attached
log-vscode_2021-01-29.log

@sandy081
Copy link
Member

Thanks for providing the info. Sorry for not trying this before and I can see the same behaviour. It seems there is an error while activating this extension

image

Hence this extension is not loaded and shown disabled.

@alexdima There is no error message shown to the user in this case and none of our UI mention about this.

@danielo515 You have to remove the activation event and publish it again

image

@joaomoreno Shall this be validated while publishing ?

@sandy081 sandy081 removed the info-needed Issue requires more information from poster label Jan 29, 2021
@alexdima
Copy link
Member

There is no error message shown to the user in this case and none of our UI mention about this

This was an intentional decision from @egamma and @chrisdias . A broken extension does not show an error message. The error message is shown to the user only when the user is doing extension development.

@sandy081
Copy link
Member

Thanks @alexdima for info.

@joaomoreno
Copy link
Member

@sandy081 Done: microsoft/vscode-vsce#531

@danielo515
Copy link
Author

This used to work before.
Thanks for getting to the root cause of the problem.
I understand that you don't want to show popup messages and that stuff, but maybe a small red text on the extension description will save much frustration from users not understanding what is happening. Just my two cents.

Thank you very much.

@danielo515
Copy link
Author

Removed and published, same problem.
Is this the correct way to define the package.json? Or should I remove the property completely? https://github.com/danielo515/vscode-node-snippets/blob/master/package.json

@alexdima
Copy link
Member

@danielo515 You are developing an extension, yet you are loading and testing it as if you were a consumer of the extension from the marketplace. VS Code cannot realize that you are actively developing the extension unless you use the --extensionDevelopmentPath argument and point to the extension you are developing. This would all be taken care of for you if you would develop your extension by pressing F5.

@danielo515
Copy link
Author

Ok, I have to remove it completely. Now it works.
Thanks.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants