I too found that the built-in Vscode settings sync feature has bugs when syncing extensions. In the case of two clean vscode installs on two different machines, none of my extensions synced.
It seems that non existent extensions (perhaps the developer deleted their extension) can cause all extensions to inadvertently be 'blacklisted' in in the file lastSyncextensions.json under the key "skippedExtensions":[]. You can get to this file via the command Settings Sync : Open Local Backups Folder. For me, all my extensions were listed to be skipped and thus no extensions were synced on a new install of vscode.
Transitory internet errors in syncing e.g. in log [settingssync] [error] Download: XHR failed also causes extensions to be blacklisted in "skippedExtensions" in the aforementioned lastSyncextensions.json. This also sometimes causes vscode to broadcast that the extension which could not be download be removed by other machines running vscode (which sync using the same Github account).
Look in the vscode Settings Sync : Show Log and look for the list of skipped extensions.
Once something is blacklisted - the question is how fix the situation.
Solution 1 - Recovering from all extensions being blocked by non-existent extensions
Step 1:
Identify the extensions which no longer exist (search for them in the vscode extensions UI and if they don't appear, then they are the culprits). For me, they happened to be the first few entries in the "skippedExtensions" list. Then add them to "settingsSync.ignoredExtensions" of your settings.json. For my situation, I added the entry:
"settingsSync.ignoredExtensions": [
"patrys.vscode-code-outline",
"gayanhewa.referenceshelper",
"ms-vscode-remote.remote-ssh-explorer"
],
Step 2 (brutal resync):
Now we need to re-sync. Turn off settings sync via the Settings Sync:Show Synced Data / "Synced Machines" r.click on your machine and select "Turn off Settings Sync". This seems to work better than simply logging out of settings sync.
Now click on the normal vscode gear icon (bottom left) and sign in to settings sync. This prompted me like a fresh install, whether to merge, overwrite local etc. This time all the extensions came down OK.
Solution 2 - Recovering from blacklisted extension caused by transient internet errors
Lets say you see some skipped extensions in your sync log (Settings Sync : Show Log):
[2021-12-30 14:05:57.690] [settingssync] [info] Extensions: Updated last synchronized extensions. Skipped: ["sapos.yeoman-ui","tht13.html-preview-vscode","patbenatar.advanced-new-file","alexisvt.flutter-snippets","vscjava.vscode-java-pack","vscjava.vscode-java-dependency","vscjava.vscode-java-test","vscjava.vscode-maven","vscjava.vscode-java-debug","janisdd.vscode-edit-csv","mohd-akram.vscode-html-format","zjhmale.vscode-ag"].
which causes what seems to be a permanent blacklisting of these extensions on your machine in the file lastSyncextensions.json under the key "skippedExtensions". How do you fix this?
You can get to lastSyncextensions.json via the command Settings Sync : Open Local Backups Folder and then open the file in vscode itself.
To get those extensions properly installed, I edited lastSyncextensions.json and cleared the list - it now reads as "skippedExtensions":[].
Then I went to each particular extension that was previously skipped, using the vscode UI, and installed it. This should also re-install it on any other vscode machine which might have been affected.
Possibly, a simpler solution 2 (which I haven't tried) is don't bother with editing the file lastSyncextensions.json - simply do the brutal re-sync described in step 2 of my solution 1 above. Thus hopefully the lastSyncextensions.json gets regenerated (as well as the problematic "skippedExtensions": entry) and this time pray your internet connection is good and there are no download errors this time.