atom-extensions / atom-music

🎵 Simple music player for Atom.
https://atom.io/packages/atom-music
MIT License
14 stars 10 forks source link

[BUG] Uncaught TypeError: Cannot read property 'length' of undefined #15

Closed artem-tkachuk closed 4 years ago

artem-tkachuk commented 5 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.34.0 x64 Electron: 2.0.16 OS: Mac OS X 10.14 Thrown From: atom-music package 0.10.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Users/artemtkachuk1/.atom/packages/atom-music/lib/atom-music-view.coffee:167

TypeError: Cannot read property 'length' of undefined
    at AtomMusicView.module.exports.AtomMusicView.filesBrowsed (/packages/atom-music/lib/atom-music-view.coffee:167:7)
    at /packages/atom-music/lib/atom-music-view.coffee:1:1)
    at HTMLInputElement.dispatch (/packages/csslint/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLInputElement.elemData.handle (/packages/csslint/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -5:44 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-one-dark-ui)
     -5:16.6.0 github:toggle-github-tab (summary.github-Accordion-header)
     -5:08.0 github:toggle-git-tab (input.hidden-input)
  2x -3:35.4.0 gitlab:toggle-projects (div.tool-panel.tree-view)
     -3:16.3.0 git-diff:toggle-diff-list (div.tool-panel.tree-view)
     -2:19.4.0 core:backspace (input.hidden-input)
     -1:27.9.0 intentions:highlight (input.hidden-input)
  2x -1:26 atom-music:toggle (input.hidden-input)
     -1:24.8.0 intentions:highlight (input.hidden-input)
  3x -1:24 atom-music:toggle (input.hidden-input)

Non-Core Packages

asteroids 0.2.0 
atom-beautify 0.33.4 
atom-clock 0.1.16 
atom-gdb 0.6.0 
atom-html-preview 0.2.6 
atom-material-ui 2.1.3 
atom-music 0.10.0 
atom-ternjs 0.18.3 
autoclose-html 0.23.0 
busy-signal 2.0.0 
csslint 1.2.0 
dbg 1.6.3 
dbg-gdb 1.7.8 
emmet 2.4.3 
file-icons 2.1.29 
gcc-make-run 0.2.12 
gitlab 0.1.3-7 
highlight-selected 0.14.0 
Hydrogen 2.7.0 
intentions 1.1.5 
KeyCount 0.2.0 
language-ejs 0.4.0 
linter 2.3.0 
linter-csslint 2.0.3 
linter-jshint 3.1.13 
linter-ui-default 1.7.1 
minimap 4.29.9 
monokai 0.24.0 
output-panel 0.3.4 
pigments 0.40.2 
platformio-ide-terminal 2.9.0 
remote-atom 1.3.12 
remote-sync 4.1.8 
rest-client 1.3.1 
Sublime-Style-Column-Selection 1.7.5 
ghost commented 5 years ago

On opening multiple mp3 files

  1. Hit "Open music files"
  2. When the file selection menu opens up, select multiple .mp3 files and import them.
  3. Error happens, and no music is loaded in.

Edit: This actually happens when you open even one music file, too. So basically, it's broken... Never mind. That was a different error than this one, and it says it may be because my Atom editor is out of date.

Atom: 1.34.0 x64 Electron: 2.0.16 OS: Microsoft Windows 10 Pro Thrown From: atom-music package 0.10.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At C:\Users\poken\Documents\Atom\.atom\packages\atom-music\lib\atom-music-view.coffee:167

TypeError: Cannot read property 'length' of undefined
    at AtomMusicView.module.exports.AtomMusicView.filesBrowsed (/packages/atom-music/lib/atom-music-view.coffee:167:7)
    at /packages/atom-music/lib/atom-music-view.coffee:1:1)
    at HTMLInputElement.dispatch (/packages/todo-show/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLInputElement.elemData.handle (/packages/todo-show/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -1:10.2.0 command-palette:toggle (div.package-detail.panels-item)
  2x -1:09.1.0 core:backspace (input.hidden-input)
     -1:07.6.0 editor:consolidate-selections (input.hidden-input)
  2x -1:07.6.0 core:cancel (input.hidden-input)
     -1:03.2.0 command-palette:toggle (div.package-detail.panels-item)
     -1:01.6.0 editor:consolidate-selections (input.hidden-input)
     -1:01.6.0 core:cancel (input.hidden-input)
  2x -1:00.7.0 atom-music:toggle (div.package-detail.panels-item)

Non-Core Packages

atom-clock 0.1.16 
atom-music 0.10.0 
atom-wrap-in-tag 0.6.0 
black-ui 0.3.7 
busy-signal 2.0.0 
city-lights-syntax 1.1.8 
city-lights-ui 1.5.3 
gruvbox-plus-syntax 1.3.1 
hacker-dream-syntax 1.4.8 
hacker-dream-ui 1.1.0 
intentions 1.1.5 
jquery-snippets 11.0.0 
language-haml 0.32.1 
linter 2.3.0 
linter-csslint 2.0.5 
linter-eslint 8.5.2 
linter-ui-default 1.7.1 
mdn-doc 0.3.0 
monokai-dark 1.5.0 
open-in-browsers 0.0.30 
pigments 0.40.2 
simple-icons 0.2.0 
Stylus 3.2.0 
stylus-language 2.6.0 
todo-show 2.3.2 
ubik-hackerman-syntax 1.10.0 
UziTech commented 5 years ago

@artem-tkachuk @mbpscruise is this still an issue?

Sharkaon commented 5 years ago

I'm having that same problem rn, I think: [Enter steps to reproduce:]

  1. Hit "Open Music Files"
  2. Select one file
  3. Music doesn't run and the following error appears:

Atom: 1.37.0 x64 Electron: 2.0.18 OS: Unknown Windows version Thrown From: atom-music package 0.10.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At C:\Users\schur_000\.atom\packages\atom-music\lib\atom-music-view.coffee:167

TypeError: Cannot read property 'length' of undefined
    at AtomMusicView.module.exports.AtomMusicView.filesBrowsed (/packages/atom-music/lib/atom-music-view.coffee:167:7)
    at /packages/atom-music/lib/atom-music-view.coffee:1:1)
    at HTMLInputElement.dispatch (/packages/atom-html-preview/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLInputElement.elemData.handle (/packages/atom-html-preview/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -9:02.5.0 bookmarks:jump-to-next-bookmark (input.hidden-input)
     -8:00.4.0 core:backspace (input.hidden-input)
     -8:00.0 core:save (input.hidden-input)
  2x -7:42.3.0 core:backspace (input.hidden-input)
     -7:39.6.0 core:save (input.hidden-input)
     -7:37.2.0 core:move-right (input.hidden-input)
     -7:37 core:backspace (input.hidden-input)
  2x -7:36.7.0 core:save (input.hidden-input)
     -6:46.7.0 window:toggle-dev-tools (input.hidden-input)

Non-Core Packages

atom-dark-fusion-syntax 2.2.1 
atom-darker-fusion-syntax 1.4.0 
atom-html-preview 0.2.6 
atom-music 0.10.0 
fusion-ui 0.13.0 
gpp-compiler 3.0.7 
minimap 4.29.9 
minimap-bookmarks 0.4.2 
spotify-ui 1.2.2 
vivi90 commented 4 years ago

Steps to reproduce:

  1. In Atom click "File" > "New window".
  2. In atom-music click "Open music files" and select one or more files.

Atom: 1.45.0 x64 Electron: 4.2.12 OS: "Manjaro Linux" Thrown From: atom-music package 0.10.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /home/vivien/.atom/packages/atom-music/lib/atom-music-view.coffee:167

TypeError: Cannot read property 'length' of undefined
    at AtomMusicView.module.exports.AtomMusicView.filesBrowsed (/packages/atom-music/lib/atom-music-view.coffee:167:7)
    at /packages/atom-music/lib/atom-music-view.coffee:1:1)
    at HTMLInputElement.dispatch (/packages/editor-background/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLInputElement.elemData.handle (/packages/editor-background/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -0:38.7.0 atom-music:toggle (input.hidden-input)

Non-Core Packages

atom-browser 1.7.0 
atom-ide-terminal 5.0.1 
atom-ide-ui 0.13.0 
atom-music 0.10.0 
atom-ternjs 0.20.0 
autocomplete-java 1.2.7 
autocomplete-javascript 0.0.2 
autocomplete-sql 0.5.0 
busy-signal 2.0.1 
editor-background 1.2.42 
example 0.0.0 
file-icons 2.1.40 
highlight-colors 0.9.0 
hyperclick 0.0.0 
ide-cpp 0.1.0 
ide-java 0.9.0 
ide-php 0.7.18 
intentions 1.1.5 
java-generator 2.2.3 
language-assembly 0.7.2 
language-haskell 1.19.4 
language-latex 1.2.0 
language-lsl 2.2.0 
language-vhdl 0.7.2 
latex 0.50.2 
latexer 0.3.0 
linter-javac 1.10.0 
pdf-view 0.72.0 
php-ide-serenata 5.2.0 
plantuml-toolkit 0.2.0 
project-manager 3.3.8 
quick-query 1.1.1 
quick-query-sqlite 0.3.2 
teletype 0.13.4 
xilinx-unisims 0.1.0 

Work-around:

  1. Click "Clear Playlist"
  2. Add music files successful

Issue:

  filesBrowsed: (e) =>
    files = e.target.files
    if files? and files.length > 0
      ...

files? is converted to files != null and undefined is still uncatched. @sdinesh86 @jamesalbert But i don't know, how to fix it. :-(

vivi90 commented 4 years ago

Fix in progress..