atom/command-palette

TypeError: Cannot read property 'index' of undefined(atom = 1.23.1 windows x64)

K4zuki opened this issue · 7 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.23.1 x64
Electron: 1.6.15
OS: Microsoft Windows 7 Enterprise
Thrown From: command-palette package 0.43.0

Stack Trace

Uncaught TypeError: Cannot read property 'index' of undefined

At C:\Users\kyamamot\.atom\packages\command-palette\lib\command-palette-view.js:16

TypeError: Cannot read property 'index' of undefined
    at Object.elementForItem (/packages/command-palette/lib/command-palette-view.js:16:47)
    at /packages/bookmarks/node_modules/atom-select-list/src/select-list-view.js:149:31)
    at Array.map (native)
    at SelectListView.renderItems (/packages/bookmarks/node_modules/atom-select-list/src/select-list-view.js:148:23)
    at SelectListView.render (/packages/bookmarks/node_modules/atom-select-list/src/select-list-view.js:139:12)
    at updateSync (/packages/about/node_modules/etch/lib/component-helpers.js:99:34)
    at /packages/about/node_modules/etch/lib/component-helpers.js:72:7
    at DefaultScheduler.performUpdates (/packages/about/node_modules/etch/lib/default-scheduler.js:48:34)

Commands

     -0:20.3.0 command-palette:toggle (input.hidden-input)

Non-Core Packages

atom-gooey-syntax 1.0.0 
atom-html-preview 0.2.5 
atom-mermaid 3.2.1 
atom-yamljson 0.2.4 
autocomplete-paths 2.12.1 
autocomplete-python 1.10.5 
build 0.69.0 
build-make 0.13.0 
build-tools-make 0.2.1 
busy 0.7.0 
busy-signal 1.4.3 
clang-format 1.29.0 
env-from-shell 0.3.0 
file-icons 2.1.14 
genesis-ui 0.5.0 
git-control 0.9.0 
git-plus 7.10.0 
gl-light-syntax 3.0.0 
highlight-line 0.12.0 
idiomatic-dark-syntax 0.1.3 
intentions 1.1.5 
iso8601-timestamp 0.1.1 
japanese-word-selection 0.4.0 
language-cpp14 0.6.2 
language-csv 1.1.2 
language-docker 1.1.8 
language-doxygen 0.3.0 
language-ignore 1.7.4 
language-ini 1.19.0 
language-markdown 0.25.1 
language-tex 0.4.0 
linter 2.2.0 
linter-clang 4.1.2 
linter-cpplint 2.0.1 
linter-js-yaml 1.2.8 
linter-jsonlint 1.3.0 
linter-pycodestyle 2.1.3 
linter-ui-default 1.6.10 
mac-fix-path 0.0.0 
markdown-pdf 2.1.0 
markdown-preview-enhanced 0.15.1 
markdown-preview-plus 2.4.16 
markdown-table-formatter 2.9.1 
markdown-writer 2.7.3 
merge-conflicts 1.4.5 
minimap 4.29.7 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-linter 2.1.3 
native-ui 0.25.1 
octocat-syntax 2.0.1 
open-recent 5.0.0 
pdf-view 0.61.0 
platformio-ide-terminal 2.7.0 
python-autopep8 0.1.3 
release-notes 0.53.0 
rst-preview-pandoc 0.1.12 
sequence-diagram 0.0.2 
slack-ui 0.8.0 
svn 0.0.13 
symbols-tree-nav 0.15.5 
symbols-tree-view 0.14.0 
sync-settings 0.8.3 
table-editor 0.2.2 
tablr 1.8.3 
tango-syntax 0.5.0 
tool-bar 1.1.0 
tool-bar-atom 1.7.0 
tool-bar-main 0.0.10 
tool-bar-markdown-writer 0.3.0 
tortoise-svn 0.5.1 
tree-view-git-status 1.4.0 
vs-dark-syntax 1.1.0 
t9md commented

I'm curious to know the cause of this, because v0.43.0 include my PR #101.
Above was my misunderstood, my PR only goes into v1.24.0-beta0 now.
Your version is v1.23.1 not affected by this PR. sorry for confusion.

One strange part I noticed in your trace is,
/packages/bookmarks/node_modules/atom-select-list/ is in trace, this is path of bookmark package, should not appear in different pkg(command-palette).

  • Can you reproduce it always? and How?
  • You can reproduce it after you disabled bookmark pkg from setting-view?

@t9md thanks for the comment.

The bookmark package is strange. it looks working, but I can see both 0.45.1 and 0.44.4 installed.
This does not change after apm install bookmarks@0.45.1 plus atom reboot.

I may continue talk in bookmarks package repository but this may because of my dirty installation.

I do not understand situation including bookmarks package but error for this report has disappeared.
so the thread can be closed.

t9md commented

Basically you don't need to manually install bookmark pkg, since it's bundled.
You should use Atom-bundled version of bookmark unless you intentionally hack bookmark to send PR.

do apm uninstall bookmarks then make sure bookmarks pkg is not appear in "Community Packages" when you search bookmarks in setting-view's pkg section.
And how about my question? can you reproduce and how?

  • bookmarks uninstalled
  • reproduce is no longer possible
  • it used to happen only once after starting atom. after happening no more error message nor menu itself appeared
    1. start atom
    2. try shift-ctrl-p and the error
    3. another shift-ctrl-p does not make any effect
t9md commented

it used to happen only once after starting atom. after happening no more error message nor menu itself appeared
start atom
try shift-ctrl-p and the error
another shift-ctrl-p does not make any effect

And this only happen when you installed bookmarks pkg manually right?

t9md commented

Then cause is not code/bug it's just lack of understanding of bundled pkg like bookmark should not be installed manually.
This is frequently happening issue for many user, but irrelevant of this issue.

I think you can close this issue.
If you have any question feel free to ask.

ok thanks for help!
closing