code-settings-sync icon indicating copy to clipboard operation
code-settings-sync copied to clipboard

Syncing from Linux to Windows platforms breaks Live Share extension

Open mtnakayama opened this issue 3 years ago • 1 comments

🐛 Describe the bug
Syncing Linux and Windows VSCode installations breaks the Live Share extension on Windows.

Settings Sync synchronizes the files ~/.config/Code/User/globalStorage/ms-vsliveshare.vsliveshare/dotnet-[[VERSION]]/shared/Microsoft.NETCore.App/[[VERSION]]/Microsoft.NETCore.App.deps.json from the Linux to the Windows install. The Live Share plugin on Windows will then try to load the Linux libraries instead of the Windows ones.

At this point, trying to click "Share" or "Join" on Windows does nothing. Trying to start a session with the palette gives the error message: "command 'liveshare.start' not found."

🌴 Visual Studio Code Version : 1.57.1 🌴 Code Settings Sync Version : v3.4.3 🌴 Standard or Insiders : Standard 🌴 Portable or Installed : Installed 🌴 OSS or Official Build : Official Build 🌴 Operating System : Manjaro Linux, Windows 10 🌴 Occurs On: Upload 🌴 Proxy Enabled: No 🌴 Gist Id: 0f2168123728f23e3deef40b783cec6d Live Share Version: v1.0.4498

📰 To Reproduce

  1. Install VSCode on Linux.
  2. Install and configure the Settings Sync and Live Code plugins.
  3. Upload settings with Settings Sync.
  4. Install VSCode on Windows.
  5. Install and configure Settings Sync on the Windows installation.
  6. Download settings with Settings Sync.
  7. Try to start a Live Share session on the Windows machine.

💪 Expected behavior Settings Sync should ignore all files named Microsoft.NETCore.App.deps.json from the directory User/globalStorage/ms-vsliveshare.vsliveshare

📺 Console Error Log Developer Tools console error message on Windows:

Activating extension 'ms-vsliveshare.vsliveshare' failed: Agent terminated with exit code: 0 and signal null: Error:
  Anassembly specified in the application dependencies manifest(Microsoft.NETCore.App.deps.json)was not found:package:'runtime.linux-x64.Microsoft.NETCore.App',version:'3.1.14-servicing.21165.2'path:'runtimes/linux-x64/native/System.Globalization.Native.so'.

📺 Additional context I solved the problem myself by adding "Microsoft.NETCore.App.deps.json" to the ignoreUploadFiles array in syncLocalSettings.json for all my machines.

For those with the same problem, here's how I fixed the Live Share extension install on Windows:

  1. Add "Microsoft.NETCore.App.deps.json" to the ignoreUploadFiles array in syncLocalSettings.json on all your machines.
  2. Remove the "Microsoft.NETCore.App.deps.json" files from the gist, using the git command line. (Not sure if this is necessary.)
  3. Uninstall the Live Share plugin on the Windows VSCode install.
  4. Delete the %APPDATA%\Code\User\globalStorage\ms-vsliveshare.vsliveshare directory.
  5. Delete the %USERPROFILE%\.vscode\extensions\ms-vsliveshare.vsliveshare-[[VERSION NUMBER]] directory.
  6. Re-install the Live Share plugin.

mtnakayama avatar Jul 01 '21 22:07 mtnakayama

I have also broken the live share extension this way.

the documentation appears to have been deleted for whatever reason but the answer is to add globalStorage to ignored folders

https://github.com/shanalikhan/shanalikhan.github.io/blob/49b692e227398209d9ff448d56ce394b8fc56dcc/_posts/2017-2-19-Option-to-ignore-settings-folders-code-settings-sync.md

I think you would find the file on windows at %APPDATA%\Code\User\syncLocalSettings.json

willpower232 avatar Sep 03 '21 13:09 willpower232