devtools-terminal
devtools-terminal copied to clipboard
New Node.js installation not working
Hey @petethepig,
I installed the Node.js module and told Chrome where to find it. However, when I open up the terminal it still shows the installation message/prompt. I rebooted Chrome, still nothing.
Anything I can do to get this working? I'd love to help troubleshoot!
What OS do you use?
same here using ubuntu 13.04
I'm on OSX Mavericks and on the latest Chrome release.
Node version v0.10.15 NPM v1.3.5
Okay,
When you do sudo devtools-terminal --install
, it creates a new file at /Library/Google/Chrome/NativeMessagingHosts/com.dfilimonov.devtoolsterminal.json
Can you tell me what's in it?
Also, can you show me the output of this command which node
?
Thanks
Sure thing! :)
JSON output: { "name": "com.dfilimonov.devtoolsterminal", "description": "Devtools Terminal", "path": "/Users/nieldlr/.nvm/v0.10.15/lib/node_modules/devtools-terminal/bin/nm-host.sh", "type": "stdio", "allowed_origins": [ "chrome-extension://leakmhneaibbdapdoienlkifomjceknl/" ] }
And which node: /Users/nieldlr/.nvm/v0.10.15/bin/node
Okay, so there's been a bug and this little script here Users/nieldlr/.nvm/v0.10.15/lib/node_modules/devtools-terminal/bin/nm-host.sh
couldn't find node
executable.
Now, I think I fixed it :)
I also updated the npm package, so I suppose if you run npm install devtools-terminal -g
once again the whole thing will work just fine.
not for me, unfortunately :grimacing:
Awesome it worked! I tried it without the global flag (-g) but it didn't work. But with the global flag it worked:
npm install -g devtools-terminal
Oh, sure, I forgot about the -g flag.
Thanks for helping me investigate this!
Hey, p3k
Can you please show me the output of which node
and the content of /etc/opt/chrome/native-messaging-hosts/com.dfilimonov.devtoolsterminal
And, as mentioned above, the right command is npm install -g devtools-terminal
, with the -g
flag.
Thanks!
$ which node
/usr/bin/node
$ cat /etc/opt/chrome/native-messaging-hosts/com.dfilimonov.devtoolsterminal.json
{
"name": "com.dfilimonov.devtoolsterminal",
"description": "Devtools Terminal",
"path": "/usr/lib/node_modules/devtools-terminal/bin/nm-host.sh",
"type": "stdio",
"allowed_origins": [
"chrome-extension://leakmhneaibbdapdoienlkifomjceknl/"
]
}
i tried it with the -g flag, too, after your update.
Can you check if this file /usr/lib/node_modules/devtools-terminal/bin/nm-host.sh
has executable rights?
ls -l /usr/lib/node_modules/devtools-terminal/bin/nm-host.sh
I'm also having this issue.. installed with npm (as sudo, with -g flag), ran devtools-terminal with the install flag per the instructions, still only getting the info screen. If i run 'devtools-terminal', I can see socket.io starting up and it appears to sit idle, waiting for events, so i'm guessing it has found node correctly from the terminal at least. Running linux mint 15.
09:47:06 ~$ which node
/usr/local/bin/node
09:47:08 ~$ cat /etc/opt/chrome/native-messaging-hosts/com.dfilimonov.devtoolsterminal.json
{
"name": "com.dfilimonov.devtoolsterminal",
"description": "Devtools Terminal",
"path": "/usr/local/lib/node_modules/devtools-terminal/bin/nm-host.sh",
"type": "stdio",
"allowed_origins": [
"chrome-extension://leakmhneaibbdapdoienlkifomjceknl/"
]
}
Please, check if this file is executable /usr/local/lib/node_modules/devtools-terminal/bin/nm-host.sh
It is
12:27:52 /usr/local/lib/node_modules/devtools-terminal/bin$ ls -al
total 24
drwxr-xr-x 2 nobody cmartin 4096 Jan 17 09:31 .
drwxr-xr-x 4 nobody cmartin 4096 Jan 17 09:31 ..
-rwxr-xr-x 1 nobody cmartin 8063 Jan 15 14:15 devtools-terminal
-rw-r--r-- 1 nobody cmartin 170 Jan 15 14:10 nm-host.bat
-rwxr-xr-x 1 nobody cmartin 184 Jan 16 10:32 nm-host.sh
Figure this out. I had to click the dots in the top right, click Remote Connection, and then I provided 'http://localhost:8080' for the url, 'admin' for the user, and no password.
nefD, I also can make it work with Remote Connection. But first I should start 'devtools-terminal' in bash every time when I want to use it. As I understand that is how it work via Websocket. But by default it should work via NPAPI (sudo devtools-terminal --install --id=leakmhneaibbdapdoienlkifomjceknl) - starts automaticly when you open DevTools Terminal. And I also can't get it to work via NPAPI.
I also can't get to work via Native messaging.
If i run the nm-host.sh
in terminal it exits with error, but if i remove the -l option of #!/bin/bash -l
it runs normally, but still not getting the event api.on('init', ...)
from the POST
.
It's like chrome is not initializing the script correctly (I dunno...).
On debugging background.js i get the following logs:
CONNECT
POST Object {event: "init", data: Object}
disconnect
Native host has exited.