Change:
} private toRelativePath(extensionLocation: URI): string | undefined { <del> if (this.uriIdentityService.extUri.isEqualOrParent(extensionLocation, this.extensionsLocation)) { const relativePath = this.uriIdentityService.extUri.relativePath(this.extensionsLocation, extensionLocation); if (this.extensionsLocation.scheme === Schemas.file && this.logService.getLevel() === LogLevel.Trace) { this.logService.trace('Relative path', extensionLocation.fsPath, this.extensionsLocation.fsPath, relativePath); } return relativePath; } return undefined; </del> <ins> return this.uriIdentityService.extUri.isEqual(this.uriIdentityService.extUri.dirname(extensionLocation), this.extensionsLocation) ? this.uriIdentityService.extUri.basename(extensionLocation) : undefined; </ins> } private resolveExtensionLocation(path: string): URI {

Discussion:
Suddenly my extensions in Vscode seem to have disappeared. I uninstalled Vscode and then reinstalled it and tried to install the extensions again. Although the extensions appear to be installed in .vscode/extensions folder, Vscode says "no extensions found" and i can't use any of the extensions. I have tried uninstalling and re-installing Vscode many times. I even did a system restore. I deleted and re-installed the extensions but it didn't work. Screenshots: ! extensions folder: ! VS Code Version: 1.75 & 1.75.1 OS Version: Windows 10 Education
After installing an extension, what do you see in the file? Install the extension F1 Open View... Shared - Share this log with us
! !
Everything seems to be good. Can you please share the contents of the file in the extensions folder?
!
In the extensions folder, there is a file named - Can you also please share contents of this file, if it exists?
It doesn't exist. !
It seems the paths in file are not matching with the extensions folder names shown in the above screenshot. For eg: & properties of extension has and respectively. Initial 3 and 2 letters are removed. To re-confirm that you are able to reproduce this consistently, can you please do following? From CLI, open VS Code using fresh user data directory and extensions directory. Eg: Install an extension Check the file in the second folder you passed to argument and share the contents with us.
Here is the new extensions folder: ! !
It is clear that there is a problem with the . Can you please try our insiders from here - and share the file Install insiders from Open Insiders and install extension Share content - F1 Open Extensions Folder
There is the same problem: !
Glad that you can repro on insiders. I am adding more logs in the insiders version that is available tomorrow. I will update once new version of insider is available. Please try again and provide the shared log. F1 Set Log Level... Trace F1 Open View... Shared
I am computing the relative path in the following way and it seems this is cutting off the starting letters Any insights?
The is also wrong: !
Thats right. But please check the relativeLocation always trimming first couple of characters even from the wrong location.

Can you please download latest insiders and do following F1 Set Log Level... Trace Install an extension F1 Open View... Shared - Share this log
Please check this log statement This is logged while computing the relative path - please check following code It seems to be clear that the relative path is not returning the correct value. Any insights?
For file URIs we use . I would be surpised if there's a bug in the NodeJS library. There are two slashes in . Is that because the user name was removed for the log?
I can reproduce this with following test It returns
Seems to be a bug in node path library when there are UTF characters in the path There seems to be a fix for this bug - CC
It's my fault that there are two slashes. I'd removed the user name before commenting. It actually looked like these: ! !
Thanks for figuring this out!
if this can be addressed by patching our library, then please check with as owner: If we need to patch something in core , then we have to add the patch to our internal builds with the help of However, given that the PR was never merged, my confidence in the fix is not very high.
I have another fix for this. I am using instead of because extension is the immediate child of extensions location. I will create another bug for relativePath issue.
I've been having this issue across two macs (with settings sync) ever since i upgrade my work and personal machines simultaneously. Most of the time when i install an extension (most recently noticed: vim, ruby) it is installed and activated in the window, then gone if i reload the window. outputs a short list of extensions, but my folder shows many more. I disabled settings sync and observed the same behavior. Maybe helpful context: This was an intel-M1 mac upgrade, and i used migration assistant on the first one i got, which led to all sorts of issues (brew prefix being different, etc). when i then replaced the second i started from a fresh install but settings sync was enabled between the two. Edit: Minutes after posting this the issue was closed. In my case it was definitely not path-related, but i just did a with settings sync turned off, reloaded vscode, and turned sync on, and extensions repopulated, including some that were specified but previously missing from my machine.

installing new extensions since then has worked as expected and they have persisted when reloading.
I do not think your issue is same as this. Can you please file a separate issue for yours and provide us steps to reproduce.
That may be the case but this was the closest issue i could find to mine and i cannot reproduce it. if it crops up again i will open a new issue.
The problems with and seems to have been fixed. But "no extensions found" issue still appears when the extension is installed. ! ! : !
Can you please try clicking the refresh button in the extensions view after installing the extension and see if the view gets updated?
Today when I opened vscode I saw that everything was fine. I'm thankful for all your help.
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
/verified