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

Cannot test Web Extensions in WSL2 or Dev Containers #201069

Open
glebbash opened this issue Dec 16, 2023 · 14 comments
Open

Cannot test Web Extensions in WSL2 or Dev Containers #201069

glebbash opened this issue Dec 16, 2023 · 14 comments
Labels
feature-request Request for new features or functionality web Issues related to running VSCode in the web
Milestone

Comments

@glebbash
Copy link

Type: Bug

Following instructions from here to start web extension in desktop VSCode from WSL2:

The extension is built fine but it's not shown when running Developer: Show Running Extension in [Extension Development Host] window and trying to run Hello World command fails saying that it is not found (even though command is visible in command palette).

Trying both VS Code desktop and @vscode/test-web options yields the same results.

Running non-web hello-world extension sample is working as expected though.

I also cannot find any relevant logs.

VS Code version: Code 1.85.1 (0ee08df, 2023-12-13T09:49:37.021Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz (8 x 3110)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.70GB (2.77GB free)
Process Argv --crash-reporter-id bacc653e-b8c0-4166-83a7-51ae995f7274
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 5.15.133.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz (8 x 3110)
Memory (System) 7.61GB (4.85GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 5.15.133.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz (8 x 3110)
Memory (System) 7.61GB (4.85GB free)
VM 0%
Extensions (18)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.6.2
codespaces Git 1.16.5
remotehub Git 0.62.0
gitpod-desktop git 0.0.163
opa-highlight-only gle 0.1.1
vscode-drawio hed 1.6.6
remote-containers ms- 0.327.0
remote-ssh ms- 0.107.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.81.8
remote-explorer ms- 0.4.1
remote-repositories ms- 0.40.0
lo und 0.0.70
vscode-eslint dba 2.4.2
prettier-vscode esb 10.1.0
vscode-docker ms- 1.28.0
svelte-vscode sve 108.1.0
vscode-zig zig 0.5.1

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
3biah626:30602489
89544117:30613380
showlangstatbar:30737416
962ge761:30917236
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialog:30910333
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019:30917259
cp7184t:30925682

@glebbash
Copy link
Author

Btw I get the same problem when trying to follow instructions from dev container.

@glebbash glebbash changed the title Cannot test Web Extension in WSL2 Cannot test Web Extension in WSL2 or Dev Containers Dec 22, 2023
@glebbash glebbash changed the title Cannot test Web Extension in WSL2 or Dev Containers Cannot test Web Extensions in WSL2 or Dev Containers Dec 22, 2023
@VSCodeTriageBot VSCodeTriageBot added the stale Issues that have not been triaged in an appropriate amount of time label Jan 3, 2024
@lramos15 lramos15 assigned aeschli and chrmarti and unassigned Tyriar and lramos15 Jan 3, 2024
@lramos15 lramos15 removed triage-needed stale Issues that have not been triaged in an appropriate amount of time labels Jan 3, 2024
@aeschli
Copy link
Contributor

aeschli commented Jan 8, 2024

Maybe there's a problem with your main file?
Check the dev tools to see if there are any error messages.

@aeschli aeschli added the info-needed Issue requires more information from poster label Jan 8, 2024
@aeschli
Copy link
Contributor

aeschli commented Jan 8, 2024

I tested that running the hello world web extension works.

  • npm i -g yo generator-code
  • yo code, New Web Extension
  • open in code insiders, Run Web Extension from the debug viewlet
  • Run the command Hello World

@glebbash
Copy link
Author

glebbash commented Jan 8, 2024

Tried again, now using clean insiders install:

  • npm i -g yo generator-code
  • yo code, New Web Extension, name: repro, agreed to npm install
  • open in code insiders, Run Web Extension from the debug viewlet

On first launch I see this:
image

And then the launched Extension Development Host has no repro extension installed:
image

DevTools logs(Extension Development Host):
image

DevTools logs(main window):
image

@glebbash
Copy link
Author

glebbash commented Jan 8, 2024

Note: this only happens with running from WSL or Dev Containers. Doing the same using windows terminal is working fine.

@glebbash
Copy link
Author

glebbash commented Jan 8, 2024

Also doing the same using VSCode installed directly in WSL (using WSLg) also works.

And my current workaround is to run VSCode CLI from WSL distro and use the web UI instead of connecting through Remote WSL extension.

@aeschli
Copy link
Contributor

aeschli commented Jan 8, 2024

Ah, sorry, now I understand. You want to run a web extension that is on a remote.

Maybe caused by #144513

@aeschli aeschli assigned alexdima and unassigned aeschli and chrmarti Jan 8, 2024
@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@glebbash
Copy link
Author

should this be closed? @alexdima @aeschli

@aeschli aeschli added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Apr 9, 2024
@aeschli aeschli added the web Issues related to running VSCode in the web label Apr 9, 2024
@aeschli aeschli added this to the Backlog milestone Apr 9, 2024
@aeschli aeschli reopened this Apr 9, 2024
@aeschli
Copy link
Contributor

aeschli commented Apr 9, 2024

Running a web extension in a remote setup is currently not supported.
You can use test-web instead.

@cristian-spiescu
Copy link

1/ Your statement is only for the development scenario? So if I am developing a web extension + WSL => I cannot test it in VS Code.

Or 2/ the statement applies also for the runtime scenario. I.e. I published a web extension. And a user that tries my extension in WSL =>it won't work.

@aeschli
Copy link
Contributor

aeschli commented Apr 9, 2024

Only the development scenario.
In the runtime scenario, the extension will be installed on the local OS and can run in the web extension host that runs on the local OS.
So instead of having your extension source code located on a remote OS (WSL in this case), have it locally (on the Windows file system). Then the normal development capabilities also work there.

@glebbash
Copy link
Author

glebbash commented Apr 9, 2024

Running a web extension in a remote setup is currently not supported.

Yeah... That's a bummer. I am currently using VSCode through code --serve-web and the development experience here is pretty limited.

@jobrittain
Copy link

Running a web extension in a remote setup is currently not supported.

At our company we have the same issue and have been using Dev Containers for all our extension projects up until now, so this incompatibility is quite inconvenient. It's also taken me a while to figure out that this is an unsupported debugging scenario since it isn't documented elsewhere. It would be good if a statement could be added to this documentation for example before the feature becomes available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

9 participants