atom-script: Uncaught TypeError: Cannot read property 'remove' of undefined

[Enter steps to reproduce:]

Atom: 1.45.0 x64 Electron: 4.2.7 OS: Mac OS X 10.15.2 Thrown From: script package 3.25.0

Stack Trace

Uncaught TypeError: Cannot read property ‘remove’ of undefined

At /Users/bytedance/.atom/packages/script/node_modules/atom-message-panel/lib/MessagePanelView.js:189

TypeError: Cannot read property 'remove' of undefined
    at ScriptView.MessagePanelView.remove (/packages/script/node_modules/atom-message-panel/lib/MessagePanelView.js:189:30)
    at ScriptView.detach (/packages/atom-beautify/node_modules/jquery/dist/jquery.js:5357:15)
    at ScriptView.removePanel (/packages/script/lib/script-view.js:89:10)
    at Object.closeScriptViewAndStopRunner (/packages/script/lib/script.js:161:21)
    at HTMLElement.scriptCloseView (/packages/script/lib/script.js:94:39)
    at CommandRegistry.handleCommandEvent (/Users/bytedance/Downloads/devApp/Atom.app/Contents/Resources/app/static/<embedded>:11:349290)
    at CommandRegistry.dispatch (/Users/bytedance/Downloads/devApp/Atom.app/Contents/Resources/app/static/<embedded>:11:347765)
    at ScriptView.close (/packages/script/lib/script-view.js:99:19)
    at /packages/atom-beautify/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLDivElement.dispatch (/packages/atom-beautify/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/atom-beautify/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -3:30 core:save (input.hidden-input)
  4x -3:17.2.0 script:run (input.hidden-input)
  2x -2:38.3.0 script:close-view (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -2:17.2.0 script:run (input.hidden-input)
  2x -1:56.7.0 editor:toggle-line-comments (input.hidden-input)
     -1:53.8.0 core:save (input.hidden-input)
     -1:51.8.0 script:run (input.hidden-input)
     -1:44.1.0 core:backspace (input.hidden-input)
     -1:43.1.0 core:save (input.hidden-input)
  2x -1:42.3.0 script:run (input.hidden-input)
     -1:15.9.0 core:backspace (input.hidden-input)
     -1:14.9.0 core:save (input.hidden-input)
     -1:12.5.0 script:run (input.hidden-input)
     -1:10.6.0 script:close-view (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -0:26.9.0 script:run (input.hidden-input)
  2x -0:25.3.0 script:close-view (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

atom-beautify 0.33.4 
atom-ide-ui 0.13.0 
autocomplete-clang 0.13.1 
go-debug 1.7.0 
go-plus 6.1.0 
go-signature-statusbar 1.2.3 
script 3.25.0 

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 25

Most upvoted comments

Same issue. Occurs after running and clicking “X” on the “script” package window, or esc on keyboard.

same when clicking on the x or pressing ctrl+w

Had the same issue. solved it by going to: C:\Users\username.atom\packages\script\node_modules\atom-message-panel\lib Then removed from line 187 to 190

MessagePanelView.prototype.remove = function (index) { this.messages.splice(-index, 1); this.body.children()[index].remove(); };

worked for me