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

Created on 31 Oct 2019  路  14Comments  路  Source: atom-community/atom-script

[Enter steps to reproduce:]

Running on OSX Mojave

  1. cmd+i
  2. esc

Atom: 1.41.0 x64
Electron: 4.2.7
OS: Mac OS X 10.14.6
Thrown From: script package 3.25.0

Stack Trace

Uncaught TypeError: Cannot read property 'remove' of undefined

At /Users/johnsonmerrell/.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/script/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.coreCancel (/packages/script/lib/script.js:92:33)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349392)
    at KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1252536)
    at KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1248670)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:284598)

Commands

     -0:11.3.0 editor:consolidate-selections (input.hidden-input)
     -0:11.3.0 core:cancel (input.hidden-input)
     -0:11.1.0 editor:consolidate-selections (input.hidden-input)
     -0:11.1.0 core:cancel (input.hidden-input)
     -0:10.9.0 editor:consolidate-selections (input.hidden-input)
     -0:10.9.0 core:cancel (input.hidden-input)
     -0:10.7.0 editor:consolidate-selections (input.hidden-input)
     -0:10.7.0 core:cancel (input.hidden-input)
     -0:10.6.0 editor:consolidate-selections (input.hidden-input)
     -0:10.6.0 core:cancel (input.hidden-input)
     -0:10.4.0 editor:consolidate-selections (input.hidden-input)
     -0:10.4.0 core:cancel (input.hidden-input)
     -0:09.8.0 editor:consolidate-selections (input.hidden-input)
     -0:09.8.0 core:cancel (input.hidden-input)
     -0:03.2.0 editor:consolidate-selections (input.hidden-input)
     -0:03.2.0 core:cancel (input.hidden-input)

Non-Core Packages

anodyne-dark-syntax 0.2.1 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
autocomplete-python 1.16.0 
Hydrogen 2.13.1 
jackhammer-syntax 1.1.0 
minimap 4.29.9 
monokai 0.24.0 
platformio-ide-terminal 2.10.0 
railscast-theme 0.4.0 
script 3.25.0 
spacetravel-syntax 0.0.0 
duplicate

Most helpful comment

@arashilmg, here's an idea: fix it yourself. You have a right to feel frustrated but there's no need for this kind of talk here. #1550

All 14 comments

I got the same error.

Got the same error on attempts to close Script window.

  1. Open a .py file
  2. ctrl+shift+B to run the Python script
  3. Try to close Script window. This and any subsequent attempt to close Script produces the error.

Atom: 1.41.0 x64
Electron: 4.2.7
OS: Debian GNU/Linux
Thrown From: script package 3.25.0

Stack Trace

Uncaught TypeError: Cannot read property 'remove' of undefined

At ~/.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-toolbar/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 (/usr/share/atom/resources/app/static/<embedded>:11:349392)
    at CommandRegistry.dispatch (/usr/share/atom/resources/app/static/<embedded>:11:347867)
    at ScriptView.close (/packages/script/lib/script-view.js:99:19)
    at /packages/atom-toolbar/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLDivElement.dispatch (/packages/atom-toolbar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/atom-toolbar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -0:22.8.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:22.6.0 editor:newline (input.hidden-input)
     -0:16.4.0 intentions:highlight (input.hidden-input)
     -0:16 script:run (input.hidden-input)
     -0:11.2.0 script:close-view (atom-workspace.workspace.scrollbars-visible-always.theme-atom-material-syntax.theme-atom-dark-ui)

Non-Core Packages

atom-beautify 0.33.4 
atom-history 1.0.8 
atom-keyboard-macros 0.12.1 
atom-material-syntax 1.0.8 
atom-toolbar 0.1.6 
busy-signal 2.0.1 
git-history 3.3.0 
intentions 1.1.5 
linter 2.3.1 
linter-shellcheck 1.6.0 
linter-ui-default 1.8.0 
markdown-preview-enhanced 0.17.0 
script 3.25.0 
sequential-number 0.5.0 
split-diff 1.6.1 

@arashilmg, here's an idea: fix it yourself. You have a right to feel frustrated but there's no need for this kind of talk here. #1550

@jmiskinis this could be easily fixed by just reverting changes to previous working version

I found the same error in #1222

The error occurred due to the atom-message-panel package version update.
The remove method of the MessagePanelView class in the atom-message-panel package appears to have been added.

The temporary way to avoid the problem is the same as before.
Open the package.json file, modify the atom-message-panel version to 1.2.7, and then npm update.

"atom-message-panel": "1.2.7"

@neur0hak This fixes the error on the first run. But Script fails to run afterwards.

Got the same problem! :(

I have the same problem.
How do i list my installed packages?

I'm on Windows

I found the same error in #1222

The error occurred due to the atom-message-panel package version update.
The remove method of the MessagePanelView class in the atom-message-panel package appears to have been added.

The temporary way to avoid the problem is the same as before.
Open the package.json file, modify the atom-message-panel version to 1.2.7, and then npm update.

"atom-message-panel": "1.2.7"

the solution indeed worked, but I had to run "apm clean" "apm install" instead of npm update...
(I'm on mac)

@jmiskinis this could be easily fixed by just reverting changes to previous working version

To do that: apm install [email protected]

Worked for me!

edit: oh haha, I just realized you're talking about the development, not the install

Same problem on Windows 10

The following steps worked for me:

  1. download version 3.5.0 of jquery.js from this link https://code.jquery.com/jquery-3.5.0.js

  2. replace the jquery.js file in the following folder:
    ~/.atom/packages/script/node_modules/jquery/dist/jquery.js

  3. restart atom

@ongbuntu Thank you! That worked for me too! (Windows 10)

@ongbuntu Thank you! That worked for me too! (Windows 10)

You are welcomed. Glad it helps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stwykd picture stwykd  路  6Comments

ld000 picture ld000  路  6Comments

STRAYKR picture STRAYKR  路  7Comments

seethroughtrees picture seethroughtrees  路  4Comments

ChenZhongPu picture ChenZhongPu  路  3Comments