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 'length' of undefined #22

Closed
birdspider opened this issue Dec 20, 2018 · 3 comments
Closed

Uncaught TypeError: Cannot read property 'length' of undefined #22

birdspider opened this issue Dec 20, 2018 · 3 comments
Assignees
Labels
bug Something isn't working confirmed

Comments

@birdspider
Copy link

birdspider commented Dec 20, 2018

  1. launch repl
~ # clj -J-Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"
Clojure 1.10.0
user=> 
  1. eval (map inc [1 2 3]) (Chlorine: Evaluate Selection)

  2. boom

  3. (optional) (try it in the repl tab) - realize I do not know how to eval - Ctrl-C, Ctrl-Enter, Enter, Shift Enter, the "run" icon on top - nothing does anything (also once closed - how to reopen the repl-tab) ?

  4. (optional) as someone who dabbled in enhancing the proto-repl but seeing it not being developed anymore, I'm exited about atom-chlorine - FYI


Atom: 1.33.1 x64
Electron: 3.0.13
OS: "Arch Linux"
Thrown From: chlorine package 0.0.4

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /home/birdspider/.atom/packages/chlorine/lib/main.js:13

TypeError: Cannot read property 'length' of undefined
    at na (/packages/chlorine/lib/main.js:13:447)
    at Ht (/packages/chlorine/lib/main.js:774:412)
    at Kt (/packages/chlorine/lib/main.js:777:45)
    at /packages/chlorine/lib/main.js:1237:397)
    at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:384:43)
    at Object.didConfirmSelection (/usr/lib/atom/node_modules/command-palette/lib/command-palette-view.js:152:29)
    at SelectListView.confirmSelection (/usr/lib/atom/node_modules/atom-select-list/src/select-list-view.js:400:20)
    at HTMLDivElement.core:confirm (/usr/lib/atom/node_modules/atom-select-list/src/select-list-view.js:105:14)
    at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:384:43)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:617:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:408:22)
    at WindowEventHandler.handleDocumentKeyEvent (/usr/lib/atom/src/window-event-handler.js:110:34)

Commands

     -0:32.9.0 core:select-all (input.hidden-input)
     -0:30.8.0 core:backspace (input.hidden-input)
  2x -0:30.1.0 core:move-down (input.hidden-input)
     -0:29.3.0 core:move-up (input.hidden-input)
     -0:28 core:move-down (input.hidden-input)
     -0:27.5.0 core:page-down (input.hidden-input)
     -0:22.9.0 chlorine:toggle-refresh-mode (input.hidden-input)
     -0:19.1.0 command-palette:toggle (input.hidden-input)
     -0:14.9.0 core:select-all (input.hidden-input)
  8x -0:12.4.0 core:move-down (input.hidden-input)
     -0:10.6.0 core:move-up (input.hidden-input)
     -0:10.3.0 core:confirm (input.hidden-input)
     -0:10.3.0 chlorine:toggle-refresh-mode (input.hidden-input)
     -0:07.8.0 command-palette:toggle (input.hidden-input)
     -0:06.1.0 core:confirm (input.hidden-input)
     -0:06.1.0 chlorine:evaluate-block (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
atom-html-preview 0.2.6 
atom-ide-ui 0.13.0 
atom-ternjs 0.18.3 
blame 1.1.0 
chary-tree-view 0.2.13 
chlorine 0.0.4 
dark-bint-syntax 0.10.0 
docblockr 0.13.7 
editorconfig 2.2.2 
emmet 2.4.3 
file-icons 2.1.27 
file-watcher 2.0.0 
git-plus 8.2.1 
git-status 0.3.4 
hyperclick 0.0.0 
ide-php 0.7.17 
ink 0.9.13 
js-hyperclick 1.13.3 
language-archlinux 0.9.2 
language-pug 0.0.22 
language-textile 0.2.0 
language-unix-shell 0.40.1 
language-vue 0.23.1 
linter 2.2.0 
linter-eslint 8.4.1 
lisp-paredit 0.6.0 
minimap 4.29.9 
minimap-git-diff 4.3.1 
monokai 0.24.0 
parinfer 1.23.0 
pigments 0.40.2 
prettier-atom 0.56.2 
project-manager 3.3.6 
proto-repl 1.4.24 
rst-preview 1.3.1 
sort-lines 0.18.0 
svg-preview 0.14.0 
sync-settings 0.8.6 
textile-preview 0.1.2 
todo-show 2.3.2 
@mauricioszabo
Copy link
Owner

mauricioszabo commented Dec 21, 2018

Just as information (for now):

  1. I couldn't reproduce with Clojure 1.9.0 and lein, on master code. What I could see is that when I try to run Chlorine: Evaluate Selection without anything selected, it seems to hang (I say it seems because you can evaluate other things, just the result that never happens)

  2. REPL tab does nothing yet ¯\_(ツ)_/¯. Sorry :). For now, it's just a place to put stdout errors. There's also no way to re-open the repl tab, so I'll add a command to reopen it.

  3. Thanks! I'll look at these issues. Probably today I'll publish a new version that probably mitigates (1), and add more commands.

@mauricioszabo
Copy link
Owner

Nervermind, I've got it! This happens when you create a new file and then try to evaluate it without saving it.

@mauricioszabo mauricioszabo self-assigned this Dec 27, 2018
@mauricioszabo mauricioszabo added bug Something isn't working confirmed labels Dec 27, 2018
@mauricioszabo
Copy link
Owner

Fixed at commit: f6ee3d3, at version 0.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests

2 participants