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

Max connection attempts reached when connecting to NodeJS #410

Closed
belmarca opened this issue Apr 15, 2014 · 31 comments
Closed

Max connection attempts reached when connecting to NodeJS #410

belmarca opened this issue Apr 15, 2014 · 31 comments
Labels

Comments

@belmarca
Copy link

[Please describe your problem here]


Brackets 0.38.0-12606 (mac) & Brackets-Git 0.13.2

Failed to connect to NodeJS. If you just updated the extension close all instances of Brackets and try starting again.

Error: Max connection attempts reached
Error: Max connection attempts reached
    at Object.exports.toError (file:///Users/chm/Library/Application%20Support/Brackets/extensions/user/zaggino.brackets-git/src/ErrorHandler.js:144:16)
    at Object.<anonymous> (file:///Users/chm/Library/Application%20Support/Brackets/extensions/user/zaggino.brackets-git/src/Cli.js:61:37)
    at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:26676)
    at Object.k.fireWith (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:27489)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:28170)
    at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:26676)
    at Object.k.fireWith (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:27489)
    at Object.e.(anonymous function) [as reject] (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:28469)
    at Object.eval (/utils/NodeConnection.js:308:34)
    at Object.<anonymous> (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:550:28045)
@zaggino
Copy link
Member

zaggino commented Apr 15, 2014

@jasonsanjose @bchintx Is there any guide on what to check if Brackets are not able to connect? This never happens to me on neither platform.

@belmarca I'd only suggest completely restarting the computer - this helps me sometimes when developer tools get stuck and won't open.

@belmarca
Copy link
Author

If this helps, I'm using Little Snitch but not blocking Brackets or related processes.

@bchintx
Copy link

bchintx commented Apr 15, 2014

@belmarca Are you encountering this problem using an installed, "experimental" build of Brackets or are you running your own local "development" build?

As @zaggino suggests, usually the most straightforward resolution is to restart your system. In my experience, this error message results from the Brackets process being unable to connect to the node process b/c the node process is either blocked or hung up, for example, from a crash from a previous running instance.

I'm not familiar w/ Little Snitch, but it could be possible that it's blocking the port connection between processes. Did this problem only start happening after installing Little Snitch?

Did this problem only just start happening for you? ie. has Brackets been running just fine before at any time?

Lastly, if you're running a local build, you might be running into a problem introduced when we switched between the 'brackets-node.exe' to 'node.exe' process naming. See here for how to clean up your local deps/ folder to resolve this problem.

@belmarca
Copy link
Author

@bchintx The latest build from the website. I restarted and I still get the error. What do you want me to try?

I'm not intending to use Brackets right away, I was just testing it out. Nice product, but I'll stick with emacs/ST for now!

@bchintx
Copy link

bchintx commented Apr 16, 2014

@belmarca After launching Brackets, try Debug > Reload without Extensions. Do you still get errors? (I'm assuming you're seeing these in the Developer Tools console?)

Also, I'm not familiar w/ Little Snitch, but is it possible to try this after disabling or uninstalling Little Snitch, to see if it's interfering?

@belmarca
Copy link
Author

@bchintx Reloaded without extensions, worked fine. Back with extensions, I get this error:
asdasd
which is exactly the same as before. LittleSnitch is an OSX app that simply filters internet connections with other apps. It enables me to filter incoming/outgoing connections per process. Everything is fine with Brackets, Node and git.

@FezVrasta
Copy link
Contributor

Try with just Brackets Git, this error could not be related to Brackets Git.

@belmarca
Copy link
Author

@FezVrasta I removed every extension, restarted, it didn't work either.

@zaggino
Copy link
Member

zaggino commented Apr 16, 2014

@belmarca there's definitely something on your Mac that's blocking Brackets from opening ports and communicating with NodeJS ... My guesses are that Brackets file watchers don't work either for you (they don't show an error dialog like this extension does on fail).

I have a fresh installation of latest MacOS in my VM with only Brackets 38 and everything works fine.

Isn't it required to allow ports on LittleSnitch by default? You need to have port 9234 allowed for Brackets developer tools and there's also port 8088 mentioned in Brackets sources but I'm not sure if that's all you need to allow.

@bchintx
Copy link

bchintx commented Apr 16, 2014

I'm not able to reproduce the problem either on my MacBook Pro. The Brackets Git extension seems to work fine, and I'm not seeing any errors.

I'm puzzled by your observations as to why Brackets would work fine if you Reload Without Extensions, but then not work if you removed every extension. Even without extensions, Brackets still communicates with Node via the Node Domain connections.

At this point, @zaggino 's suggestion of disabling LittleSnitch appears to be the best next thing to try.

@belmarca
Copy link
Author

Okay, since it worked for you guys I've narrowed down the problem. Brackets doesn't work when the user has User privileges, only when the user is Administrator.

I can't even remove packages[1] when using Brackets with the User account. Everything works flawlessly when logged into my sudoer account. OSX 10.9.2.

[1]: I thought I had removed them, but when I did it again, I realized the prompt told me the operation didn't work. You might want to change the theme of an error prompt so it's clearer to the user.

EDIT: I guess you can either close this or wait until a fix comes out. I hope it's not too difficult to fix :)

@bchintx
Copy link

bchintx commented Apr 17, 2014

Hmm. Thanks for narrowing that down and for filing the issue in the Brackets github repo.

@zaggino
Copy link
Member

zaggino commented Apr 17, 2014

cc @larz0 for

[1]: I thought I had removed them, but when I did it again, I realized the prompt told me the operation didn't work. You might want to change the theme of an error prompt so it's clearer to the user.

@larz0
Copy link
Contributor

larz0 commented Apr 17, 2014

@zaggino @belmarca is there a screenshot of the error prompt that's not clear to the user so we can fix it?

@belmarca
Copy link
Author

screen shot 2014-04-17 at 12 53 32 am
screen shot 2014-04-17 at 12 53 47 am

On the second prompt, I just skimmed it and thought Bracket's was going to reload. Maybe a different color theme would be a better fit for an error.

@zaggino
Copy link
Member

zaggino commented Apr 17, 2014

Yes, there definitely should be some red (or at least orange) color in that second dialog.

@larz0
Copy link
Contributor

larz0 commented Apr 17, 2014

@belmarca @zaggino thanks for the examples, we'll add a warning icon to errors like this:

screen-shot-2014-04-16-at-7 48 44-pm

@belmarca
Copy link
Author

Good addition, but I also think changing the popup color to a warm shade of red would help.

@bchintx I didn't realize until now that all you guys work at Adobe. I reported in Brackets and I thought I was talking to a different team! 👍

@anukanth
Copy link

NodeJs process is trying to connect to you system. It could not connect because the host file might have been modified when you installed some software. Brackets does not modify this file. It is not an issue with brackets or its installation process. So even if you delete all relevant folders, Windows registry and reinstall brackets, the problem is not going to get solved as any of these processes would not modify the host file. You have to manually edit C:/windows/system32/drivers/etc/host with notepad and enter a line without any comment sign (#) and enter the following line without any add on like comma or anything.
127.0.0.1 localhost

Save this file without any extension like txt. Restart brackets. This file may have other lines. Do not modify any of the other lines.

@zaggino
Copy link
Member

zaggino commented Sep 9, 2016

@zaggino zaggino closed this as completed Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests