Does this issue occur when all extensions are disabled?: Yes (all except Live Share)
Version: 1.85.0
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T17:43:36.790Z (6 days ago)
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Live Share: v1.0.5900
Steps to Reproduce:
Live Share: Sign In
Try to connect to a Live Share session (click Join, sign in, then paste the invitation link)
Window reloads, starts opening the live share workspace, presents a workspace trust modal, asking me to trust /tmp/vsliveshare-workspace-tmp-<stuff>/Visual Studio Live Share (Workspace). Click "Yes, I trust the authors". VS Code logs an exception and stops opening the workspace. <-- this is where the bug is, I'd expect it to open the workspace and connect
Use Developer: Reload Window
After reloading, we start in Restricted Mode, with a banner across the top "Restricted Mode is intended for safe code browsing...". Click Manage, then Trust. This time, no exception.
Reload one more time, and now we're able to connect.
Here is the exception:
ERR Cannot read properties of undefined (reading 'scheme'): TypeError: Cannot read properties of undefined (reading 'scheme')
at h.P (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:2605:167197)
at .../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:2605:171789
at Array.map (<anonymous>)
at h.setUrisTrust (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:2605:171777)
at h.setWorkspaceTrust (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:2605:171570)
at m.completeWorkspaceTrustRequest (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:2605:173655)
at Object.run (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:2690:68778)
at c.f (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:633:42862)
at c.prompt (.../stable-af28b32d7e553898b2a91af498b1fb666fdebe0c/static/out/vs/workbench/workbench.web.main.js:766:23881)
Maybe this runs too early or something, before the folders in the workspace are fully initialized?
I feel like I've seen other cases where I need to try multiple times to trust a workspace if I click it too quickly, but this is the most reproducible. All you need to do is, in the window where you're hosting the Live Share collaboration session, stop it and start a new one - this will get you a fresh (untrusted) workspace for the collaborator that's joining. This makes it pretty easy to test.
Does this issue occur when all extensions are disabled?: Yes (all except Live Share)
Steps to Reproduce:
/tmp/vsliveshare-workspace-tmp-<stuff>/Visual Studio Live Share (Workspace)
. Click "Yes, I trust the authors". VS Code logs an exception and stops opening the workspace. <-- this is where the bug is, I'd expect it to open the workspace and connectHere is the exception:
It looks like one of the
uris
here isundefined
:https://github.com/microsoft/vscode/blob/af28b32d7e553898b2a91af498b1fb666fdebe0c/src/vs/workbench/services/workspaces/common/workspaceTrust.ts#L620
Maybe this runs too early or something, before the folders in the workspace are fully initialized?
I feel like I've seen other cases where I need to try multiple times to trust a workspace if I click it too quickly, but this is the most reproducible. All you need to do is, in the window where you're hosting the Live Share collaboration session, stop it and start a new one - this will get you a fresh (untrusted) workspace for the collaborator that's joining. This makes it pretty easy to test.