atom-autocomplete-php icon indicating copy to clipboard operation
atom-autocomplete-php copied to clipboard

Uncaught TypeError: Cannot read property 'return' of undefined

Open cabuda opened this issue 8 years ago • 20 comments

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.4.0 System: Mac OS X 10.11.2 Thrown From: atom-autocomplete-php package, v0.18.7

Stack Trace

Uncaught TypeError: Cannot read property 'return' of undefined

At /Users/cabuda/.atom/packages/atom-autocomplete-php/lib/tooltip/function-provider.coffee:29

TypeError: Cannot read property 'return' of undefined
    at FunctionProvider.module.exports.FunctionProvider.getTooltipForWord (/Users/cabuda/.atom/packages/atom-autocomplete-php/lib/tooltip/function-provider.coffee:29:9)
    at FunctionProvider.module.exports.AbstractProvider.showPopoverFor (/Users/cabuda/.atom/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:109:24)
    at HTMLSpanElement.<anonymous> (/Users/cabuda/.atom/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:78:22)
    at HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -1:53.7.0 fuzzy-finder:toggle-file-finder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:51.6.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:51.6.0 core:cancel (atom-text-editor.editor.mini.is-focused)
  2x -1:47.1.0 fuzzy-finder:toggle-file-finder (atom-pane.pane.active)
  3x -1:41.1.0 settings-view:open (atom-pane.pane.active)

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "seti-syntax"
    ]
  },
  "atom-autocomplete-php": {}
}

Installed Packages

# User
atom-autocomplete-php, v0.18.7
atom-material-ui, v0.8.0
autocomplete-php, v0.3.7
color-picker, v2.0.14
dash, v1.6.0
docblockr, v0.7.3
file-icons, v1.6.13
language-ini, v1.14.0
language-volt, v0.2.2
linter, v1.11.3
minimap, v4.19.0
seti-syntax, v0.4.1

# Dev
No dev packages

cabuda avatar Jan 18 '16 09:01 cabuda

Getting the same error too.

manuel-huez avatar Feb 09 '16 12:02 manuel-huez

same error

coskunkazanci avatar Feb 10 '16 22:02 coskunkazanci

Also getting this, but only since today. Let me know if there's more information that will be helpful.

Dayjo avatar Feb 17 '16 11:02 Dayjo

This issue suddenly started to occur to me very frequently since this morning. Never happened before though.

ktogo avatar Feb 24 '16 05:02 ktogo

Same here on ubuntu. Started noticing this issue today.

victorpierredev avatar Mar 02 '16 17:03 victorpierredev

Also getting this error, once it happens the first time I see it very frequently. Closing and re-opening atom seems to settle it for a while.

Joe1992w avatar Mar 11 '16 08:03 Joe1992w

Getting this error a lot, starting to get annoying

sheadawson avatar Mar 17 '16 01:03 sheadawson

same mac os laravel

JKair avatar Mar 17 '16 03:03 JKair

Possibly just a matter of some type checking on this line?

https://github.com/Peekmo/atom-autocomplete-php/blob/master/lib/tooltip/function-provider.coffee#L29

Dayjo avatar Mar 17 '16 09:03 Dayjo

same here, atom 1.4

anothergituser avatar Mar 18 '16 10:03 anothergituser

Not sure if it helps, using Laravel and getting this error when hovering over find($id) section of this code. It is interacting with a Eloquent model.

if(Testimonial::find($id)->delete()) {

VizuaaLOG avatar Mar 20 '16 14:03 VizuaaLOG

I was also using Laravel when getting the error. It seems to have stopped for me.

victorpierredev avatar Mar 20 '16 14:03 victorpierredev

I also was working with Laravel

Dayjo avatar Mar 21 '16 14:03 Dayjo

Can confirm what @vpakg and @Dayjo are saying, seems to have stopped for me as well. Although I am on a different machine. Has this been fixed?

VizuaaLOG avatar Mar 24 '16 20:03 VizuaaLOG

I'm not using lavarel and I can reproduce the error.

yriveiro avatar Apr 15 '16 10:04 yriveiro

me too

jasonjiang123 avatar Apr 27 '16 04:04 jasonjiang123

atom-autocomplete-php package has an exception on .atom/packages/atom-autocomplete-php/lib/tooltip/function-provider.coffee:29 This caused whenever I call find method in my php class file. Seems like my code is conflicting with the atom script.

Platform: Mac OSX Application : Laravel 5.2 Reproduce bug: declare or call find method in your php class ex: return User::find($id); $this->user->find();

nsatheesh87 avatar May 03 '16 03:05 nsatheesh87

me too...sigh..............

namsir avatar May 05 '16 14:05 namsir

Since update to Atom 1.9.2, i've this error very often :

Atom Version: 1.9.4 System: Mac OS X 10.11.6 Thrown From: atom-autocomplete-php package, v0.18.9

Stack Trace

Uncaught TypeError: Cannot read property 'return' of undefined

At /Users/florent/.atom/packages/atom-autocomplete-php/lib/tooltip/function-provider.coffee:29

TypeError: Cannot read property 'return' of undefined
    at FunctionProvider.module.exports.FunctionProvider.getTooltipForWord (/Users/florent/.atom/packages/atom-autocomplete-php/lib/tooltip/function-provider.coffee:29:9)
    at FunctionProvider.module.exports.AbstractProvider.showPopoverFor (/Users/florent/.atom/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:109:24)
    at HTMLSpanElement.<anonymous> (/Users/florent/.atom/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:78:22)
    at HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -5:49.5.0 core:copy (atom-text-editor.editor.is-focused)
     -5:42.7.0 core:save (atom-text-editor.editor.is-focused)
     -2:03.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:03.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:44.7.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
     -0:44.7.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:43.3.0 markdown-writer:indent-list-line (atom-text-editor.editor.is-focused)
     -0:43.3.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:43.3.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:43.3.0 editor:indent (atom-text-editor.editor.is-focused)
  3x -0:38.6.0 core:move-right (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:37.8.0 core:move-left (atom-text-editor.editor.is-focused)
  2x -0:35.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:29.4.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:28.8.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:28.1.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "ruby-block-converter",
      "tree-view-open-files",
      "w3c-validation",
      "compare-files",
      "my-utils",
      "rsense",
      "coffee-lint",
      "linter-coffeescript",
      "ruby-string-interpolation2",
      "ruby-string-interpolation",
      "copy-as-rtf",
      "markdown-format"
    ],
    "excludeVcsIgnoredPaths": false
  },
  "atom-autocomplete-php": {
    "binComposer": "/opt/boxen/phpenv/bin/composer",
    "binPhp": "/opt/boxen/phpenv/shims/php"
  }
}

Installed Packages

# User
api-docs, v0.0.6 (active)
apidoc-snippets, v0.1.1 (active)
atom-autocomplete-php, v0.18.9 (active)
atom-beautify, v0.29.10 (active)
atom-rdefs, v0.1.4 (inactive)
atom-runner, v2.6.0 (inactive)
atom-shell-commands, v1.4.1 (active)
autoclose-html, v0.23.0 (active)
autocomplete-json, v5.1.0 (active)
behat-atom, v0.1.2 (active)
behat-fr-atom, v0.2.1 (inactive)
behat-tools, v1.0.3 (inactive)
composer, v0.5.0 (inactive)
erb-helper, v1.0.1 (inactive)
git-control, v0.8.2 (inactive)
git-log, v0.4.1 (active)
jshint, v1.8.5 (active)
jsonlint, v1.1.4 (active)
language-diff, v0.4.0 (active)
language-haml, v0.24.0 (active)
language-slim, v0.5.0 (active)
language-twig, v1.6.3 (active)
less-than-slash, v0.16.0 (active)
linter, v1.11.14 (active)
linter-coffeelint, v1.1.2 (active)
linter-csslint, v1.3.2 (active)
linter-flow, v5.4.0 (active)
linter-haml, v1.2.1 (active)
linter-js-yaml, v1.2.5 (active)
linter-php, v1.2.0 (active)
linter-phpcs, v1.4.0 (active)
linter-rubocop, v0.4.7 (active)
linter-ruby, v1.2.2 (active)
linter-scss-lint, v3.0.4 (active)
linter-slim, v1.0.0 (active)
markdown-format, v2.5.1 (inactive)
markdown-helpers, v0.3.0 (inactive)
markdown-pdf, v1.5.0 (inactive)
markdown-writer, v2.5.1 (active)
php-twig, v4.0.0 (active)
phpunit, v1.2.0 (active)
phpunit-snippets, v0.1.0 (active)
preview-plus, v1.2.7 (active)
project-manager, v2.9.7 (active)
project-quick-open, v0.5.0 (inactive)
rails-i18n-autocomplete, v0.4.0 (active)
rails-partials, v0.9.2 (inactive)
rails-snippets, v2.7.0 (inactive)
rails-transporter, v1.6.5 (inactive)
ruby-string-interpolation-atom-1, v0.2.0 (inactive)
save-session, v0.16.0 (active)
script, v3.8.3 (inactive)
symbols-tree-view, v0.13.2 (active)
symfony-snippets, v0.3.0 (active)
sync-settings, v0.7.2 (active)
text-manipulation, v0.6.0 (active)
toggle-quotes, v1.0.0 (inactive)
xml-formatter, v0.10.0 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (active)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (active)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.38.2 (active)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.0 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.0 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

atalargo avatar Aug 05 '16 09:08 atalargo

Any progress of this bug?

alvarose avatar Jul 29 '20 09:07 alvarose