Cannot connect to terminal
MaikJaek opened this issue · comments
I tried to get the SDK working on a linux machine (Ubuntu Server).
When I start up the application I cannot use the terminal.
It constantly reconnects to the server opening and closing the session immediately. I noticed this because I receive emails when a new user session on that server is opened.
When looking into the browser console I noticed the following trace entry coming up with each failed try to connect the terminal:
tmux_connection.js:202 --> Disregard terminal: devel_288
Any ideas on how to resolve the problem?
This would happen if:
- pty.js is not properly installed in ~/.c9/node_modules
- tmux is not installed and has a symlink to ~/.c9/bin/tmux
You can check if pty.js is installed by going to the ~/.c9 folder and executing
node -e "require('pty.js')"
Hi Ruben,
Thanks for your reply!
-pty.js is installed
- $workspace/.c9/bin/ is in the path of the user and thus tmux is accessible
Further ideas?
Am 19.02.2015 um 23:08 schrieb Ruben Daniels notifications@github.com:
This would happen if:
pty.js is not properly installed in ~/.c9/node_modules
tmux is not installed and has a symlink to ~/.c9/bin/tmux
You can check if pty.js is installed by going to the ~/.c9 folder and executingnode -e "require('pty.js')"
—
Reply to this email directly or view it on GitHub.
- pty.js is installed
- $workspace/.c9/bin/ is in the path of the user and thus tmux is accessible
Further ideas?
tmux is not installed in $workspace/.c9/bin. It is installed in ~/.c9/bin. There should be a tmux symlink there.
Do you see anything in the output when starting server.js?
Hi Ruben,
I finally found out what caused the problem:
I had to install the ssh "extension" from https://github.com/c9/install
You might want to add this to your readme as from the readme it is not clear that this installation is necessary.
Thanks for helping!
Am 20.02.2015 um 00:45 schrieb Ruben Daniels notifications@github.com:
-pty.js is installed
$workspace/.c9/bin/ is in the path of the user and thus tmux is accessible Further ideas?
tmux is not installed in $workspace/.c9/bin. It is installed in ~/.c9/bin. There should be a tmux symlink there.Do you see anything in the output when starting server.js?
—
Reply to this email directly or view it on GitHub.
Hi MaikJaek,
That happens automatically. It won't if a previous step fails, which I'm pretty sure, is what happened in your case. The root cause is an earlier failure and it would be good to understand what that failure was and if we can solve it somehow.
Best,
Ruben
Yep this has happened to me as well with C9 and other projects using Node-Gyp. Usually when I forget and try to use Node 0.12 with Node-Gyp.
I'm hitting this as well, and I'm seeing something awkward:
~/.c9/node/bin/node -e "require('pty.js')"
works if I'm in my ~/.c9 directory, but if I'm in my checkout of c9sdk:
~/.c9/node/bin/node -e "require('pty.js')"
module.js:355
Module._extensions[extension](this, filename);
^
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/src/experiments/c9sdk/node_modules/pty.js/lib/pty.js:8:11)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
So I'm having two versions of pty.js, one that works in ~/.c9, and one that doesn't in c9sdk/node_modules, and it seems that ./node_modules/pty.js/build/Release/pty.node in c9sdk might not load right.
No idea what's going on.
This is on osx 10.3.2.
One thing that I observered in the history is that @nightwing landed node 12, backed it out, and then relanded it as part of a merge conflict. Not sure if it's actually supposed to be on or off right now.
I think I can nail this down to different node versions in c9 and the OS. c9 has 0.12, and my node on homebrew is still on 0.10. Somewhere in the chain of node-gyp it seems to call into the wrong version of node, but I can't really reproduce how the version in ~/.c9 doesn't fall into the same bucket.
@nightwing did you end up finding a fix for this?
@Pike I have the same problem on my local machine. Because of it localfs.js shows the error "unable to initialize pty.js". Have you solved it?
@asinyagin We were looking at different solutions for this. One is to start localfs with the installed node.js version so that it matches the compiled pty.js.
@javruben thanks, i'll try that.
I ended up with this: whenever I update c9sdk, I purge c9sdk/node_modules/pty.js and replace it with the copy from ~/.c9/node_modules. "Works like charm", kinda.
@Pike we've updated sdk to not use pty.js from node_modules and always use the one from ~/.c9 . It should fix this issue.
Yep, wfm. I had node spinning wild earlier today, but then I pruned node_modules and installed from scratch, and it's been nice to me since.
I think we can close this out now.