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 'getTokenIterator' of undefined #650

Closed
minicast opened this issue Jun 27, 2015 · 25 comments
Closed

Comments

@minicast
Copy link

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.0-3874576
System: Ubuntu 15.04
Thrown From: linter package, v1.0.9

Stack Trace

Uncaught TypeError: Cannot read property 'getTokenIterator' of undefined

At /usr/local/share/atom/resources/app.asar/src/tokenized-buffer.js:660

TypeError: Cannot read property 'getTokenIterator' of undefined
    at TokenizedBuffer.module.exports.TokenizedBuffer.scopeDescriptorForPosition (/usr/local/share/atom/resources/app.asar/src/tokenized-buffer.js:660:42)
    at DisplayBuffer.module.exports.DisplayBuffer.scopeDescriptorForBufferPosition (/usr/local/share/atom/resources/app.asar/src/display-buffer.js:1135:35)
    at TextEditor.module.exports.TextEditor.scopeDescriptorForBufferPosition (/usr/local/share/atom/resources/app.asar/src/text-editor.js:2281:33)
    at EditorLinter.lint (/home/minicast/.atom/packages/linter/lib/editor-linter.coffee:101:28)
    at /home/minicast/.atom/packages/linter/lib/editor-linter.coffee:34:26
    at Emitter.module.exports.Emitter.emit (/usr/local/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at /usr/local/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1183:25

Commands

Config

{
  "core": {
    "themes": [
      "atom-light-ui",
      "solarized-light-syntax"
    ],
    "disabledPackages": [
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-go",
      "language-java",
      "language-objective-c",
      "language-yaml",
      "language-toml",
      "linter-jscs",
      "linter-jshint",
      "tree-view"
    ]
  },
  "linter": {}
}

Installed Packages

# User
atom-zeal, v0.1.3
linter, v1.0.9
linter-coffeelint, v0.3.2
linter-eslint, v1.0.8
make-coffee, v0.1.1
meteor-api, v2.19.0
minimap, v4.10.0
nuclide-code-format, v0.0.22
nuclide-diff-view, v0.0.22
nuclide-file-tree, v0.0.22
nuclide-file-watcher, v0.0.22
nuclide-flow, v0.0.22
nuclide-hack, v0.0.22
nuclide-hg-repository, v0.0.22
nuclide-installer, v0.0.22
nuclide-language-hack, v0.0.22
nuclide-remote-projects, v0.0.22
nuclide-type-hint, v0.0.22

# Dev
No dev packages
@keplersj
Copy link
Contributor

What were you attempting to do when this error occurred?

@steelbrain
Copy link
Owner

Can you please provide a minimal repro case?

@minicast
Copy link
Author

The error appeared just after starting up the program (i did not have
time to do anything specific).

On 27/06/15 22:32, Kepler Sticka-Jones wrote:

What were you attempting to do when this error occurred?


Reply to this email directly or view it on GitHub
#650 (comment).

@aberba
Copy link

aberba commented Jun 29, 2015

Yes same here. The error just pops up right after startup in the notification dialog.

@iam4x
Copy link
Contributor

iam4x commented Jun 29, 2015

@minicast @Karabuta Are you using Nuclide?

(@steelbrain you are using nuclide too right?)

@steelbrain
Copy link
Owner

@iam4x I have friends that have tested it without encountering this bug. I tried like a week ago and this bug wasn't there.
Not sure what the 'cause is.

@iam4x
Copy link
Contributor

iam4x commented Jun 29, 2015

@steelbrain Going to try nuclide with the same packages.

@steelbrain
Copy link
Owner

👍

@iam4x
Copy link
Contributor

iam4x commented Jun 29, 2015

Are you using Ubuntu @Karabuta ?

@minicast
Copy link
Author

yes, i had nuclide when the error occurred (full packages-list included
in report)

On 29/06/15 17:35, Maxime Tyler wrote:

@minicast https://github.com/minicast @Karabuta
https://github.com/karabuta Are you using Nuclide?

(@steelbrain https://github.com/steelbrain you are using nuclide too
right?)


Reply to this email directly or view it on GitHub
#650 (comment).

@Eschon
Copy link

Eschon commented Jun 30, 2015

I started up Atom in with atom . in my project folder and when the window opened I got this error. It startet on a .js file if maybe that has to do with it and I don't use nuclide.

Atom Version: 1.0.0
System: Mac OS X 10.10.3
Thrown From: linter package, v1.1.0

Stack Trace

Uncaught TypeError: Cannot read property 'getTokenIterator' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:660

TypeError: Cannot read property 'getTokenIterator' of undefined
    at TokenizedBuffer.module.exports.TokenizedBuffer.scopeDescriptorForPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:660:42)
    at DisplayBuffer.module.exports.DisplayBuffer.scopeDescriptorForBufferPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1135:35)
    at TextEditor.module.exports.TextEditor.scopeDescriptorForBufferPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2281:33)
    at EditorLinter.lint (/Users/egon/.atom/packages/linter/lib/editor-linter.coffee:106:28)
    at /Users/egon/.atom/packages/linter/lib/editor-linter.coffee:39:26
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1183:25

Commands

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "solarized-dark-syntax"
    ],
    "disabledPackages": [
      "image-view",
      "background-tips",
      "language-go",
      "language-less",
      "language-property-list",
      "language-todo",
      "language-toml",
      "spell-check",
      "bookmarks",
      "welcome",
      "autoflow",
      "markdown-preview",
      "go-to-line",
      "language-c",
      "language-csharp",
      "language-java",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-python",
      "package-generator",
      "linter-tidy"
    ]
  },
  "linter": {
    "showInfoMessages": true,
    "subtleLinterErrors": [
      "jscs",
      "jshint"
    ],
    "clearOnChange": true,
    "showHighlighting": false,
    "defaultErrorTab": "Line",
    "showErrorTabLine": true,
    "showErrorTabProject": false,
    "showErrorInline": false
  }
}

Installed Packages

# User
atom-handlebars, v0.5.0
atom-ternjs, v0.6.7
color-picker, v2.0.7
linter, v1.1.0
linter-csslint, v0.0.14
linter-jscs, v1.12.0
linter-jshint, v0.1.7
linter-rubocop, v0.2.7
linter-xmllint, v0.0.7
pretty-json, v0.4.1
tabs-to-spaces, v0.11.0

# Dev
No dev packages

@steelbrain
Copy link
Owner

I know what the problem is, and I have a fix planned.

@lazdmx
Copy link

lazdmx commented Jun 30, 2015

👍

@steelbrain
Copy link
Owner

I think this is fixed by #664
can someone confirm?

@Eschon
Copy link

Eschon commented Jul 10, 2015

Is this fix released? Just got the error again.

@steelbrain
Copy link
Owner

@Eschon could you please provide us a minimal repro case?

@Eschon
Copy link

Eschon commented Jul 10, 2015

@steelbrain I just started Atom from the command line in my project. It started on a .js file and the error appeared. There is also a second error which points to #510 but with a different stack trace.

@steelbrain
Copy link
Owner

Sounds like an upgrade issue. Can you flush your caches and retry?

@Eschon
Copy link

Eschon commented Jul 10, 2015

How do I flush my chaches in Atom?

@steelbrain
Copy link
Owner

mv ~/.atom ~/.atom-bkp
apm install linter

@Eschon
Copy link

Eschon commented Jul 10, 2015

Ok thanks, seems to work now.

@Eschon
Copy link

Eschon commented Jul 14, 2015

Suddenly the error is back now it happens on an .edn file that isn't even checked by any linter- package that I have installed as far as I know.

@steelbrain
Copy link
Owner

Does this still happen with the master branch? We've split out a lot of stuff and have super-simplified it, and I believe fixed this one along the way.

@minicast
Copy link
Author

It didn't happen to me lately

@steelbrain
Copy link
Owner

I am glad it didn't

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

No branches or pull requests

7 participants