live-share icon indicating copy to clipboard operation
live-share copied to clipboard

Support Apple M1

Open Theddi opened this issue 4 years ago • 25 comments

Describe what happened: I'm trying to install live share, but I get literally nothing to work. I'm new to Mac, on the Apple M1 13" Macbook, so I asked a friend to help me, but we couldn't find out what causes it.

Tried reinstalling extension a few times, even with more rights for vscode, but no change. Not even the supposed login window comes up. Tried reinstalling VSCode, too.

What was your system configuration? Product and Version [VS/VSCode]: VSCode 1.52.1 OS Version[macOS/Windows]: macOS Big Sur 11.1 Live Share Extension Version: v1.0.3484 Target Platform or Language [e.g. Node.js]:

Steps to Reproduce / Scenario:

  1. Open VSCode
  2. Go to Extensions
  3. Install Live Share
  4. Nothing

Please attach logs to this issue: logs.zip

Screenshots This is all I get. Except for "read our docs" no button or link works of live share. Bildschirmfoto 2021-01-16 um 10 56 53 Also no extension button there, or what's it called. Bildschirmfoto 2021-01-16 um 11 03 07

Theddi avatar Jan 16 '21 10:01 Theddi

I'm faced with same issue too. Any way to fix it. Although I'm running windows 10pro.

remi1444 avatar Jan 22 '21 19:01 remi1444

This is by no means a permanent fix, but I've managed to get Live Share working and tested briefly on my M1 MBP with the Silicon install of VSCode (v1.54.1).

My solution was to install Apple's Rosetta 2 through the command line: softwareupdate --install-rosetta (you will need to agree to some terms - I did initially think the M1s shipped with this, but I needed to install manually). After which, I restarted my machine and the Live Share features within VSCode have worked since.

Hope this helps!

petercalvert avatar Mar 11 '21 15:03 petercalvert

My solution was to install Apple's Rosetta 2 through the command line: softwareupdate --install-rosetta (you will need to agree to some terms - I did initially think the M1s shipped with this, but I needed to install manually). After which, I restarted my machine and the Live Share features within VSCode have worked since.

This did not do the trick for me. Still nothing as original problem description. After Rosetta install and restart. Di you do anything else? @petercalvert

maxxafari avatar Mar 18 '21 11:03 maxxafari

Hey @maxxafari - no other steps, it has had a few hiccups but generally I've had no issues and not had to do anything further. Have you downloaded the Silicon ver of VSCode and tried reinstalling the VSLS plugin after installing Rosetta 2? I've installed next to nothing on this M1 outside of R2 and a few Composer and Homebrew packages, so I'm pretty near to being straight from the factory and the Live Shares have been ~95% fine. Not sure what else to suggest!

There are a few features that have been a little buggy (joining a session when the host is using their Terminal causes an occasional crash of VSCode, and I cannot join directly from a browser link, it needs to be manually copy and pasted into the input after the running liveshare.join in the command box).

To confirm, I've been on a LS today with the following setup;

macOS Big Sur: 11.2.3 VSCode v1.54.3 VSCode Live Share v1.0.3968

petercalvert avatar Mar 22 '21 14:03 petercalvert

Any update on this? vsls-agent is one of the last apps on my laptop to not support arm64 natively.

Also getting this message on macOS Monterey.

image

andymac4182 avatar Oct 29 '21 02:10 andymac4182

Checkout discussions over at https://github.com/microsoft/vscode/issues/134635

williamli avatar Nov 08 '21 03:11 williamli

Please prioritise proper fix for native m1 support - would like to use live share, but prefer not to deal with rosetta.

baksale avatar Nov 27 '21 19:11 baksale

For adding support for M1, we should add the electron and slimcore arm64 binaries to the liveshare audio packageJSON module.

A quick fix can be: edit ~/.vscode/extensions/ms-vsliveshare.vsliveshare-audio-0.1.91. Find in runtimeDependencies:

{
	"code": "electron-4.2.12",
	"description": "electron-electron-mac-x64-skype-4.2.12",
	"url": "https://callingcdndev.blob.core.windows.net/electron/electron-mac-x64/skype-4.2.12/3664656/electron.zip",
	"platforms": [
		"darwin"
	],
	"architectures": [
		"x64",
		"arm64" // <====== ADD THIS
	],
	"installPath": "./electron-4.2.12/dist",
	"unpackPath": "../../temp",
	"packageRootPath": "",
	"installTestPath": "./electron-4.2.12/dist/Electron.app/Contents/MacOS/Electron",
	"checksum": "48000e7657bb661500c4df035a166ebd9f58c1a1"
},

and

{
	"code": "slimcore-4.0.2019.23.01.7",
	"description": "slimcore-electron-signed-2019.23.01.7.zip",
	"url": "https://callingcdndev.blob.core.windows.net/slimcore/macosx-x64_clang-libcxx-electron-4.0-release/2019.23.01.7/slimcore-electron-signed-2019.23.01.7.zip",
	"platforms": [
		"darwin"
	],
	"architectures": [
		"x64",
		"arm64" // <====== ADD THIS
	],
	"installPath": "./slimcore-4.0.2019.23.01.7",
	"unpackPath": "../temp",
	"packageRootPath": "package",
	"installTestPath": "./slimcore-4.0.2019.23.01.7/package.json",
	"checksum": "0aa4efe6345c77a0c5a5892177f1bef30209e822"
},

nullxx avatar Dec 31 '21 22:12 nullxx

For adding support for M1, we should add the electron and slimcore arm64 binaries to the liveshare audio packageJSON module.

A quick fix can be: edit ~/.vscode/extensions/ms-vsliveshare.vsliveshare-audio-0.1.91. Find in runtimeDependencies:

{
	"code": "electron-4.2.12",
	"description": "electron-electron-mac-x64-skype-4.2.12",
	"url": "https://callingcdndev.blob.core.windows.net/electron/electron-mac-x64/skype-4.2.12/3664656/electron.zip",
	"platforms": [
		"darwin"
	],
	"architectures": [
		"x64",
		"arm64" // <====== ADD THIS
	],
	"installPath": "./electron-4.2.12/dist",
	"unpackPath": "../../temp",
	"packageRootPath": "",
	"installTestPath": "./electron-4.2.12/dist/Electron.app/Contents/MacOS/Electron",
	"checksum": "48000e7657bb661500c4df035a166ebd9f58c1a1"
},

and

{
	"code": "slimcore-4.0.2019.23.01.7",
	"description": "slimcore-electron-signed-2019.23.01.7.zip",
	"url": "https://callingcdndev.blob.core.windows.net/slimcore/macosx-x64_clang-libcxx-electron-4.0-release/2019.23.01.7/slimcore-electron-signed-2019.23.01.7.zip",
	"platforms": [
		"darwin"
	],
	"architectures": [
		"x64",
		"arm64" // <====== ADD THIS
	],
	"installPath": "./slimcore-4.0.2019.23.01.7",
	"unpackPath": "../temp",
	"packageRootPath": "package",
	"installTestPath": "./slimcore-4.0.2019.23.01.7/package.json",
	"checksum": "0aa4efe6345c77a0c5a5892177f1bef30209e822"
},

The vsls-agent binary is not compiled for arm64 so it doesn't work.

wanted to add up that running Remote container (devcontainer) from a M1 mac (without emulation) fails on qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory (no emulation inside a container) the --platform linux/amd64 does partially fix this but fails on different issues (function not implemented)

Until we have a working binary for arm64 we stopped using LiveShare within our devcontainer (should affect Codespaces as well) .

mrsufgi avatar Jan 02 '22 08:01 mrsufgi

For adding support for M1, we should add the electron and slimcore arm64 binaries to the liveshare audio packageJSON module. A quick fix can be: edit ~/.vscode/extensions/ms-vsliveshare.vsliveshare-audio-0.1.91. Find in runtimeDependencies:

{
	"code": "electron-4.2.12",
	"description": "electron-electron-mac-x64-skype-4.2.12",
	"url": "https://callingcdndev.blob.core.windows.net/electron/electron-mac-x64/skype-4.2.12/3664656/electron.zip",
	"platforms": [
		"darwin"
	],
	"architectures": [
		"x64",
		"arm64" // <====== ADD THIS
	],
	"installPath": "./electron-4.2.12/dist",
	"unpackPath": "../../temp",
	"packageRootPath": "",
	"installTestPath": "./electron-4.2.12/dist/Electron.app/Contents/MacOS/Electron",
	"checksum": "48000e7657bb661500c4df035a166ebd9f58c1a1"
},

and

{
	"code": "slimcore-4.0.2019.23.01.7",
	"description": "slimcore-electron-signed-2019.23.01.7.zip",
	"url": "https://callingcdndev.blob.core.windows.net/slimcore/macosx-x64_clang-libcxx-electron-4.0-release/2019.23.01.7/slimcore-electron-signed-2019.23.01.7.zip",
	"platforms": [
		"darwin"
	],
	"architectures": [
		"x64",
		"arm64" // <====== ADD THIS
	],
	"installPath": "./slimcore-4.0.2019.23.01.7",
	"unpackPath": "../temp",
	"packageRootPath": "package",
	"installTestPath": "./slimcore-4.0.2019.23.01.7/package.json",
	"checksum": "0aa4efe6345c77a0c5a5892177f1bef30209e822"
},

The vsls-agent binary is not compiled for arm64 so it doesn't work.

wanted to add up that running Remote container (devcontainer) from a M1 mac (without emulation) fails on qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory (no emulation inside a container) the --platform linux/amd64 does partially fix this but fails on different issues (function not implemented)

Until we have a working binary for arm64 we stopped using LiveShare within our devcontainer (should affect Codespaces as well) .

With rosetta installed, you can run VSCode with apple silicon support but when a binary is x64 it will run under rosetta. That's why I said is a quick patch. The best as you say is to have the arm64 binary.

Electron already supports apple silicon but I don't know if slimcore does.

nullxx avatar Jan 02 '22 09:01 nullxx

I think Rossetta is not available within a container that was not run with emulation. I run vscode with apple silicon (native) . devcontainer (working vscode inside a container) fails to activate Rossetta because its in a container env.

mrsufgi avatar Jan 02 '22 10:01 mrsufgi

I think Rossetta is not available within a container that was not run with emulation. I run vscode with apple silicon (native) . devcontainer (working vscode inside a container) fails to activate Rossetta because its in a container env.

You're right, Rosetta is not available inside a container.

nullxx avatar Jan 02 '22 18:01 nullxx

Curious to understand what the plan is to support M1 in LiveShare as this issue has been live since January last year.

We have an increasing number of M1 macs in our developer fleet now, and we typically use Dev Containers for our development work, so the quick fix noted above doesn't suit our use case.

simmerz avatar May 20 '22 15:05 simmerz

Kind of frustrating that this is basically the only thing i have rosetta installed for, it would be good to get some word on if the team plans to support M1 binaries for vsls-agent at some point or at least what if any technical blockers there are so maybe the community could help

kynrai avatar May 22 '22 11:05 kynrai

Is there still no fix for this? We are experiencing the same bug. Extension is there but buttons don't work 😥

danielbakas avatar Jun 07 '22 14:06 danielbakas

I recently came across this issue, I have Version: 1.66.2 VS code, Version: v1.0.5595 Live share extension installed.

I went to Applications from Finder -> Right click on VS code app to go to Get Info -> under the General section check the

  • [ ] Open using Rosetta

It will prompt a pop-up to install Rosetta once it's done you need to restart the vs code and it should be good to work

meghabalaraju avatar Jun 08 '22 07:06 meghabalaraju

I recently came across this issue, I have Version: 1.66.2 VS code, Version: v1.0.5595 Live share extension installed.

I went to Applications from Finder -> Right click on VS code app to go to Get Info -> under the General section check the

  • [ ] Open using Rosetta

It will prompt a pop-up to install Rosetta once it's done you need to restart the vs code and it should be good to work

Thank you for this workaround but as you know, booting VSCode app in Rossetta means that the entire application is emulated. I wouldn't go this path as default, as it would affect VSCode performance.

Maybe opening VSCode instance via CLI adding this flag (to use Rosseta) for ad-hoc cases can be a good temp solution (if you don't use LiveShare all the time)

A permanent fix is indeed the only way.

mrsufgi avatar Jun 08 '22 08:06 mrsufgi

Had the same today on Mac M1 , still not supported natively and only worked with Rosetta installation.

aelkoussy avatar Jun 16 '22 13:06 aelkoussy

Dont't know what happened but it started working all of the sudden on my M1 Mac 😱🤷🏽‍♂️

danielbakas avatar Jun 17 '22 06:06 danielbakas

I looked at other files next to the vsls-agent binary, and I realized it's just a self-contained .NET Core 3.1 app published for the osx-x64 target. The binary is merely a thin wrapper around the vsls-agent.dll assembly, which means ./vsls-agent is mostly equivalent to dotnet ./vsls-agent.dll where dotnet refers to .NET Core 3.1 SDK.

Unfortunately, since the earliest version of .NET (Core) which supports Apple silicon Macs is .NET 6, this .NET Core 3.1 app should be upgraded to .NET 6.

dahlia avatar Jun 17 '22 11:06 dahlia

I tried to use dotnet command's --fx-version option, and it turned out vsls-agent.dll to be executable with .NET 6 SDK on Apple silicon Mac:

$ cd ~/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5625/dotnet_modules/
$ dotnet --fx-version 6.0.6 ./vsls-agent.dll
[Agent I] (1002) Trace log: /var/folders/0z/mhq5lfl55fxdvt5sh66332980000gn/T/VSFeedbackVSRTCLogs/20220617_110858_Agent.log
[Agent I] vsls-agent v1.0.5625.54349 (pid: 96993)
[Agent I] Reminder: You may only use this software with Visual Studio and Visual Studio Code, as described in the license (https://go.microsoft.com/fwlink/?linkid=872556).
[Agent I] Start time: 6/17/2022 11:08:58 AM
[Agent I] Using VSLS service: https://prod.liveshare.vsengsaas.visualstudio.com
[Agent I] Using VSLS auth token service: https://sts.online.visualstudio.com/api/v1/tokens/exchange
[Agent I] Using VSLS token audience: https://insiders.liveshare.vsengsaas.visualstudio.com/
[Agent I] Using VSLS presence service: <null> enabled: False
[Agent I] VSLSAgent/1.0.5625.54349 VSLS/2.2 PlatformName/Darwin 21.4.0 PlatformVersion/12.3.1
[Agent I]
[Agent I] Setting up Service Extensions ...
[Agent I] agentExtensionPathOption =
[Agent I] Setting up Server...
[Agent I] rpcFirstSessionTimeout = 30000
[Agent I] relayHubServiceUri = <null>
[Agent I] AutoStop = False
[Agent I] EnableRpcInitialize = False
[Agent I] ClientPipeName = VSLS
[Agent.Proxy I] Proxy settings from env variable: http_proxy was null and https_proxy was null
[Agent.Proxy I] Proxy settings from env variable: http_proxy was null and https_proxy was null
[Agent I] (1001) Listening on pipe "VSLS"

dahlia avatar Jun 17 '22 11:06 dahlia

I'd like to share a workaround I found:

  1. Install .NET SDK 6 (arm64) or higher. It's also available on Homebrew Cask: brew install --cask dotnet-sdk.

  2. Replace vsls-agent (no postfix) in ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/ directory (use your version instead of *) with vsls-agent included in this Gist.

  3. Make it executable: chmod +x ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/vsls-agent.

  4. Reload VS Code.

That's all. Of course, this dirty fix will be overwritten when the Live Share extension is upgraded.

dahlia avatar Jun 17 '22 12:06 dahlia

@mrsufgi

Thank you for this workaround but as you know, booting VSCode app in Rossetta means that the entire application is emulated. I wouldn't go this path as default, as it would affect VSCode performance.

Just a heads up… VS Code doesn’t use Rosetta 2… only vsls-agent does.

skubot avatar Jun 20 '22 10:06 skubot

I'd like to share a workaround I found:

  1. Install .NET SDK 6 (arm64) or higher. It's also available on Homebrew Cask: brew install --cask dotnet-sdk.
  2. Replace vsls-agent (no postfix) in ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/ directory (use your version instead of *) with vsls-agent included in this Gist.
  3. Make it executable: chmod +x ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/vsls-agent.
  4. Reload VS Code.

That's all. Of course, this dirty fix will be overwritten when the Live Share extension is upgraded.

Thank you @dahlia! It works on my M1 Pro without Rosetta 2.

residwi avatar Jul 01 '22 12:07 residwi

I'd like to share a workaround I found:

  1. Install .NET SDK 6 (arm64) or higher. It's also available on Homebrew Cask: brew install --cask dotnet-sdk.
  2. Replace vsls-agent (no postfix) in ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/ directory (use your version instead of *) with vsls-agent included in this Gist.
  3. Make it executable: chmod +x ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/vsls-agent.
  4. Reload VS Code.

That's all. Of course, this dirty fix will be overwritten when the Live Share extension is upgraded.

Thank you very much! Solved my problem too.

duancleypaul avatar Jul 26 '22 12:07 duancleypaul

I'd like to share a workaround I found:

1. Install [.NET SDK](https://dotnet.microsoft.com/download?initial-os=macos) 6 (arm64) or higher.  It's also available on Homebrew Cask: `brew install --cask dotnet-sdk`.

2. Replace _vsls-agent_ (no postfix) in _~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/_ directory (use your version instead of _*_) with _vsls-agent_ included in [this Gist](https://gist.github.com/dahlia/f7804869ae8bfe40f040c7824d1816cf).

3. Make it executable: `chmod +x ~/.vscode/extensions/ms-vsliveshare.vsliveshare-*/dotnet_modules/vsls-agent`.

4. Reload VS Code.

That's all. Of course, this dirty fix will be overwritten when the Live Share extension is upgraded.

Did not solve the problem with Live Share Audio failed to start due to a corrupted but Live Share works. Do you have any workaround for audio ?

MohamedElashri avatar Sep 27 '22 16:09 MohamedElashri

We’ve made improvements in this area since this issue was filed. Specifically, the vsls-agent process which depended on .NET Core has been removed. Further, the related system dependencies are no longer required. We believe this may have improved your experience and are closing this issue. If this issue still persists for you, please comment on the issue and let us know. Thank you.

derekbekoe avatar Nov 13 '22 00:11 derekbekoe

It is still coming for me Live Share Audio failed to start due to a corrupted download. Ensure you have network connectivity then click `Repair` to restart VS Code and attempt recovery. MacBook M1 Air OS : MacOS Ventura 13.0 (22A380)

jairajsahgal avatar Nov 17 '22 13:11 jairajsahgal

Regarding Live Share Audio specifically, we're unable to prioritize fixes to that area as we re-evaluate our priorities and product direction. We understand that this maybe disappointing. We will soon be sunsetting that feature and will work towards a better user experience for communication needs for Live Share users in the future.

derekbekoe avatar Nov 17 '22 18:11 derekbekoe