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 not configure file association in remote windows #79628

Closed
dotnetCarpenter opened this issue Jul 23, 2019 · 8 comments
Closed

Can not configure file association in remote windows #79628

dotnetCarpenter opened this issue Jul 23, 2019 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities verified Verification succeeded
Milestone

Comments

@dotnetCarpenter
Copy link

Issue Type: Bug

  1. Open a project in WSL
  2. Create a file that ends with .cjs
  3. Click on Editor Language ("Plain Text")
  4. Select "Configure File Association for '.cjs'..."
  5. You will get the following error message:

[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character

Seen both in vscode 1.36.1 and vscode-insider 1.37.0-insiders.

Remote - WSL Extension version: 0.39.0
VS Code version: Code - Insiders 1.37.0-insider (628bded, 2019-07-19T10:33:04.702Z)
OS version: Windows_NT x64 10.0.18362
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 x 2295)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 3.92GB (0.42GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu/home/dotnet/projects/utils --remote=wsl+Ubuntu
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.4.0-18362-Microsoft
CPUs Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 x 2301)
Memory (System) 3.92GB (0.42GB free)
VM 0%
@jrieken
Copy link
Member

jrieken commented Jul 23, 2019

Create a file that ends with .cjs

Where do you create that file? Root folder?

@dotnetCarpenter
Copy link
Author

Actually I created the .cjs file in a sub folder but I didn't think it mattered. I should specify that setting the language to JavaScript works, only 4 does not work and throws an error

  1. Select "Configure File Association for '.cjs'..."

@aeschli aeschli pinned this issue Aug 22, 2019
@aeschli aeschli unpinned this issue Aug 22, 2019
@aeschli aeschli transferred this issue from microsoft/vscode-remote-release Aug 22, 2019
@aeschli
Copy link
Contributor

aeschli commented Aug 22, 2019

The problem is from

const currentAssociation = this.modeService.getModeIdByFilepathOrFirstLine(resource.with({ path: base }));

@bpasero I'd suggest to pass in the URI as-is to getModeIdByFilepathOrFirstLine, or create a new file-URI (Uri.file(base)) for probing.

@aeschli aeschli assigned bpasero and unassigned jrieken and aeschli Aug 22, 2019
@aeschli aeschli changed the title Can not configure file association with WSL (UriError) Can not configure file association in remote windows Aug 22, 2019
@bpasero bpasero added help wanted Issues identified as good community contribution opportunities bug Issue identified by VS Code Team member as probable bug labels Aug 22, 2019
@bpasero
Copy link
Member

bpasero commented Aug 22, 2019

Open for grab.

@bpasero bpasero added this to the September 2019 milestone Aug 22, 2019
@aeschli
Copy link
Contributor

aeschli commented Aug 22, 2019

I'm happy to make the change.
I'd suggest to pass in the URI as-is to getModeIdByFilepathOrFirstLine, or create a new file-URI (Uri.file(base)) for probing.

@bpasero What do you prefer?

@bpasero
Copy link
Member

bpasero commented Aug 22, 2019

@aeschli we cannot regress #69334 though. There are URIs in our system that are potentially very large (inline data uris from Git) and we had freezes when those URIs would be send down to our pattern matcher.

@bpasero bpasero modified the milestones: September 2019, August 2019 Aug 22, 2019
@roblourens roblourens added the verified Verification succeeded label Aug 28, 2019
@Wqrld
Copy link

Wqrld commented Sep 3, 2019

Has the latest commit been pushed into vscode yet? I still have this issue with VS Code version: Code 1.37.1 (f06011a, 2019-08-15T16:17:55.855Z)

@aeschli
Copy link
Contributor

aeschli commented Sep 4, 2019

I verified that the fix is in 1.38.0-insider (user setup)
Commit: e77b008
Date: 2019-08-30T10:15:17.547Z

@Wqrld It will be in stable as soon as 1.38.0 is published.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants