GhostText / GhostText-for-Atom

Allows live editing of Chrome/Firefox text area or JS Code editor content with Atom using WebSockets
MIT License
40 stars 4 forks source link

Tries to listen on port 4001 again when second window opens. #4

Open TakafumiKoyama opened 8 years ago

TakafumiKoyama commented 8 years ago

Thank you for the great plug-in! Here is a bug I found, if it's helpful. [Enter steps to reproduce below:]

  1. Open a window.
  2. Open another window.

Atom Version: 1.8.0 System: Mac OS X 10.11.5 Thrown From: ghost-text package, v0.0.1

Stack Trace

Uncaught Error: listen EADDRINUSE :::4001

At events.js:141

Error: listen EADDRINUSE :::4001
    at Object.exports._errnoException (util.js:856:11)
    at exports._exceptionWithHostPort (util.js:879:20)
    at Server._listen2 (net.js:1234:14)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1366:5)
    at Object.module.exports.activate (/Users/koyama/.atom/packages/ghost-text/lib/ghost-text.coffee:73:23)
    at Package.module.exports.Package.activateNow (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package.js:183:20)
    at /opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package.js:156:32
    at Package.module.exports.Package.measure (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
    at /opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package.js:149:26
    at Package.module.exports.Package.activate (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package.js:146:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package-manager.js:538:21)
    at /opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package-manager.js:519:29
    at Config.module.exports.Config.transactAsync (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package-manager.js:514:19)
    at PackageManager.module.exports.PackageManager.activate (/opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/package-manager.js:497:46)
    at /opt/homebrew-cask/Caskroom/atom/1.6.2/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:754:28

Commands

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "piatto-light"
    ]
  }
}

Installed Packages

# User
atom-jshint, v2.0.0
atom-material-ui, v1.2.13
autocomplete-python, v1.8.1
emacs-flow, v0.1.2
file-icons, v1.7.14
linter, v1.11.10
linter-pylint, v1.2.0
markdown-scroll-sync, v2.1.2
piatto-light, v2.0.2
project-manager, v2.9.7
save-session, v0.15.7
sync-settings, v0.7.2
tab-control, v0.6.9
transient-emacs, v0.8.5

# Dev
No dev packages
RustyDev commented 6 years ago

Getting this error as well. Any update on this?

awilkins commented 6 years ago

Quickest way I can think of fixing this is to have the plugin create a small external server that listens for connections from the browser extension, that the Atom windows use as a hub for comms.

Workaround is that you'll only be able to ghost edit in your first Atom window.


I'm guessing that most solutions for this might involve revising the protocols of GhostText a bit as well.

My other thought was that this would seem to be a great fit for the Teletype package - a Teletype extension for browsers that could create a session and let you join from Atom and edit textareas would seem to be very doable, and sort out the port problems. But this of course is currently specific to Atom.