NodeConnection.js question #6491

Closed
zaggino opened this Issue Jan 12, 2014 · 12 comments

Comments

Projects
None yet
5 participants
Member

zaggino commented Jan 12, 2014

What are the common reasons for Max connection attempts reached message when trying to connect to Node.JS?

https://github.com/adobe/brackets/blob/master/src/utils/NodeConnection.js#L309

On my computer, this works every time (and on any computer that I've tried...) so I'm not able to replicate this error but many users got this error and some claim to have Node.JS properly installed. Any idea? @jasonsanjose @joelrbrandt

jasonsanjose was assigned Jan 13, 2014

Member

njx commented Jan 13, 2014

@zaggino - I don't think we've seen this commonly, but from looking at the code it looks like it would happen if there were something wrong with the brackets-node process - for example, if some other previously loaded node module had thrown an uncaught exception.

(Note that this shouldn't have to do with a node.js that users themselves installed - this would be about the node that's packaged with Brackets which we automatically launch on startup.)

It would help to get more information from your users who are seeing the problem - do you have some bug numbers in your bugbase you could point us to? Additionally, if we could get dumps of your users' Brackets console logs (by having them do Debug > Show Developer Tools and copying out the console), that would help, since I believe all output from the node process's console is echoed back into the Brackets console.

Assigning to @jasonsanjose to investigate further, medium priority.

Member

zaggino commented Jan 14, 2014

@njx Not a lot of info I've been able to get from users (adding "Report a bug" button made much more people report stuff, but the level of response is very low). I was just curious because it seems to appear over and over again and I was never able to replicate it.

Quite a collection of the issues with this (without much usable information):
zaggino/brackets-git#39
zaggino/brackets-git#40
zaggino/brackets-git#49
zaggino/brackets-git#62
zaggino/brackets-git#64
zaggino/brackets-git#65
zaggino/brackets-git#67
zaggino/brackets-git#76
zaggino/brackets-git#77

Member

zaggino commented Jan 14, 2014

As @medimatrix suggested in zaggino/brackets-git#76, this may be related to #6282

Member

zaggino commented Feb 3, 2014

@njx @jasonsanjose After gettling latest master from both brackets & brackets-shell and building everything as usual, nodeConnection stopped working for me too and I get Max connection attempts reached error.

This is Brackets startup log, my only file there is ErrorHandler.js.

less: parsed file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/styles/brackets.less successfully. less-1.4.2.min.js:9
less: css for file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/styles/brackets.less generated in 665ms less-1.4.2.min.js:9
less: css generated in 665ms less-1.4.2.min.js:9
Warning: 'new NativeFileSystem.FileEntry()' is deprecated. Use 'FileSystem.getFileForPath()' instead NativeFileSystem.js:42
Warning: 'NativeFileSystem.requestNativeFileSystem()' is deprecated. Use 'FileSystem.resolve()' instead NativeFileSystem.js:42
Warning: 'Directory.createReader()' is deprecated. Use 'Directory.getContents()' instead NativeFileSystem.js:42
Warning: FileUtils.canonicalizeFolderPath() is deprecated. Use paths ending in '/' if possible, like Directory.fullPath FileUtils.js:239
Warning: 'new NativeFileSystem.DirectoryEntry()' is deprecated. Use 'FileSystem.getDirectoryForPath()' instead NativeFileSystem.js:42
Warning: 'Directory.getFile()' is deprecated. Use 'FileSystem.resolve()' instead NativeFileSystem.js:42
Warning: FileUtils.canonicalizeFolderPath() is deprecated. Use paths ending in '/' if possible, like Directory.fullPath FileUtils.js:239
Warning: 'new NativeFileSystem.DirectoryEntry()' is deprecated. Use 'FileSystem.getDirectoryForPath()' instead NativeFileSystem.js:42
Warning: 'Directory.getFile()' is deprecated. Use 'FileSystem.resolve()' instead NativeFileSystem.js:42
C:/Users/martinz/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/main.js linterManager.js:75
Warning: 'new NativeFileSystem.DirectoryEntry()' is deprecated. Use 'FileSystem.getDirectoryForPath()' instead NativeFileSystem.js:42
Warning: 'Directory.getFile()' is deprecated. Use 'FileSystem.resolve()' instead NativeFileSystem.js:42
Failed to watch root:  C:/Users/martinz/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/ Max connection attempts reached FileSystem.js:857
Error watching project root:  C:/Users/martinz/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/ Max connection attempts reached ProjectManager.js:987
[brackets-git] ExpectedError: Max connection attempts reached ErrorHandler.js:36
Error
    at Object.<anonymous> (file:///C:/Users/martinz/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/src/ExpectedError.js:11:31)
    at Object.context.execCb (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:1635:33)
    at Object.Module.check (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:866:55)
    at Object.Module.enable (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:1142:22)
    at Object.Module.init (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:779:26)
    at callGetModule (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:1169:63)
    at Object.context.completeLoad (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:1529:21)
    at HTMLScriptElement.context.onScriptLoad (file:///C:/DEV/github/brackets-shell/deps/cef/Release/dev/src/thirdparty/requirejs/require.js:1656:29) ErrorHandler.js:37
Member

jasonsanjose commented Feb 3, 2014

Reassigned to @bchintx.

@zaggino does this only happen on windows?

I don't see anything suspicious in the stack trace. I assume C:/DEV/github/brackets-shell/deps/cef/Release/dev/ is symlinked to the brackets git repo root. The project that is currently open is the extension itself C:/Users/martinz/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/.

Contributor

bchintx commented Feb 3, 2014

@zaggino if you're only seeing this when building on Windows, then you might need to check out @JeffryBooher 's comment here.

In a nutshell, the latest changes require that we rename 'Brackets-node.exe' back to 'node.exe'. As a result, you'll need to be sure to delete your intermediate folder deps/node before rebuilding the brackets-shell, so that it can create the correct node.exe in the Release folder.

BTW, this should only have happened in the last few days. It doesn't address the original issue described above, which seems to be reported before we change the filename.

Member

zaggino commented Feb 3, 2014

@bchintx You were right, it was related to what @JeffryBooher was talking about and not related to the original problem. Fixed now with grunt setup, will remember it next time :)

Contributor

bchintx commented Feb 3, 2014

@zaggino Glad to hear it works for you. BTW, you won't need to worry about this again, unless you checkout a commit prior to our change to rename 'node.exe'.

Still not sure what caused your originally reported issue though. Unfortunately, that error message could result from a variety of problems.

Contributor

bchintx commented Mar 20, 2014

Closing this issue as grunt setup fixed the problems experienced after the renaming of 'brackets-node.exe'.

bchintx closed this Mar 20, 2014

Member

zaggino commented Mar 20, 2014

👍 agree, I haven't seen this issue in a while now

VinuOye commented Dec 30, 2014

Am getting this error Max connection attempts reached....

error on brackets

Am completely uninstalled the brackets and the new version is installed, but am unable to install any extension.

System config.: Windows7 OS
Please pull me out of this issue...

error on brackets1

Thanks in advance.

Member

zaggino commented Dec 30, 2014

@VinuOye try disabling all the firewalls and antiviruses you have to see if it helps.

rrandom referenced this issue in rrandom/Brackets-Rust-IDE Aug 12, 2015

Open

Max connection attempts reached #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment