microsoft / vscode

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

TS Server fatal error: UNC host 'wsl.localhost' access is not allowed #187744

Closed namkce closed 1 year ago

namkce commented 1 year ago

Type: Bug

❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️

TypeScript Version: 5.1.3

Steps to reproduce crash

1. 2. 3.

TS Server Log

❗️ Server logging disabled. To help us fix crashes like this, please enable logging by setting:

"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.

TS Server Error Stack

Server: semantic

Error [ERR_UNC_HOST_NOT_ALLOWED]: UNC host 'wsl.localhost' access is not allowed
    at Object.watchFile (node:fs:2363:14)
    at fsWatchFileWorker (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8562:11)
    at c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8209:15
    at createSingleWatcherPerName (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:7730:16)
    at pollingWatchFile (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8204:12)
    at watchFile2 (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8039:16)
    at watchMissingFileSystemEntry (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8297:14)
    at fsWatchHandlingExistenceOnHost (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8228:72)
    at c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8218:15
    at createSingleWatcherPerName (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:7730:16)
    at fsWatch (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8213:12)
    at Object.watchFile2 [as watchFile] (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8064:16)
    at watchFile (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:117633:67)
    at Object.watchFile (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:117652:282)
    at c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:176956:183
    at _ProjectService.forEachConfigFileLocation (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177006:22)
    at _ProjectService.startWatchingConfigFilesForInferredProjectRoot (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:176949:10)
    at InferredProject2.addRoot (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:175209:25)
    at _ProjectService.assignOrphanScriptInfoToInferredProject (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:176747:13)
    at _ProjectService.assignProjectToOpenedScriptInfo (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178370:12)
    at c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178600:64
    at flatMap (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:2573:17)
    at _ProjectService.applyChangesInOpenFiles (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178600:24)
    at updateOpen (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179780:29)
    at c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182353:69
    at IpcIOSession.executeWithRequestId (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182345:14)
    at IpcIOSession.executeCommand (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182353:29)
    at IpcIOSession.onMessage (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182395:51)
    at process.<anonymous> (c:\Users\roberte\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:183975:14)
    at process.emit (node:events:513:28)
    at emit (node:internal/child_process:967:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

VS Code version: Code 1.80.0 (660393deaaa6d1996740ff4880f1bad43768c814, 2023-07-04T15:06:02.407Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 2995)| |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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.69GB (3.43GB free)| |Process Argv|--crash-reporter-id b441a383-c3c0-4f63-92fe-4653eb4eae86| |Screen Reader|no| |VM|0%|
Extensions (6) Extension|Author (truncated)|Version ---|---|--- prettier-vscode|esb|9.19.0 csharp|ms-|1.26.0 python|ms-|2023.12.0 vscode-pylance|ms-|2023.7.10 remote-wsl|ms-|0.80.2 powershell|ms-|2023.6.0
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30784847 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 pyind779:30671433 f6dab269:30613381 vscrp:30673768 pythonsymbol12:30671437 showlangstatbar:30737416 vsctsb:30748421 pythonms35:30701012 a2ce3375:30757347 pythonfmttext:30731395 pythoncmvfstrcf:30756944 fixshowwlkth:30771522 hideindicator:30785051 pythongtdpath:30769146 bgfeh915:30780428 pythonnosm12tcf:30779713 pythonidxpt:30784022 pythonnoceb:30776495 h7j2d465:30786200 dsvsc013cf:30784101 ```
mknxdev commented 1 year ago

Same issue here...

mjbvz commented 1 year ago

Beginning with VS Code 1.78.1 accessing any UNC path (those that begin with \\) on Windows is blocked to mitigate a security risk that is further explained in this Security Advisory.

Please refer to https://aka.ms/vscode-windows-unc for more information how to make your specific UNC path work again.