microsoft / vscode

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

TS Server fatal error: UNC host 'andre' access is not allowed #206978

Closed andreselva closed 7 months ago

andreselva commented 7 months ago

Type: Bug

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

TypeScript Version: 5.3.2

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 'andre' access is not allowed
    at Object.watchFile (node:fs:2480:14)
    at fsWatchFileWorker (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8590:11)
    at c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8237:15
    at createSingleWatcherPerName (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:7758:16)
    at pollingWatchFile (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8232:12)
    at watchFile2 (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8067:16)
    at watchMissingFileSystemEntry (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8325:14)
    at fsWatchHandlingExistenceOnHost (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8256:72)
    at c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8246:15
    at createSingleWatcherPerName (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:7758:16)
    at fsWatch (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8241:12)
    at Object.watchFile2 [as watchFile] (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:8092:16)
    at watchFile (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:120258:67)
    at Object.watchFile (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:120277:283)
    at c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179929:183
    at _ProjectService.forEachConfigFileLocation (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179979:22)
    at _ProjectService.startWatchingConfigFilesForInferredProjectRoot (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179922:10)
    at InferredProject2.addRoot (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178082:25)
    at _ProjectService.assignOrphanScriptInfoToInferredProject (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179720:13)
    at _ProjectService.assignProjectToOpenedScriptInfo (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:181347:12)
    at c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:181577:64
    at flatMap (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:2597:17)
    at _ProjectService.applyChangesInOpenFiles (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:181577:24)
    at updateOpen (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182775:29)
    at c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185377:69
    at IpcIOSession.executeWithRequestId (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185369:14)
    at IpcIOSession.executeCommand (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185377:29)
    at IpcIOSession.onMessage (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:185419:51)
    at process.<anonymous> (c:\Users\andre\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:187001:14)
    at process.emit (node:events:514:28)
    at emit (node:internal/child_process:937:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:41:44.469Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz (4 x 3600)| |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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.95GB (8.32GB free)| |Process Argv|--crash-reporter-id 835b41f7-a476-4254-9be5-6d90c20c63e0| |Screen Reader|no| |VM|0%|
Extensions (13) Extension|Author (truncated)|Version ---|---|--- vscode-intelephense-client|bme|1.10.2 vscode-eslint|dba|2.4.4 gitlens|eam|14.8.2 php-awesome-snippets|hak|1.1.3 rainbow-csv|mec|3.11.0 vscode-docker|ms-|1.29.0 debugpy|ms-|2024.2.0 python|ms-|2024.2.1 vscode-pylance|ms-|2024.2.3 LiveServer|rit|5.7.9 php-debug|xde|1.34.0 php-pack|xde|1.0.3 php-intellisense|zob|1.3.3 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 f8hc8238:30694864 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:30968132 pythontbext0:30879054 accentitlementsc:30887149 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 d34g3935:30971562 edj9j583:30969295 a89i1917:30973842 dsvsc020:30976470 ```
bpasero commented 7 months 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.