Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

WebSocket connection failed / Undefined Node #12506

Closed
alemonteiro opened this issue Jun 11, 2016 · 10 comments
Closed

WebSocket connection failed / Undefined Node #12506

alemonteiro opened this issue Jun 11, 2016 · 10 comments

Comments

@alemonteiro
Copy link

After update to 1.7 (installed .deb x64 from site) most extensions that required an node domain stopped working, returning "Max connection attempts reached" error. Including git, ftp and sql.

On the console, even with live preview and all extensions disabled I got tons of

WebSocket connection to 'ws://localhost:38443/' failed: Unexpected response code: 401

Also, both "Enable Node Debugger" and "Restart Node" say that can't call method of undefined.

Checked /etc/hosts and have "127.0.0.1 localhost" configured.

Tried to run with sudo and gksu for testing but then I can't even open the development tools or install extensions to test. But the node options also return undefined object.

I got those installed packages:

sudo apt list | grep "brackets\|nodejs"

brackets/now 1.7.0-16898 amd64 [installed,local]
nodejs/testing,now 4.3.1~dfsg-3 amd64 [installed]
nodejs-dbg/testing 4.3.1~dfsg-3 amd64
nodejs-dev/testing,now 4.3.1~dfsg-3 amd64 [installed,automatic]
nodejs-legacy/testing,testing 4.3.1~dfsg-3 all

I returned to 1.6 for now and the extensions are working properly.

@Noneatme
Copy link

I think this problem also caused my #12505.

@digitaleagle
Copy link

I have the same issue:
WebSocket connection to ‘ws://localhost:34273/’ failed: Unexpected response code: 401

I don't see a socket open. I am assuming that I should see one:
netstat -ntlp | grep 34273

I also tried by the pid:
$ ps -ef | grep -i node
skp 9789 9764 0 18:21 pts/20 00:00:00 /opt/brackets/Brackets-node /opt/brackets/node-core
$ netstat -ntlp | grep 9977

I didn't try reverting back to 1.6, but I noticed the issue when I was trying to install version 1.7

@nethip
Copy link
Contributor

nethip commented Jun 17, 2016

There was an issue with 1.7 Linux 64 builds. It was to do with brackets unable to connect to Node. We have now fixed the problem and refreshed the builds. Could you guys download the Linux 1.7 builds again from brackets.io and check?

@digitaleagle
Copy link

@nethip That worked great for me. I can now install all of the extensions that I was trying to, so I am good to go. Thank you very much.

@alemonteiro
Copy link
Author

@nethip It's solved! Thanks very much =)

@DerlanLima
Copy link

@nethip It's worked :D
Thanks

@f4z3k4s
Copy link

f4z3k4s commented Jun 23, 2016

@nethip It isn't working for me actually. I just downloaded the 1.7 64-bit.deb installer from brackets.io. I am using Ubuntu 16.04. I get the same error WebSocket connection to 'ws://localhost:46339/' failed: Unexpected response code: 401 thus when I try to install any extensions, Brackets freezes with this error Installation Failed" : "Unknown internal error.". If I open it with sudo, I can't even open the console. I also checked it with 1.6, same error. Am I not doing something correctly or does someone else still have the issue? Thanks in advance.

@digitaleagle
Copy link

@f4z3k4s Since you are getting the issue on both 1.7 and 1.6, it leads me to think that this is a different issue, but I'm not sure.

I had initially installed on Ubuntu 16.04 64-bit from the WebUpd8 repository. To install the version from brackets.io, I had to install the libgcrypt11 from the WebUpd8 post, and then install the deb package. That fixed my problem, and I was able to install the extensions that I wanted. Then, a while after that, I noticed it doing the same thing again. My theory is that I had run updates and that it had reinstalled the version from the repo. After reinstalling the version from brackets.io the error went away again.

I don't know if any of that helps.

@nethip
Copy link
Contributor

nethip commented Jun 24, 2016

@f4z3k4s I agree with @digitaleagle . It could be a different issue.

Do you use any proxy or have a different mapping of localhost on your system? Also there could be another software like an AntiVirus program which may be blocking opening of local ports.

@f4z3k4s
Copy link

f4z3k4s commented Jun 24, 2016

I managed to solve the problem with the help of @digitaleagle . Without having libgcrypt11 installed separately, you can't even install the deb. Why I could install it previously was because I first installed brackets from the WebUpd8 repo with apt-get, after I removed it, but not purged it, and libgcrypt was still available for the deb file which I downloaded from brackets.io.

The following I did to make it work:

  1. I purged the previously installed brackets totally with
    sudo apt-get purge brackets
  2. I also removed the ppa with
    sudo add-apt-repository --remove ppa:webupd8team/brackets
  3. I installed libgcrypt this way:
    wget http://ftp.acc.umu.se/mirror/cdimage/snapshot/Debian/pool/main/libg/libgcrypt11/libgcrypt11_1.5.3-5_amd64.deb
    sudo dpkg -i libgcrypt11_1.5.3-5_amd64.deb
  4. And after this I was able to install brackets 1.7 from the deb file, and extensions are working.

Thanks for the help guys, keep up the good work.
Cheers!:)

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

No branches or pull requests

6 participants