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 'getGrammar' of null #52

Closed
addy opened this issue Jul 16, 2015 · 2 comments
Closed

Uncaught TypeError: Cannot read property 'getGrammar' of null #52

addy opened this issue Jul 16, 2015 · 2 comments

Comments

@addy
Copy link

addy commented Jul 16, 2015

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.2
System: Mac OS X 10.10.3
Thrown From: atom-pair package, v1.1.6

Stack Trace

Uncaught TypeError: Cannot read property 'getGrammar' of null

At /Users/addisons/.atom/packages/atom-pair/lib/modules/grammar_sync.coffee:6

TypeError: Cannot read property 'getGrammar' of null
  at Object.module.exports.GrammarSync.sendGrammar (/Users/addisons/.atom/packages/atom-pair/lib/modules/grammar_sync.coffee:6:22)
  at /Users/addisons/.atom/packages/atom-pair/lib/atom_pair.coffee:174:8
  at PresenceChannel.prototype.emit (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at PresenceChannel.prototype.handleEvent (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:3822:8)
  at /Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:74:9
  at ConnectionManager.prototype.emit (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at message (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:3420:6)
  at Connection.prototype.emit (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at listeners.message (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:3048:8)
  at TransportConnection.prototype.emit (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:855:17)
  at TransportConnection.prototype.onMessage (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:2210:6)
  at WebSocket.self.socket.onmessage (/Users/addisons/.atom/packages/atom-pair/lib/pusher/pusher.js:2232:6)

Commands

     -4:52.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -4:16.8.0 command-palette:toggle (div.settings-view.pane-item)
     -4:12.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -4:12.4.0 AtomPair:start new pairing session (div.settings-view.pane-item)
     -4:04.1.0 AtomPair:copyid (div.session-id)
     -2:59.4.0 editor:newline (atom-text-editor#AtomPair.editor.is-focused)
     -2:33.4.0 command-palette:toggle (atom-text-editor#AtomPair.editor.is-focused)
  4x -2:30.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:27.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:27.3.0 AtomPair:start new pairing session (atom-text-editor#AtomPair.editor)
     -2:24 AtomPair:copyid (div.session-id)
     -1:12 application:new-file (ul.list-inline.tab-bar.inset-panel)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "midnight-picnic"
    ]
  }
}

Installed Packages

# User
atom-pair, v1.1.6
midnight-picnic, v1.0.0

# Dev
No dev packages
@jpatel531
Copy link
Contributor

Ah gee - it looks like there isn't an active editor. Were you on a non-editor page, e.g. the config/packages page when this occurred? I think the package tries to ensure an active editor, but I might have missed a case

@addy
Copy link
Author

addy commented Jul 21, 2015

There's a high chance I was in a non-editor page but I remember being just in an untitled editor when I was testing with a friend. The text would duplicate from his to my editor like 5x. so 'Hello' would become 'HHHHHeeeeelllllooooo'

I'll try to recreate it again later if you want more info. Probably a freak edge case.

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

3 participants