atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor
https://atom.io/packages/ide-haskell
Other
232 stars 30 forks source link

Uncaught TypeError: Cannot read property 'then' of undefined #145

Closed nightuser closed 8 years ago

nightuser commented 8 years ago

Hello.

I'm getting this error when saving my .hs files. Everything was installed via stack lts-5.4.

Atom Version: 1.5.3 System: Ubuntu 14.04.4 Thrown From: ide-haskell package, v1.5.0

Stack Trace

Uncaught TypeError: Cannot read property 'then' of undefined

At /home/nightuser/.atom/packages/ide-haskell/lib/upi.coffee:132

TypeError: Cannot read property 'then' of undefined
    at /home/nightuser/.atom/packages/ide-haskell/lib/upi.coffee:132:22
    at UPIInstance.withEventRange (/home/nightuser/.atom/packages/ide-haskell/lib/upi.coffee:209:5)
    at UPIInstance.showTooltip (/home/nightuser/.atom/packages/ide-haskell/lib/upi.coffee:131:6)
    at /home/nightuser/.atom/packages/ide-haskell/lib/upi.coffee:112:8
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /home/nightuser/.atom/packages/ide-haskell/lib/plugin-manager.coffee:73:18
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at EditorControl.shouldShowTooltip (/home/nightuser/.atom/packages/ide-haskell/lib/editor-control.coffee:130:16)
    at /home/nightuser/.atom/packages/ide-haskell/lib/editor-control.coffee:71:39

Commands

     -0:50.8.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:49.6.0 script:run (atom-text-editor.editor.is-focused)
     -0:49.6.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -0:47.8.0 core:save (atom-text-editor.editor.is-focused)
     -0:47.8.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -0:37.8.0 pane:split-right (atom-text-editor.editor.is-focused)
     -0:35.9.0 core:close (atom-text-editor.editor.is-focused)
     -0:32.7.0 term3:open-split-right (atom-text-editor.editor.is-focused)
     -0:30.8.0 core:confirm (div.terminal)
  3x -0:20.8.0 ide-haskell-repl:toggle (atom-text-editor.editor.is-focused)
  2x -0:03.8.0 ide-haskell:close-tooltip (atom-text-editor.editor.is-focused)
     -0:03.6.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:03.6.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:03.3.0 ide-haskell:close-tooltip (atom-text-editor.editor.is-focused)
     -0:03.3.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:03.3.0 core:cancel (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "markdown-preview",
      "agda-mode",
      "atom-beautify",
      "atom-python-debugger",
      "build",
      "pandoc",
      "preview-inline",
      "save-session"
    ],
    "packagesWithKeymapsDisabled": [
      "build",
      "markdown-preview-plus",
      "atom-beautify"
    ],
    "projectHome": "/home/nightuser/workspaces",
    "themes": [
      "one-dark-ui",
      "base16-syntax"
    ]
  },
  "ide-haskell": {
    "onSavePrettify": true
  }
}

Installed Packages

# User
atom-ternjs, v0.13.2
autocomplete-clang, v0.8.9
autocomplete-cmake, v0.3.1
autocomplete-haskell, v0.6.2
autocomplete-python, v1.6.1
base16-syntax, v1.6.2
build-cargo, v0.12.0
build-gradle, v0.6.0
build-gulp, v0.7.0
build-make, v0.7.0
emmet, v2.4.1
file-icons, v1.6.16
haskell-ghc-mod, v1.9.0
haskell-pointfree, v0.1.3
ide-haskell, v1.5.0
ide-haskell-cabal, v1.0.0
ide-haskell-repl, v0.0.18
language-agda, v0.2.2
language-cmake, v0.1.4
language-haskell, v1.7.0
language-latex, v0.6.1
language-ocaml, v1.1.2
language-pfm, v0.82.0
language-rust, v0.4.6
latex, v0.29.0
latexer, v0.3.0
linter, v1.11.3
linter-chktex, v1.2.5
linter-clang, v3.4.4
linter-flake8, v1.12.0
linter-jshint, v2.0.2
linter-markdown, v1.5.0
linter-rust, v0.4.1
markdown-preview-plus, v2.2.2
minimap, v4.19.0
pdf-view, v0.39.0
python-tools, v0.6.7
racer, v0.18.0
script, v3.5.2
set-syntax, v0.3.0
term3, v0.21.2

# Dev
No dev packages
ghost commented 8 years ago

I'm having the same problem and was about to create an issue. I'm on OS X too, and have my dependencies installed with Cabal.

lierdakil commented 8 years ago

Thank you for reporting. Should be fixed in haskell-ghc-mod v1.9.1

bamboo commented 8 years ago

Hi, I still get this error with haskell-ghc-mod v1.9.1 when I select a type signature.

bamboo commented 8 years ago

Actually it happens whenever I select any text at all.

lierdakil commented 8 years ago

Working on that.

lierdakil commented 8 years ago

Okay, should be good now with ide-haskell 1.5.1. Sorry about that.

andrrra commented 8 years ago

I just got this same error

lierdakil commented 8 years ago

@zachbpd, could you post stack trace?

andrrra commented 8 years ago
at /Users/Andra/.atom/packages/ide-haskell/lib/upi.coffee:132

TypeError: Cannot read property 'then' of undefined
    at /Users/Andra/.atom/packages/ide-haskell/lib/upi.coffee:132:22
    at UPIInstance.withEventRange (/Users/Andra/.atom/packages/ide-haskell/lib/upi.coffee:209:5)
    at UPIInstance.showTooltip (/Users/Andra/.atom/packages/ide-haskell/lib/upi.coffee:131:6)
    at /Users/Andra/.atom/packages/ide-haskell/lib/upi.coffee:112:8
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Users/Andra/.atom/packages/ide-haskell/lib/plugin-manager.coffee:73:18
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at EditorControl.shouldShowTooltip (/Users/Andra/.atom/packages/ide-haskell/lib/editor-control.coffee:130:16)
    at /Users/Andra/.atom/packages/ide-haskell/lib/editor-control.coffee:71:39
lierdakil commented 8 years ago

Okay... Please update ide-haskell. This quite literally can not happen with v1.5.1, unless I'm an idiot.

andrrra commented 8 years ago

sorted, thanks :)

bamboo commented 8 years ago

Works great now, thank you!