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

Uncaught TypeError: Cannot read property 'getText' of null #58

Closed
ryanaltvater opened this issue Aug 4, 2015 · 7 comments
Closed

Uncaught TypeError: Cannot read property 'getText' of null #58

ryanaltvater opened this issue Aug 4, 2015 · 7 comments

Comments

@ryanaltvater
Copy link

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.3
System: Mac OS X 10.10.4
Thrown From: atom-pair package, v2.0.1

Stack Trace

Uncaught TypeError: Cannot read property 'getText' of null

At /Users/raltvater/.atom/packages/atom-pair/lib/modules/share_pane.coffee:164

TypeError: Cannot read property 'getText' of null
  at SharePane.module.exports.SharePane.shareFile (/Users/raltvater/.atom/packages/atom-pair/lib/modules/share_pane.coffee:164:26)
  at /Users/raltvater/.atom/packages/atom-pair/lib/atom_pair.coffee:179:17
  at PresenceChannel.prototype.emit (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at PresenceChannel.prototype.handleEvent (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:3713:6)
  at PresenceChannel.prototype.handleEvent (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:3831:51)
  at /Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:74:9
  at ConnectionManager.prototype.emit (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at message (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:3420:6)
  at Connection.prototype.emit (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at listeners.message (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:3048:8)
  at TransportConnection.prototype.emit (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at TransportConnection.prototype.onMessage (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:2210:6)
  at WebSocket.self.socket.onmessage (/Users/raltvater/.atom/packages/atom-pair/lib/pusher/pusher.js:2232:6)

Commands

     -3:59.5.0 AtomPair:start new pairing session (atom-text-editor#AtomPair.editor.is-focused)

Installed Packages

# User
atom-pair, v2.0.1
atom-spotify2, v2.1.2
auto-update-packages, v1.0.0
autoclose-html, v0.18.0
autocomplete-paths, v1.0.2
editorconfig, v1.0.1
emmet, v2.3.12
highlight-line, v0.11.0
linter, v1.3.0
pigments, v0.9.3
project-ring, v0.33.2
seti-syntax, v0.4.0
seti-ui, v0.7.1
sync-settings, v0.6.0
tree-view-git-status, v0.1.2
wordpress-api, v1.2.1

# Dev
No dev packages
@jpatel531
Copy link
Contributor

What was the setup when this issue occurred? This error can only mean the TextBuffer was null - but the package ensure an active TextEditors before creating a SharePane.

So a buffer must have been destroyed within a text editor. Though I'm not too sure how that could happen - especially without removing that sharepane from the pairing session.

Did you happen to have a split window? This issue might take longer to diagnose

@jpatel531
Copy link
Contributor

I suspect this is related to #52

@ryanaltvater
Copy link
Author

I didn't have a split view, no. I received this error twice, and I actually wasn't looking at Atom when it occurred. I was in Chrome and when I went back to Atom, the error notification was there. That same thing happened twice. Sorry for the lack of specific details. =\

@therealklanni
Copy link

Just ran into this as well. My buddy joined my session and he got about half of my open tabs synced to his Atom, only the last one synced had any content (note it wasn't the last tab, just the last one that synced over to his session), all tabs were titled "untitled" in buddy's Atom, all but the last-synced were empty buffers. I believe the error appeared on my end when buddy closed the empty buffers/tabs.

Incidentally, I just happened to have the Pusher debug console open, because I was trying it out and was curious. So if there's some data I can try to pull from the debug that you think might be useful, let me know, I'll keep that tab open.

@jpatel531
Copy link
Contributor

Thanks for the information! This is super helpful - I'll try recreating it later on and push a fix as soon as I can

@jpatel531
Copy link
Contributor

Hi there, I've just published 2.0.5 which should address syncing already-open files. The question of why a buffer should a null isn't completely solved yet - but let me know how this addresses the issues :)

@jpatel531 jpatel531 mentioned this issue Aug 9, 2015
@therealklanni
Copy link

Just tried it again and got this error as soon as I joined. (2.0.5)

TypeError: undefined is not a function
    at Function.module.exports.Range.fromText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/range.js:49:20)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:539:24)
    at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:524:26
    at TextBuffer.module.exports.TextBuffer.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:755:18)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:522:21)
    at TextBuffer.module.exports.TextBuffer.setText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:459:19)
    at /Users/klanni/.atom/packages/atom-pair/lib/modules/share_pane.coffee:75:33
    at SharePane.module.exports.SharePane.withoutTrigger (/Users/klanni/.atom/packages/atom-pair/lib/modules/share_pane.coffee:131:7)
    at /Users/klanni/.atom/packages/atom-pair/lib/modules/share_pane.coffee:74:24
    at PresenceChannel.prototype.emit (/Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
    at PresenceChannel.prototype.handleEvent (/Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:3713:6)
    at PresenceChannel.prototype.handleEvent (/Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:3831:51)
    at /Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:74:9
    at ConnectionManager.prototype.emit (/Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
    at message (/Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:3420:6)
    at Connection.prototype.emit (/Users/klanni/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)

@kn100 kn100 closed this as completed Aug 30, 2017
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

4 participants