Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Solus] Live Share extension fails activation, errors about /usr/local/bin missing when pasting browser integration command #215

Closed
tristan957 opened this issue Apr 20, 2018 · 14 comments

Comments

@tristan957
Copy link

tristan957 commented Apr 20, 2018

Product and Version [VS/VSCode]: 1.22.2
OS Version [macOS/Windows]: Solus (Linux)
Live Share Extension Version: 0.2.399
Target Platform or Language [e.g. Node.js]: uhhh..

Steps to Reproduce / Scenario:
logs.zip

  1. Copy and paste command once installed

I am receiving the following errors after installation and pasting the command in my terminal.

sudo sh /home/tristan957/.vscode/extensions/ms-vsliveshare.vsliveshare-0.2.399/node_modules/@vsliveshare/vscode-launcher-linux/install.sh /usr/share/vscode/code-oss /home/tristan957/.vscode/extensions/ms-vsliveshare.vsliveshare-0.2.399/cascade.json
Password: 
cp: cannot create regular file '/usr/local/bin/': No such file or directory
chmod: cannot access '/usr/local/bin/vsls-launcher': No such file or directory
VS Live Share launcher installation complete.

Can they be disregarded?

@Chuxel
Copy link
Collaborator

Chuxel commented Apr 20, 2018

@tristan957 Thanks for reporting the issue. Solus is not a distro of Linux we've tested since there's no official VS Code package for it. (In fact, wasn't even aware there was a VS Code package for it at all.)

The command that has errored enables browser integration so the errors you are seeing means setup has failed. You will still be able to manually join without it, however.

You can also try creating the /usr/local/bin folder, run the command, and see if browser integration works. This is the only distro I've ever heard of that does not have that folder, so it's a bit odd. This seems to indicate creating it should work, but your results may vary.

@Chuxel Chuxel changed the title Installation errors on Linux after pasting installation command [Solus] Installation errors on Linux after pasting installation command Apr 20, 2018
@tristan957
Copy link
Author

Thanks for the link to the thread. It seems like you're making an assumption that /use/local/bin exists. Is it possible for you to check if it exists at runtime and of not create the directory within the script? This is a completely different approach, but is it possible that within the VSCode folder there could be a /bin folder like ~/.vscode/bin? I don't really like the fact that Live Share is installing in my root directory in the first place. Yarn, NPM, Pip, and Cargo all install in my home directory and then I can append to PATH to access these executables.

@Chuxel
Copy link
Collaborator

Chuxel commented Apr 20, 2018

@tristan957 A desktop shortcut needs to be placed in the right location in order for the browser to pick it up and extensions do not have installers or package mangers built in. Live Share itself is not placed that location functions completely without this being present. It's purely to facilitate browser integration. As I mentioned above, you can skip this step and use manual joins instead if you'd prefer.

We could investigate an alternate location as a feature request.

@tristan957
Copy link
Author

I guess I'm trying to understand the browser integration you are referring to. I'd like to explain how Atom's Teletype approaches browser integration, and maybe you can confirm that this is what you're talking about. Teletype is an extension very similar to Live Share. When I choose to share my workspace I am given a link along the lines of atom://teletype/portal/2d8b21b3-9018-4642-9cba-282747112eda. When I click this link in my browser I am prompted to open Atom. Is this what you are talking about? Teletype has no requirement on this browser integration executable for it to work. If I understand how the atom URL works, VSCode might need to be able to make itself its own URL association a la vscode://liveshare/.... Please don't think I'm saying that Teletype is the better solution. I'm just trying to understand why Live Share is so different in its solution. I am very appreciative of this extension because VSCode is my favorite editor.

@Chuxel
Copy link
Collaborator

Chuxel commented Apr 20, 2018

@tristan957 Live Share is a multi-tool, multi-OS feature. We currently support VS Code on Windows, Mac, and Linux and Visual Studio on Windows. Over time we expect to support at least VS for Mac if not others.

Keep in mind the service side of Live Share is used by all tools and all operating systems. As a result, the invitation page cannot use a tool specific protocol. It uses a vsls:// protocol instead. Further, the landing page actually automatically detects whether or not you have a tool with the Live Share extension installed based on whether or not this protocol is available. You will get install instructions if not and it will automatically launch if so. On Windows, you can then opt to use VS Code or VS as you see fit. Mac will be similar over time.

@Chuxel
Copy link
Collaborator

Chuxel commented Apr 24, 2018

@tristan957 I actually installed Solus and it looks like the VS Code instance I was able to install is a bit non-standard since even ignoring the error you reported here, the extension fails to initialize complaining about experimental APIs missing. (You can see this in Help > Toggle Developer Tools)

It appears to be an issue with the actual Solus VS Code package rather than the Live Share extension/

Are you seeing the Share and Sign in buttons in the status bar? How did you install VS Code?

@tristan957
Copy link
Author

I am not seeing those buttons. I installed it through my package manager. sudo eopkg it vscode. Here is the build file for the package. https://dev.solus-project.com/source/vscode/browse/master/package.yml. That is the build file for VSCode do you notice anything missing in terms of flags and what not? I don't mind reaching out to my package maintainer.

@tristan957
Copy link
Author

tristan957 commented Apr 26, 2018

Activating extension 'ms-vsliveshare.vsliveshare' failed: [undefined]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api undefined. (at Object.showMessage (/usr/share/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:41326:41))
log @ /usr/share/vscode/resources/app/out/vs/workbench/workbench.main.js:19508

^^^ from console

@Chuxel
Copy link
Collaborator

Chuxel commented Apr 27, 2018

@tristan957 Okay, so independently of this @avanderhoorn logged #262 which is the exact same problem as this second issue.

Whoever is creating the VS Code distribution for Solus is not including the entirety of the product.json file that we see in other instances. Specifically, this is missing:

"extensionAllowedProposedApi": [         
      "ms-vsliveshare.vsliveshare",         
      "ms-vscode.node-debug",         
      "ms-vscode.node-debug2"    
 ]

In fact, this probably would result in problems with Node debugging as well. Live share is just one of the three.

You can see the file once VS Code is installed at /usr/share/vscode/resources/app/product.json

If you add the above into that file, Live Share will start.

HOWEVER, sign in will fail due to what is likely this issue #212 which apparently is a .NET Core issue.

@Chuxel Chuxel changed the title [Solus] Installation errors on Linux after pasting installation command [Solus] Live Share extension fails activation and installation errors on after pasting browser integration command Apr 27, 2018
@Chuxel Chuxel changed the title [Solus] Live Share extension fails activation and installation errors on after pasting browser integration command [Solus] Live Share extension fails activation, errors about /usr/local/bin missing when pasting browser integration command Apr 27, 2018
@tristan957
Copy link
Author

@Chuxel I am busy for the rest of the night, but I'll review this with my package maintainer and see if this is the fix we are looking for. I'll keep you posted.

@Chuxel
Copy link
Collaborator

Chuxel commented Apr 27, 2018

@tristan957 Sounds good. We raised a general "quesiton" issue on it since we have seen this error in telemetry and may be happening with other distos but we just haven't heard about.

As I said, things will still fail due to a .NET Core issue with certain libcurl versions. Gentoo and Solus must have a recent enough version to cause the problem. You can see info on that in #212.

@tristan957
Copy link
Author

@Chuxel thank you for taking the time to investigate #215 and #212. I know VSCode does not officially support these distributions, but I really appreciate it.

@Chuxel
Copy link
Collaborator

Chuxel commented May 15, 2018

@tristan957 I believe we have now resolved this particular issue. We now use ~/.local/share if it is found instead of /usr/local/bin. #212 we now have a clearer picture as to what is going on - it looks like a recompiled version of curl is required. We also separated out the Code OSS issue into #262.

As a result, I'm thinking we can close this one in favor of the other two. Thanks for raising it!! Let us know if this particular aspect of the problem persists.

@Chuxel Chuxel closed this as completed May 15, 2018
@tristan957
Copy link
Author

Perfect. Thank you for your assistance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants