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 'remove' of undefined #1984

Closed
mjmerrell opened this issue Oct 31, 2019 · 14 comments
Closed

Uncaught TypeError: Cannot read property 'remove' of undefined #1984

mjmerrell opened this issue Oct 31, 2019 · 14 comments

Comments

@mjmerrell
Copy link

mjmerrell commented Oct 31, 2019

[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 
@julianryorex
Copy link

I got the same error.

@dzmitryv
Copy link

dzmitryv commented Nov 1, 2019

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 

@jmiskinis
Copy link

@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

@arashilmg
Copy link

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

@ani2life
Copy link

ani2life commented Nov 4, 2019

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"

@srinath-lakshman
Copy link

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

@pdkproitf
Copy link

Got the same problem! :(

@HorselessName
Copy link

HorselessName commented Nov 8, 2019

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

I'm on Windows

@lghauth
Copy link

lghauth commented Nov 13, 2019

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)

@wjandrea
Copy link
Contributor

wjandrea commented Nov 13, 2019

@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

@rafaelurben
Copy link

Same problem on Windows 10

@ongbuntu
Copy link

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

@rafaelurben
Copy link

rafaelurben commented Apr 18, 2020

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

@ongbuntu
Copy link

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

You are welcomed. Glad it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests