You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined #475
Its happening after the latest update. Error is occurring while i type.
Atom Version: 0.196.0 System: Mac OS X 10.10.3 Thrown From: autocomplete-plus package, v2.17.0
Stack Trace
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
At /Users/developer/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:214
TypeError: Cannot read property 'toLowerCase' of undefined
at SymbolProvider.module.exports.SymbolProvider.fuzzyFilter (/Users/developer/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:214:57)
at SymbolProvider.module.exports.SymbolProvider.findSuggestionsForWord (/Users/developer/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:197:42)
at SymbolProvider.findSuggestionsForWord (/Users/developer/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:3:1)
at SymbolProvider.module.exports.SymbolProvider.getSuggestions (/Users/developer/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:183:6)
at SymbolProvider.getSuggestions (/Users/developer/.atom/packages/autocomplete-plus/lib/symbol-provider.coffee:3:1)
at /Users/developer/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:159:45
at Array.forEach (native)
at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Users/developer/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:139:15)
at AutocompleteManager.getSuggestionsFromProviders (/Users/developer/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1)
at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Users/developer/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:133:6)
at /Users/developer/.atom/packages/autocomplete-plus/lib/autocomplete-manager.coffee:1:1
I have updated atom to version (0.200.0) but the problem still persists. I have to disable auto-complete to work. Error is generating on every keypress. :(
I am unable to reproduce this, but I added a check for this case. Not sure what the root cause is. @mrameezraja if you can provide more information that would be great:
This happens to me on Atom 1.0. What @RomFouq observed also seems to be true for me - the error only occurs after typing non-alphanumeric characters or backspace. I can reproduce this by generating a new Atom package, navigating to the main lib file, and typing any non-alphanumeric character.
This also only happens when I set my minimum word length to 0. Setting it back to the default makes the issue go away.
Anyone who gets this, can you please paste in the entire error report? There are several uses of toLowerCase in the code, and i'm not sure which one is having the problem.
Go to a buffer with autocompletion enabled and type a non-numeric character
Atom Version: 1.0.0 System: Mac OS X 10.10.1 Thrown From: autocomplete-plus package, v2.17.4
Stack Trace
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:345
TypeError: Cannot read property 'toLowerCase' of undefined
at SymbolProvider.module.exports.SymbolProvider.fuzzyFilter (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:345:32)
at SymbolProvider.module.exports.SymbolProvider.getSuggestions (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:322:53)
at SymbolProvider.getSuggestions (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:3:61)
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:255:56
at Array.forEach (native)
at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:234:17)
at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:221:19)
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61
Activity
mnquintana commentedon May 21, 2015
Can you try updating to the latest version (0.200.0) and see if you can reproduce this?
mrameezraja commentedon May 21, 2015
I have updated atom to version (0.200.0) but the problem still persists. I have to disable auto-complete to work. Error is generating on every keypress. :(
mnquintana commentedon May 21, 2015
Can you reproduce this in safe mode (
atom --safe)?benogle commentedon May 21, 2015
Can you paste a file that causes this into a gist or the issue itself? Looks like an empty string is getting into the symbol store. Sorry about this.
mrameezraja commentedon May 26, 2015
Create new file and you will get the error on first keypress.
Check that text is something
benogle commentedon May 27, 2015
I am unable to reproduce this, but I added a check for this case. Not sure what the root cause is. @mrameezraja if you can provide more information that would be great:
atom --safe?mrameezraja commentedon May 28, 2015
One thing more i am using atom on mac machine.
mrameezraja commentedon May 28, 2015
Well its working after i upgraded atom to 0.202.0.
dustin-H commentedon Jun 19, 2015
Hi, got this Problem on 0.210.0.
You can reproduce by creating a new .js file and type
var i = 9;Update: Fixed it by completely uninstall and reinstall atom. Strange
RomFouq commentedon Jun 20, 2015
I have the same problem, but this appends only when typing non-alphanumeric characters or
backspace(because I have the "Allow backspace to trigger autocomplete" option enabled).This comes from the line https://github.com/atom/autocomplete-plus/blob/master/lib/symbol-provider.coffee#L212, it's either
prefix[0]ortext[0]that'sundefinedfor these characters.For example, typing
$triggers this error.benogle commentedon Jun 22, 2015
@RomFouq what version are you on? Please upgrade to the latest version and try again.
swgillespie commentedon Jun 25, 2015
This happens to me on Atom 1.0. What @RomFouq observed also seems to be true for me - the error only occurs after typing non-alphanumeric characters or backspace. I can reproduce this by generating a new Atom package, navigating to the main lib file, and typing any non-alphanumeric character.
This also only happens when I set my minimum word length to 0. Setting it back to the default makes the issue go away.
RomFouq commentedon Jun 27, 2015
I was on v0.210.0 but I upgraded to v1.0.0, did all updates, but the problem is the same...
RomFouq commentedon Jun 27, 2015
I agree with @swgillespie: this only happens when minimum word length is set to 0, even with 1, this never happens.
ssfrr commentedon Jul 6, 2015
I'm seeing this issue as well. It seems to be happening while I'm editing my keymap file for some reason.
benogle commentedon Jul 7, 2015
Anyone who gets this, can you please paste in the entire error report? There are several uses of
toLowerCasein the code, and i'm not sure which one is having the problem.Filter out empty suggestions.
swgillespie commentedon Jul 7, 2015
@benogle:
[Enter steps to reproduce below:]
Atom Version: 1.0.0
System: Mac OS X 10.10.1
Thrown From: autocomplete-plus package, v2.17.4
Stack Trace
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
Commands
Config
{ "core": { "themes": [ "one-dark-ui", "monokai" ], "projectHome": "/Users/sean/Documents/workspace", "disabledPackages": [ "metrics", "autocomplete-clang", "autocomplete-ruby" ] }, "autocomplete-plus": { "minimumWordLength": 0 } }Installed Packages
benogle commentedon Jul 7, 2015
❤️ ❤️ for the report
SymbolProvider handles when the prefix is empty