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

NodeConnection.js question #6491

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

NodeConnection.js question #6491

zaggino opened this issue Jan 12, 2014 · 12 comments
Assignees

Comments

@zaggino
Copy link
Contributor

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

@ghost ghost assigned jasonsanjose Jan 13, 2014
@njx
Copy link
Contributor

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.

@zaggino
Copy link
Contributor Author

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):
brackets-userland/brackets-git#39
brackets-userland/brackets-git#40
brackets-userland/brackets-git#49
brackets-userland/brackets-git#62
brackets-userland/brackets-git#64
brackets-userland/brackets-git#65
brackets-userland/brackets-git#67
brackets-userland/brackets-git#76
brackets-userland/brackets-git#77

@zaggino
Copy link
Contributor Author

zaggino commented Jan 14, 2014

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

@zaggino
Copy link
Contributor Author

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

@jasonsanjose
Copy link
Member

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/.

@bchintx
Copy link
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.

@zaggino
Copy link
Contributor Author

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 :)

@bchintx
Copy link
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.

@bchintx
Copy link
Contributor

bchintx commented Mar 20, 2014

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

@bchintx bchintx closed this as completed Mar 20, 2014
@zaggino
Copy link
Contributor Author

zaggino commented Mar 20, 2014

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

@VinuOye
Copy link

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.

@zaggino
Copy link
Contributor Author

zaggino commented Dec 30, 2014

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

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

5 participants