fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.32k stars 115 forks source link

Connection Error (Win7x64 + Chrome 40.0.2214.115 + Sublime Text 3 b.: 3065) #46

Closed usrbowe closed 9 years ago

usrbowe commented 9 years ago

Hi,

I am having problem when I close opened file via GhostText in Chrome. After closing file in Sublime, I see error popup with text: GhostText: Connection error. Make sure that Sublime Text is open and has GhostText installed. Try closing and opening it and try again. Make sure that the port matches (4001 is the default). See if there are any errors in Sublime Text's console

So I looked at Sublime console a here is this (looks like everything is ok): GhostText is starting now… Setting on request handler HTTP Start WebSocketServer id: 1 Setting on message handler Setting on close handler Start Listening on: 51017 WebSocketServer id: 2 Setting on message handler Setting on close handler Start Listening on: 51021 Bind view with id: 20 Setting on message handler Package Control: Skipping automatic upgrade, last run at 2015-02-23 14:03:43, next run at 2015-02-23 15:03:43 or after View with id: 20 closed Triggering on_close Unbind view with id: 20 Unbind view with id: 20 Stop Triggering on_close

Otherwise plugin works fine, I can edit textareas via Sublime and it reflects my changes, so there is only problem with this annoying message.

Anyway really great addon! :)

usrbowe commented 9 years ago

Ok, I found that this occurs only in my internal web-based CMS editor. Is there way how can I debug this behaviour? It works everywhere else, but not in this CMS... Sadly I installed this plugin mainly for usage with our CMS...

usrbowe commented 9 years ago

Also I noticed that if I click in popup on "Leave review" and came back to page where this popup appears I will get Connection error.

usrbowe commented 9 years ago

I partly solved the problem, when I am not closing file in Sublime and using only keyboard shortcut SHIFT+ALT+K to disconnect it works like a charm :+1:

Cacodaimon commented 9 years ago

It's a bug how the WebSocket Server sends the terminate frame and I will fix it soon.

Cacodaimon commented 9 years ago

There is a new release which should fixes this bug.