atom / autocomplete-plus

View and insert possible completions in the editor while typing
MIT License
960 stars 263 forks source link

Uncaught TypeError: undefined is not a function #556

Closed villimagg closed 9 years ago

villimagg commented 9 years ago

/home/vmag/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:67

Stack Trace:

TypeError: undefined is not a function
  at SymbolProvider.module.exports.SymbolProvider.watchEditor (/home/vmag/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:67:38)
  at /home/vmag/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:3:1
  at Workspace.module.exports.Workspace.observeTextEditors (/usr/local/share/atom/resources/app/src/workspace.js:265:9)
  at new SymbolProvider (/home/vmag/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:47:39)
  at ProviderManager.module.exports.ProviderManager.toggleDefaultProvider (/home/vmag/.atom/packages/autocomplete-plus/lib/provider-manager.coffee:77:32)
  at ProviderManager.toggleDefaultProvider (/home/vmag/.atom/packages/autocomplete-plus/lib/provider-manager.coffee:1:1)
  at /home/vmag/.atom/packages/autocomplete-plus/lib/provider-manager.coffee:29:99
  at Config.module.exports.Config.observeKeyPath (/usr/local/share/atom/resources/app/src/config.js:568:7)
  at Config.module.exports.Config.observe (/usr/local/share/atom/resources/app/src/config.js:134:21)
  at new ProviderManager (/home/vmag/.atom/packages/autocomplete-plus/lib/provider-manager.coffee:29:36)
  at new AutocompleteManager (/home/vmag/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:37:24)
  at Object.module.exports.getAutocompleteManager (/home/vmag/.atom/packages/autocomplete-plus/lib/main.coffee:135:34)
  at Immediate._onImmediate (/home/vmag/.atom/packages/autocomplete-plus/lib/main.coffee:129:32)
  at processImmediate [as _immediateCallback] (timers.js:374:17)

'uname -a' gives me: "Linux coderat.localdomain 4.0.8-300.fc22.x86_64 #1 SMP Fri Jul 10 21:04:56 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux"

Running Fedora 22.

node -v: v0.12.0 npm -v: 2.13.0

benogle commented 9 years ago

Was there a red popup? It should have a 'create issue' button, and a copy link next to the button. Can you paste in the result of the copy button? It provides a lot more information.

villimagg commented 9 years ago

There was a red popup, and the 'create issue' button was there also, but it only brought me to a page which said that the page took too long to load, so I created this issue here and copy/pasted the stack trace from the red popup.

However... I was running version 0.165 of Atom and only found out after this issue that version 1.0 had recently been released. So I downloaded Atom v1.0 installed it, updated node to v0.12.7 (the latest), and then everything work out well.

I would consider this issue closed then. Thank you!

robjac commented 9 years ago

Hey all, I'm still getting this:

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.4 System: Mac OS X 10.10.4 Thrown From: autocomplete-plus package, v2.19.0

Stack Trace

Uncaught TypeError: undefined is not a function

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:760

TypeError: undefined is not a function
  at Symbol.removeInstance (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:92:44)
  at SymbolStore.module.exports.SymbolStore.removeSymbol (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:335:16)
  at SymbolStore.removeSymbol (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:3:61)
  at SymbolStore.module.exports.SymbolStore.removeToken (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:274:16)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:3:61
  at SymbolStore.module.exports.SymbolStore.operateOnTokensInBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:302:13)
  at SymbolStore.module.exports.SymbolStore.removeTokensInBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-store.js:284:19)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:117:33
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyChange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:602:20)
  at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:789:16)
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:758:14)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1155:26)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:776:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2023:18)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1993:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:774:19)
  at TextEditor.module.exports.TextEditor.insertText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:737:19)
  at TextEditor.object.(anonymous function) [as insertText] (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at TextEditor.module.exports.TextEditor.insertNewline (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:755:19)
  at TextEditor.object.(anonymous function) [as insertNewline] (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at TextEditor.atom.commands.add.stopEventPropagationAndGroupUndo.editor:newline (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:626:19)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:320:34
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:755:18)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1155:26)
  at atom-text-editor.newCommandListeners.(anonymous function) (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:319:22)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)

Commands

     -0:42 gibber:toggle (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
  2x -0:21.3.0 vim-mode:move-left (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:13.7.0 vim-mode:move-right (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:13.1.0 vim-mode:activate-insert-mode (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:12.3.0 core:move-down (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
     -0:11.6.0 core:move-left (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
     -0:10.5.0 editor:newline (atom-text-editor.editor.vim-mode.is-focused.insert-mode)

Config

{
  "core": {
    "themes": [
      "isotope-ui",
      "slontech-syntax"
    ],
    "disabledPackages": [
      "tree-view-breadcrumb",
      "supercollider",
      "line-count",
      "highlight-css-color",
      "atom-jade",
      "processing-language",
      "language-supercollider"
    ],
    "projectHome": "~/DEV/"
  },
  "autocomplete-plus": {
    "confirmCompletion": "tab and enter"
  }
}

Installed Packages

# User
Package-Upgrader, v0.3.1
angularjs, v0.3.0
atom-beautify, vundefined
auto-indent, v0.5.0
auto-update-packages, v1.0.0
autocomplete-paths, v1.0.2
color-gutter, v0.4.1
color-picker, v2.0.11
css-color-underline, v1.0.1
emmet, vundefined
gibber, v0.1.3
highlight-column, v0.5.0
highlight-line, v0.11.0
isotope-ui, v2.5.1
language-jade, v0.6.2
linter, vundefined
linter-csslint, v1.0.1
linter-jscs, v2.0.4
minimap, v4.12.2
minimap-bookmarks, v0.1.0
minimap-color-highlight, v4.1.4
minimap-find-and-replace, v4.2.0
minimap-git-diff, v4.1.7
minimap-highlight-selected, v4.3.0
minimap-selection, v4.3.0
project-manager, v1.15.11
react, v0.12.6
settings-view, v0.212.0
slontech-syntax, v0.7.7
vim-mode, v0.57.0

# Dev
No dev packages
nilsmagnus commented 9 years ago

I am still getting this, this is not invalid:

Uncaught TypeError: undefined is not a function
/home/<user>/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:70
Show Stack Trace
The error was thrown from the autocomplete-plus package. 

Atom v 0.177.0 , autocomplete-plus v 2.23.0, go-plus v 3.5.1, atom-beautify v 0.28.14 Ubuntu

winstliu commented 9 years ago

@nilsmagnus You are more than 40 versions behind - please update to Atom 1.0.19 and see if you can still reproduce this.

nilsmagnus commented 9 years ago

Thanks, seems like Ubuntu is way behind here...