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

Websocket connection failed #75

Open
AdriVanHoudt opened this issue Jan 23, 2015 · 9 comments
Open

Websocket connection failed #75

AdriVanHoudt opened this issue Jan 23, 2015 · 9 comments

Comments

@AdriVanHoudt
Copy link
Contributor

While doing nothing Theseus keeps throwing errors in console

And in text. (1076 is the counter btw)

1076 /C:/Users/adri/AppData/Roaming/Brackets/extensions/user/theseus/src/Agent-node.js:61 WebSocket connection to 'ws://localhost:8888/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

.

@Robbson
Copy link

Robbson commented Jan 25, 2015

It's the same here. I tested it on two different Windows 7 64 machines and on OSX. It makes debugging using the javascript console useless because it gets floatet with those error messages. Also it seems to slow down Theseus.

@AdriVanHoudt
Copy link
Contributor Author

Yeah apart from being annoying it throwing errors all the time can't be good for performance. If this is intended behaviour it should silently fail

@alltom
Copy link
Member

alltom commented Jan 28, 2015

Patches welcome! I don't know how to fix this easily.

The smallest-change fix (which I can't figure out) would be to squelch the error somehow, because it's completely benign. However, it happens asynchronously, so there's nothing to try-catch. I search the web every so often for a way and haven't found a fix. There's an error handler on the socket, but Chrome logs it anyway.

A patch-it-over but still small fix would be to stop trying to connect when Theseus is disabled. At least then you could disable Theseus to mute these errors. This would be less surprising behavior for the automatic retries anyway.

Eventually I hope to flip the connection so that the debugging server is run in Brackets and the debugged process repeatedly tries to connect to Brackets, instead of the other way around, which is how it works now. Then there'd be no connection failed errors in Brackets ever. :)

@AdriVanHoudt
Copy link
Contributor Author

Apperently those errors are by design https://groups.google.com/a/chromium.org/d/msg/chromium-html5/4G_XqPQQFX8/Yt4YN5DiQ0EJ post is from 2011 though.

I agree that turning it around would be better, any ETA on that? 😜

@vincentf305
Copy link

ETA? I am still seeing this issue

@alltom
Copy link
Member

alltom commented Aug 16, 2015

AdriVanHoudt + vincentfaller: If you could stop the warnings by temporarily disabling Theseus from the File menu, would that be enough to fix your workflow, or do you need the bigger fix?

The small fix is to just check main.isEnabled() here, so its ETA would be pretty short, but the larger fix is kinda huge.

(Sorry for the delay. I was away for the summer.)

@AdriVanHoudt
Copy link
Contributor Author

@alltom tbh I use node-inspector now but temp disabling it when you turn of theseus in the menu would indeed be a fine solution for me

@Eagleheart
Copy link

Eagleheart commented Jul 5, 2016

I am experiencing this same issue. Agent-node.js:61 WebSocket connection to 'ws://localhost:8888/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED repeatedly shows up in my console when theseus is installed, even when no program is running or when theseus is set to off. Is this going to be fixed soon?

@Michaelvdlnz
Copy link

Fixed for me after reboot.

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

No branches or pull requests

6 participants