microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.74k stars 29.1k forks source link

Local workplace extensions do not install #216762

Closed nc6 closed 3 months ago

nc6 commented 4 months ago

Type: Bug

When including local workspace extensions, they fail to install correctly.

Steps to reproduce:

  1. Create a blank directory. Unpack an extension into .vscode/extensions

Example layout given below:

ls .vscode/extensions/DavidAnson.vscode-markdownlint/**/*
.vscode/extensions/DavidAnson.vscode-markdownlint/bundle.js
.vscode/extensions/DavidAnson.vscode-markdownlint/bundle.web.js
.vscode/extensions/DavidAnson.vscode-markdownlint/CHANGELOG.md
.vscode/extensions/DavidAnson.vscode-markdownlint/convert-ignores.cjs
.vscode/extensions/DavidAnson.vscode-markdownlint/images/markdownlint-128.png
.vscode/extensions/DavidAnson.vscode-markdownlint/LICENSE.txt
.vscode/extensions/DavidAnson.vscode-markdownlint/markdownlint-cli2-config-schema.json
.vscode/extensions/DavidAnson.vscode-markdownlint/markdownlint-config-schema.json
.vscode/extensions/DavidAnson.vscode-markdownlint/package.json
.vscode/extensions/DavidAnson.vscode-markdownlint/README.md
.vscode/extensions/DavidAnson.vscode-markdownlint/snippets.json
.vscode/extensions/DavidAnson.vscode-markdownlint/stringify-error.mjs
.vscode/extensions/DavidAnson.vscode-markdownlint/test-ui/index.cjs
.vscode/extensions/DavidAnson.vscode-markdownlint/test-ui/run-tests.mjs
.vscode/extensions/DavidAnson.vscode-markdownlint/test-ui/tests.cjs

.vscode/extensions/DavidAnson.vscode-markdownlint/images:
markdownlint-128.png

.vscode/extensions/DavidAnson.vscode-markdownlint/test-ui:
index.cjs  run-tests.mjs  tests.cjs
  1. Open VSCode and trust the directory.

  2. VSCode will ask whether to install the recommended workspace extensions. Try to install them using 'Install Workspace Extension'

Expected result: the workspace installs correctly Actual result: installation fails with some variant of Cannot activate, becase ./bundle not found

Variations: I have tried this with multiple different extensions, including the example shipped inside the vscode source tree. The file missing varies each time, but all of them fail in the same way.

If the extension is already installed globally, the installation will succeed.

The same issue occurs if starting vscode in a new profile with no extensions installed

VS Code version: Code 1.90.0 (89de5a8d4d6205e5b11647eb6a74844ca23d2573, 2024-06-04T19:43:07.605Z) OS version: Linux x64 6.6.31 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 3929)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|1, 1, 1| |Memory (System)|31.08GB (20.99GB free)| |Process Argv|. --crash-reporter-id 606f4812-1ac1-451e-9f90-c9e43bb1a305| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|undefined| |XDG_CURRENT_DESKTOP|sway| |XDG_SESSION_DESKTOP|undefined| |XDG_SESSION_TYPE|wayland|
Extensions (26) Extension|Author (truncated)|Version ---|---|--- EditorConfig|Edi|0.16.4 whichkey|VSp|0.11.4 Nix|bbe|1.0.1 file-browser|bod|0.2.11 vscode-jq-playground|dav|4.3.5 vscode-pull-request-github|Git|0.91.2024062004 haskell|has|2.5.3 fuzzy-search|jac|0.0.3 latex-workshop|Jam|9.20.1 nix-ide|jno|0.3.1 jq-syntax-highlighting|jq-|0.0.2 language-haskell|jus|3.6.0 magit|kah|0.6.61 marp-vscode|mar|2.8.0 direnv|mkh|0.17.0 remote-ssh|ms-|0.113.2024061415 remote-ssh-edit|ms-|0.86.0 ormolu-vscode|sju|0.0.10 rewrap|stk|17.8.0 vscode-nushell-lang|The|1.9.0 vim|vsc|1.27.3 vspacecode|VSp|0.10.18 latex-input|yel|2.3.0 material-theme|zhu|3.17.2 vscode-nickel|twe|0.3.0 vscode-markdownlint|Dav|0.55.0
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupyter:31046869 newcmakeconfigv2:31071590 ```
vscodenpa commented 4 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.90.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

nc6 commented 4 months ago

Note an alternate way to reproduce this:

  1. Clone this repository
  2. Open in vscode in a fresh profile: code --profile vscode-lwe-test .
    1. Attempt to install the recommended extension from the workspace
sandy081 commented 4 months ago

Clone this repository

Which repository?

nc6 commented 4 months ago

The imcrosoft/vscode repository

sandy081 commented 4 months ago

We self-host on this and it is working for me and the complete team. Is there something I am missing here to reproduce?

nc6 commented 4 months ago

What OS are you testing on?

sandy081 commented 4 months ago

Have you built the workspace by following these steps - https://github.com/microsoft/vscode/wiki/How-to-Contribute This workspace extensions requires workspace to be built in order to activate.

nc6 commented 4 months ago

Ah, I have not. But this fails with all extensions I have tried, not just the one in this repo. See e.g. the initial message concerning the DavidAnson.vscode-markdownlint extension.

I also just tested on an up-to-date insiders build and get the same results:

Version: 1.91.0-insider
Commit: 524d1ecedd33104381e7e0a6715c13813128f89c
Date: 2024-06-24T05:51:18.625Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.6.31
nc6 commented 4 months ago

Attached is the example directory I have just tried to open with the insiders build, with the above extension unpacked. Maybe I'm doing something wrong, but if so I couldn't find better documentation about what I should do.

example.zip

nc6 commented 4 months ago

OK, some additional information. I tried following https://stackoverflow.com/a/78431411 for a very simple plugin (https://marketplace.visualstudio.com/items?itemName=SatoshiYamamoto.vscode-end-of-line) and was able to install it correctly. So it seems I'm doing something wrong with the extension packaging.

sandy081 commented 3 months ago

Closing this as it is a user error.