sansarip / owlbear

An experimental Visual Studio Code extension that supports paredit-like structural-editing features for HTML, TypeScript, TypeScript-React, JavaScript, and JavaScript-React.
https://sansarip.github.io/owlbear/
MIT License
36 stars 2 forks source link

wrong extensionKind for remote session #114

Closed david-morris closed 8 months ago

david-morris commented 8 months ago

Describe the bug All commands error out immediately after installing. image

To Reproduce Steps to reproduce the behavior:

  1. Install from extensions pane
  2. run an owlbear command from the F1 menu

Expected behavior Commands execute without error and perform edits

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

Additional context

when I run a command from a keystroke, that errors out too: image

I'm using a vscode remote setup with a WSL/Docker dev environment.

I refreshed the window but haven't done a cold start of vscode since installing.

david-morris commented 8 months ago

I've now been able to do more debugging on this.

Owlbear is working on the base Windows setup, but not when working in Remote Windows for WSL or in the dev container.

So that's an issue with either Remote Windows and Owlbear, or OS compatibility.

Maybe this is going to be something simple like setting whether this extension runs in the host or client of a remote session.

I'll test that when I can, but does anyone here already know whether Owlbear is compatible with Linux?

Edit: from https://github.com/sansarip/owlbear/issues/108 I take it that Owlbear is better tested Unix platforms than windows. I'm guessing that this is a problem with remote access, then.

This extension development doc will probably be useful on this ticket.

The first thing to try would be to set the extension location in the package.json which lines up with my hunch that the wasm is getting loaded onto the wrong node interpreter.

image

david-morris commented 8 months ago

OK, I just used the remote.extensionKind setting to force the extension to run as a UI extension. That worked, so this is probably a single line change to package.json.

sansarip commented 8 months ago

OK, I just used the remote.extensionKind setting to force the extension to run as a UI extension. That worked, so this is probably a single line change to package.json.

Thanks for the thoughtful investigation here David, and for putting up a fix! I'll take a look at your PR this evening (EST) 🤘