atom-community / atom-script

:runner: Run ( scripts | selections | source ) in Atom
https://atom.io/packages/script
MIT License
733 stars 269 forks source link

Uncaught TypeError: Cannot read property 'forEach' of undefined #1477

Open revans17 opened 7 years ago

revans17 commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.2 x64 Electron: 1.6.15 OS: Mac OS X 10.13.2 Thrown From: script package 3.17.3

Stack Trace

Uncaught TypeError: Cannot read property 'forEach' of undefined

At /Users/RyanEvans/.atom/packages/script/node_modules/ansi-to-html/lib/ansi_to_html.js:139

TypeError: Cannot read property 'forEach' of undefined
    at Filter.forEach (/packages/script/node_modules/ansi-to-html/lib/ansi_to_html.js:139:17)
    at Filter.toHtml (/packages/script/node_modules/ansi-to-html/lib/ansi_to_html.js:129:12)
    at ScriptView.display (/packages/script/lib/script-view.js:179:28)
    at ScriptView.setHeaderAndShowExecutionTime (/packages/script/lib/script-view.js:64:12)
    at /packages/script/lib/view-runtime-observer.js:18:17
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at Runner.onExit (/packages/script/lib/runner.js:109:18)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:338:17)
    at /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:359:17
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:220:15)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)

Commands

     -4:37.6.0 application:new-file (div.tool-panel.tree-view)
     -4:31.4.0 core:backspace (input.hidden-input)
     -4:27 grammar-selector:show (atom-text-editor.editor.is-focused)
     -4:26.3.0 core:confirm (input.hidden-input)
     -4:24 core:save (input.hidden-input)
  5x -4:15 core:backspace (input.hidden-input)
     -4:07.1.0 core:move-down (input.hidden-input)
     -4:06.4.0 autocomplete-plus:confirm (input.hidden-input)
     -4:06.4.0 snippets:expand (atom-text-editor.editor.is-focused)
     -4:02.2.0 core:backspace (input.hidden-input)
     -3:58 core:move-left (input.hidden-input)
     -3:55.9.0 core:backspace (input.hidden-input)
     -3:55.6.0 core:select-all (input.hidden-input)
     -3:54.4.0 core:save (input.hidden-input)
     -3:52.9.0 script:run (input.hidden-input)

Non-Core Packages

atom-clock 0.1.15 
atom-sublime-monokai-syntax 0.4.4 
autocomplete 0.47.0 
autocomplete-java 1.2.7 
autocomplete-python 1.10.3 
java-generator 2.2.3 
kite 0.52.0 
minimap 4.29.7 
script 3.17.3 
sublimify 0.10.0 
legit228 commented 5 years ago

I had this exact same issue and was able to narrow it down to two settings for the script package. The settings are "Output the time it took to execute the script" and "HTML escape console output."

qubitter commented 5 years ago

Bump - I have the same issue with same reproducibility as legit228 - no idea what it could be; maybe the node interpreter expects a certain output?