Repository navigation
Closed
Labels
info-neededIssue requires more information from poster
Description
- VSCode Version: 1.35.0
- Local OS Version: MacOS 10.13.6
- Remote OS Version: Nixos 19.03.172657.cdec6217d98 (Koi)
- Remote Extension/Connection Type: SSH
Steps to Reproduce:
- Try to connecct
[email protected]
SSH Resolver called for "ssh-remote+home"
SSH Resolver called for host: home
Setting up SSH remote "home"
Using commit id "553cfb2c2205db5f15f3ee8395bbd5cf066d357d" and quality "stable" for server
Install and start server if needed
> Installing to /home/lux/.vscode-server/bin/553cfb2c2205db5f15f3ee8395bbd5cf066d357d...
> Downloading with wget
> Printing the current remote environment...
> LD_LIBRARY_PATH=/run/opengl-driver/lib
> SSH_CONNECTION=10.0.0.1 59089 10.0.1.29 22
> LANG=en_US.UTF-8
> EDITOR=nano
> MOZ_PLUGIN_PATH=/home/lux/.nix-profile/lib/mozilla/plugins:/nix/var/nix/profiles/default/lib/mozilla/plugins:/run/current-system/sw/lib/mozilla/plugins:/etc/profiles/per-user/lux/lib/mozilla/plugins
> KDEDIRS=/home/lux/.nix-profile:/nix/var/nix/profiles/default:/run/current-system/sw:/etc/profiles/per-user/lux
> NO_AT_BRIDGE=1
> QTWEBKIT_PLUGIN_PATH=/home/lux/.nix-profile/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/:/etc/profiles/per-user/lux/lib/mozilla/plugins/
> XDG_SESSION_ID=13
> USER=lux
> PAGER=less -R
> TZDIR=/etc/zoneinfo
> LIBEXEC_PATH=/home/lux/.nix-profile/lib/libexec:/nix/var/nix/profiles/default/lib/libexec:/run/current-system/sw/lib/libexec:/etc/profiles/per-user/lux/lib/libexec
> NIX_PROFILES=/etc/profiles/per-user/lux /run/current-system/sw /nix/var/nix/profiles/default /home
> /lux/.nix-profile
> __fish_nixos_env_preinit_sourced=1
> PWD=/home/lux
> NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
> SSH_ASKPASS=/nix/store/7hnksdws6v40j087pb54x46vgd504awi-ksshaskpass-5.14.5/bin/ksshaskpass
> HOME=/home/lux
> SSH_CLIENT=10.0.0.1 59089 22
> GTK_PATH=/home/lux/.nix-profile/lib/gtk-2.0:/home/lux/.nix-profile/lib/gtk-3.0:/nix/var/nix/profiles/default/lib/gtk-2.0:/nix/var/nix/profiles/default/lib/gtk-3.0:/run/current-system/sw/lib/gtk-2.0:/run/current-system/sw/lib/gtk-3.0:/etc/profiles/per-user/lux/lib/gtk-2.0:/etc/profiles/per-user/lux/lib/gtk-3.0
> XDG_DATA_DIRS=/run/opengl-driver/share:/home/lux/.nix-profile/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share:/etc/profiles/per-user/lux/share
> STRIGI_PLUGIN_PATH=/home/lux/.nix-profile/lib/strigi/:/nix/var/nix/profiles/default/lib/strigi/:/run/current-system/sw/lib/strigi/:/etc/profiles/per-user/lux/lib/strigi/
> GIO_EXTRA_
> MODULES=/nix/store/zawby3zwsi58d5clyvjzbxfrb6j15mps-gvfs-1.38.2/lib/gio/modules
> TERMINFO_DIRS=/home/lux/.nix-profile/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/run/current-system/sw/share/terminfo:/etc/profiles/per-user/lux/share/terminfo
> GDK_PIXBUF_MODULE_FILE=/nix/store/2wldk19wpd926x4ck59d5dja1gj469l3-gdk-pixbuf-loaders.cache
> __NIXOS_SET_ENVIRONMENT_DONE=1
> MAIL=/var/mail/lux
> QT_PLUGIN_PATH=/home/lux/.nix-profile/lib/qt4/plugins:/home/lux/.nix-profile/lib/kde4/plugins:/nix/var/nix/profiles/default/lib/qt4/plugins:/nix/var/nix/profiles/default/lib/kde4/plugins:/run/current-system/sw/lib/qt4/plugins:/run/current-system/sw/lib/kde4/plugins:/etc/profiles/per-user/lux/lib/qt4/plugins:/etc/profiles/per-user/lux/lib/kde4/plugins
> NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/lux
> TERM=dumb
> SHELL=/run/current-system/sw/bin/fish
> SHLVL=2
> LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
> VSCODE_AGENT_FOLDER=/home/lux/.vscode-server
> LOGNAME=lux
> NIXPKGS_CONFIG=/etc/nix/ni
> xpkgs-config.nix
> XDG_RUNTIME_DIR=/run/user/1000
> XDG_CONFIG_DIRS=/home/lux/.nix-profile/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg:/etc/profiles/per-user/lux/etc/xdg
> PATH=/home/lux/bin:/run/wrappers/bin:/home/lux/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/lux/bin
> INFOPATH=/home/lux/.nix-profile/info:/home/lux/.nix-profile/share/info:/nix/var/nix/profiles/default/info:/nix/var/nix/profiles/default/share/info:/run/current-system/sw/info:/run/current-system/sw/share/info:/etc/profiles/per-user/lux/info:/etc/profiles/per-user/lux/share/info
> NIXPKGS_ALLOW_UNFREE=1
> XCURSOR_PATH=/home/lux/.icons:/home/lux/.nix-profile/share/icons:/nix/var/nix/profiles/default/share/icons:/run/current-system/sw/share/icons:/etc/profiles/per-user/lux/share/icons
> _=/run/current-system/sw/bin/printenv
> OLDPWD=/home/lux/.vscode-server/bin/553cfb2c2205db5f15f3ee8395bbd5cf066d357d
> Starting server...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
> Waiting for server log...
>
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
> Server did not start successfully. Full server log:
> /home/lux/.vscode-server/bin/553cfb2c2205db5f15f3ee8395bbd5cf066d357d/server.sh: line 12: /home/lux/.vscode-server/bin/553cfb2c2205db5f15f3ee8395bbd5cf066d357d/node: No such file or directory
> c7a841f3-7eb8-4937-b524-84842b5af26b====
"install" terminal command done
Received install output: c7a841f3-7eb8-4937-b524-84842b5af26b====
Failed to parse remote port from server output: c7a841f3-7eb8-4937-b524-84842b5af26b====
The problem seems to be that /home/lux/.vscode-server/bin/553cfb2c2205db5f15f3ee8395bbd5cf066d357d/node can not be executed. I'm not really sure why. Running it inside a ubuntu docker container works. That way I could figure out it seems to be a node v10.2.1. However I'm not sure which version.
https://nodejs.org/dist/v10.2.1/node-v10.2.1-linux-x64.tar.gz runs just fine.
Reacted by decromin and Simon Chatterjee
Metadata
Metadata
Assignees
Labels
info-neededIssue requires more information from poster
Activity
simonchatts commentedon Jun 18, 2019
For people just trying to get this working, the following works for me:
rm -rf ~/.vscode-serverand ensurenodejs-10_xis installed (and no other nodejs version)cdto~/.vscode-server/bin/*on the server, and runrm node; ln -s $(which node)One possible fix (hacky but better than nothing) for the extension authors: automate these steps in the server install script buried inside the extension:
I've tested this, but it's quite faffy extracting this source shell script from the minified js inside the
.vsixfile, so not really recommended for folks just trying to do the install. (Could the extension source code be put somewhere?)roblourens commentedon Jun 19, 2019
Sorry but can you explain why you need to do this and what's different about the nixOS node version?
wmertens commentedon Jun 19, 2019
Simon Chatterjee (@simonchatts) your code could simply be replaced with a nix-shell -p nodejs invocation every time they need to run node
Luabee commentedon Jun 19, 2019
The reason the node executable can't be run is because the executable is 32-bit
EDIT: I was incorrect. see comment below.
Luabee commentedon Jun 19, 2019
Looks like it's actually just missing a dependency. Nixos handles deps with Nix, so it makes sense that it wouldn't be there.
Luabee commentedon Jun 20, 2019
This StackExchange post seems to shed some light on solutions: https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos
roblourens commentedon Jun 20, 2019
Thanks. I'm thinking this is basically a variant of #103 which covers issues with our native binaries not running on machines that are missing dependencies. They should be statically linked (or allow running an external
nodefrom the machine itself).wmertens commentedon Jun 20, 2019
In any case, it would be much nicer to use a local nodejs instead of dumping 80MB into the user's homedir. The server is just a node script and dependencies; bundle it, minify, try to run with local node, if that doesn't work try some fallbacks like nix-shell and only then download a binary.
aanderse commentedon Jul 16, 2019
roblourens Is there any way we can work something up along the lines of what Wout Mertens (@wmertens) is talking about regarding using a local
nodebinary instead of the one thisvscodeplugin ships? Simon Chatterjee (@simonchatts) has a solution which works (thank you very much Simon Chatterjee (@simonchatts)!) but it is a bit hacky to have to run those commands to replace thenodebinary you ship with a symlink to the localnode.roblourens commentedon Jul 16, 2019
I am not planning anything like that right now.
aanderse commentedon Jul 17, 2019
roblourens As you are someone who doesn't use NixOS, or any of the other distros having problems like this, I can appreciate that your position... but is there any way we can meet somewhere in the middle? I'm a sysadmin who has a bunch of developers I want to get up and running on this extension and my options aren't great at the moment. What can the NixOS community do for you to make this happen?
Luabee commentedon Jul 17, 2019
wmertens commentedon Jul 17, 2019
roblourens commentedon Jul 17, 2019
Isn't this about all of our native dependencies and not just node? Having users set up custom server configurations that swap out different dependencies with their own versions, even just for node, introduces a lot of complexity for us especially when trying to debug issues over github. We have enough issues just trying to support the most basic configurations 😁
wmertens commentedon Jul 17, 2019
aanderse commentedon Jul 17, 2019
roblourens I've had a developer on using this extension with NixOS for the morning and they have reported that their usual php workflow is operating flawlessly. They're asking me what it will take to replicate this across all our web servers.
After running
treeon the~/.vscode-serverdirectory i'm not entirely sure what you mean by native dependencies. I see anodebinary which I replaced, and then mostly just.jsfiles. Obviously I don't have the source code to your extension, but from the digging I've done I don't see any reason to believe that simply allowing users to specify anodebinary won't fix the issue in a reasonably clean fashion.🤷♂️
roblourens commentedon Jul 18, 2019
Native code is used for search, syntax highlighting, internal logging which tends to break the product when it can't be initialized, a remote handshake module which is responsible for the error messages in #103, any third party extensions that assume they are in a normal remote environment will break, and probably some other stuff I'm not thinking of. Maybe some of that works for you now but it could break later then we will be back trying to patch it with another hack. The point is that all of this has to be considered in the context of #103.
wmertens commentedon Jul 18, 2019
aanderse commentedon Jul 23, 2019
Wout Mertens (@wmertens) After the somewhat ominous warning from roblourens is it time to start considering alternatives such as
buildFHSUserEnv, possibly in combination withusers.users.<name?>.shell, at this point?wmertens commentedon Jul 23, 2019
Urgh. Maybe just some ld preload that provides the missing /lib/ld-linux*?
luxzeitlos commentedon Jul 23, 2019
Actually I think roblourens is right. The reason why the
nodebinary does not work is probably dynamic linking. The provided binary can easily be patched withpatchelfand the dynamic linking will work.So its likely that #103 would fix this.
aanderse commentedon Jul 23, 2019
@luxferresum I'll be very glad to see resolution to this. For now I'm continuing to have a few developers test out the extension with the custom
nodereplacement for now... Hopefully they don't run into any problems while we await a solution to #103.Thanks for your continued efforts on this extension roblourens. Sorry for any hassle we have caused.