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 'class' of undefined #408

Open
x-Scripts opened this issue Nov 15, 2019 · 3 comments
Open

Uncaught TypeError: Cannot read property 'class' of undefined #408

x-Scripts opened this issue Nov 15, 2019 · 3 comments

Comments

@x-Scripts
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.41.0 x64
Electron: 4.2.7
OS: Microsoft Windows 10 Pro
Thrown From: atom-autocomplete-php package 0.25.6

Stack Trace

Uncaught TypeError: Cannot read property 'class' of undefined

At C:\Users\Admin\.atom\packages\atom-autocomplete-php\lib\services\php-file-parser.coffee:775

TypeError: Cannot read property 'class' of undefined
    at Object.parseElements (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:775:24)
    at Object.getVariableType (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:612:34)
    at Object.parseElements (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:731:34)
    at Object.getCalledClass (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:33:17)
    at Object.getMemberContext (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:679:28)
    at FunctionProvider.module.exports.FunctionProvider.getTooltipForWord (/packages/atom-autocomplete-php/lib/tooltip/function-provider.coffee:18:25)
    at FunctionProvider.module.exports.AbstractProvider.showPopoverFor (/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:108:24)
    at /packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:77:22)
    at HTMLDivElement.dispatch (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4121:28)

Commands

 18x -3:00.1.0 intentions:highlight (input.hidden-input)
     -2:59 core:paste (input.hidden-input)
  2x -2:55.7.0 intentions:highlight (input.hidden-input)
     -2:54 core:save (input.hidden-input)
     -2:12.1.0 intentions:highlight (input.hidden-input)
     -2:11.7.0 core:cut (input.hidden-input)
  2x -2:07.6.0 intentions:highlight (input.hidden-input)
     -2:07.1.0 core:paste (input.hidden-input)
  8x -1:40.9.0 core:move-left (input.hidden-input)
     -1:30.5.0 intentions:highlight (input.hidden-input)
     -1:30.3.0 core:save (input.hidden-input)
     -0:39.3.0 autoclose-html:close-and-complete (input.hidden-input)
     -0:34.7.0 intentions:highlight (input.hidden-input)
     -0:34.1.0 core:backspace (input.hidden-input)
     -0:33.9.0 intentions:highlight (input.hidden-input)
     -0:33.7.0 core:save (input.hidden-input)

Non-Core Packages

atom-autocomplete-php 0.25.6 
atom-beautify 0.33.4 
atom-clock 0.1.17 
atom-ctags 5.1.2 
atom-debug-ui 1.0.4 
atom-ide-ui 0.13.0 
atom-java-decompiler 0.1.2 
autoclose-html 0.23.0 
autocomplete-html-entities 0.2.0 
autocomplete-php 0.3.7 
basic-java-compile 0.2.1 
busy-signal 2.0.1 
declarations 1.1.3 
emmet 2.4.3 
encrypt-decrypt 0.3.2 
file-header 1.13.9 
goto-definition 1.3.4 
html-to-elm 0.2.0 
ide-html 0.6.0 
ide-java 0.9.0 
ide-php 0.7.18 
intentions 1.1.5 
language-blade 0.44.0 
laravel-5-snippets 0.19.0 
laravel-snippets 2.1.0 
linter 2.3.1 
linter-php 1.6.1 
linter-spell-html 0.7.0 
linter-ui-default 1.8.0 
php-composer-completion 0.3.4 
php-cs-fixer 4.1.1 
php-debug 0.3.5 
teletype 0.13.4 
@alflexRH
Copy link

I am getting this issue as well on OSX since today. it was working yesterday and didnt change anything as far as i know. Same error in same file on same line.

@bastian-allenstein
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.45.0 x64
Electron: 4.2.7
OS: Mac OS X 10.15.4
Thrown From: atom-autocomplete-php package 0.25.6

Stack Trace

Uncaught TypeError: Cannot read property 'class' of undefined

At /Users/bastianallenstein/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:775

TypeError: Cannot read property 'class' of undefined
    at Object.parseElements (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:775:24)
    at Object.getCalledClass (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:33:17)
    at Object.getMemberContext (/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:679:28)
    at PropertyProvider.module.exports.PropertyProvider.getTooltipForWord (/packages/atom-autocomplete-php/lib/tooltip/property-provider.coffee:17:25)
    at PropertyProvider.module.exports.AbstractProvider.showPopoverFor (/packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:108:24)
    at /packages/atom-autocomplete-php/lib/tooltip/abstract-provider.coffee:77:22)
    at HTMLDivElement.dispatch (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -3:06.8.0 core:copy (input.hidden-input)
     -3:05.8.0 editor:newline (input.hidden-input)
  3x -3:04.9.0 core:backspace (input.hidden-input)
     -3:02.9.0 core:paste (input.hidden-input)
     -2:58.1.0 snippets:previous-tab-stop (input.hidden-input)
     -2:58.1.0 editor:outdent-selected-rows (input.hidden-input)
     -2:50.8.0 editor:toggle-line-comments (input.hidden-input)
     -2:46 editor:newline (input.hidden-input)
     -2:45.4.0 snippets:next-tab-stop (input.hidden-input)
     -2:45.4.0 snippets:expand (input.hidden-input)
     -2:45.4.0 editor:indent (input.hidden-input)
  2x -2:44.3.0 core:backspace (input.hidden-input)
     -2:22.7.0 autocomplete-plus:confirm (input.hidden-input)
     -2:22.7.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
     -2:21.1.0 core:backspace (input.hidden-input)
  2x -2:14.5.0 editor:newline (input.hidden-input)

Non-Core Packages

aligner 1.2.4 
aligner-css 1.2.1 
aligner-javascript 1.3.0 
aligner-php 1.3.0 
aligner-scss 1.3.1 
atom-alignment 0.13.0 
atom-autocomplete-php 0.25.6 
atom-beautify 0.33.4 
atom-css-clean 2.24.1 
autoclose-html 0.23.0 
autocomplete-wordpress-hooks 0.2.3 
browser-plus 0.0.98 
color-picker 2.3.0 
file-icons 2.1.39 
ide-php 0.7.18 
minimap 4.29.9 
php-cs-fixer 4.1.1 
pigments 0.40.2 
simple-drag-drop-text 0.5.0 
wordpress-autocomplete 1.5.0 

@j0sh-Z
Copy link

j0sh-Z commented Sep 29, 2020

Possible fix? Note that I never worked with coffeescript before.
I just added this before line 775:

if not methods
className = null
break

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

4 participants