vscode: UNC allow list should not fail for resolved mapped network drives or symbolic links
Seeing an increase in issues (such as https://github.com/microsoft/vscode/issues/182185) where a mapped network drive or symbolic link points to a UNC path. If you use node.js methods such as fs.readlink or fs.realpath.native to resolve these paths to their UNC equivalent and use them for further file operations, our UNC allow list might prevent use of these paths until you add them to the allow list.
We should discuss if there are options here to make this easier on the impacted users. The issue often goes unnoticed because we do not prompt the user on startup for these paths to add them to the allow list.
❗Workaround Given an exception like this one:
Error: Debug Failure. False expression: z:/home/siddharth/workspace/newWebUi/facilgo-web-ui/node_modules/react-table-6/index.d.ts linked to nonexistent file //wsl$/Ubuntu-20.04/home/siddharth/workspace/newWebUi/facilgo-web-ui/node_modules/react-table-6/index.d.ts
at realPath (c:\Users\smish\.vscode\extensions\ms-vscode.vscode-typescript-next-5.1.20230510\node_modules\typescript\lib\tsserver.js:42142:9)
at getOriginalAndResolvedFileName (c:\Users\smish\.vscode\extensions\ms-vscode.vscode-typescript-next-5.1.20230510\node_modules\typescript\lib\tsserver.js:41079:28)
Find the resolved file path (here //wsl$/Ubuntu-20.04/home...) and add the hostname of the path (the value between // and the first / after that) to the security.allowedUNCHosts setting (here: wsl$). Then restart VS Code.
See also: https://aka.ms/vscode-windows-unc
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 15 (6 by maintainers)
The fix for this is in
1.79.xreleases.