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 #2006

Open
mjstaw opened this issue Dec 12, 2019 · 34 comments
Open

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

mjstaw opened this issue Dec 12, 2019 · 34 comments
Labels

Comments

@mjstaw
Copy link

mjstaw commented Dec 12, 2019

[Enter steps to reproduce:]

  1. Press escape.

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/mjstaw/.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/platformio-ide-terminal/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:20.9.0 editor:consolidate-selections (input.hidden-input)
     -0:20.9.0 core:cancel (input.hidden-input)
     -0:20.7.0 editor:consolidate-selections (input.hidden-input)
     -0:20.7.0 core:cancel (input.hidden-input)
     -0:20.6.0 editor:consolidate-selections (input.hidden-input)
     -0:20.6.0 core:cancel (input.hidden-input)
     -0:20.3.0 editor:consolidate-selections (input.hidden-input)
     -0:20.3.0 core:cancel (input.hidden-input)
     -0:20.1.0 editor:consolidate-selections (input.hidden-input)
     -0:20.1.0 core:cancel (input.hidden-input)
     -0:19.9.0 editor:consolidate-selections (input.hidden-input)
     -0:19.9.0 core:cancel (input.hidden-input)
     -0:19.7.0 editor:consolidate-selections (input.hidden-input)
     -0:19.7.0 core:cancel (input.hidden-input)
     -0:08.9.0 editor:consolidate-selections (input.hidden-input)
     -0:08.9.0 core:cancel (input.hidden-input)

Non-Core Packages

atom-runner 2.7.1 
platformio-ide-terminal 2.10.0 
script 3.25.0 
@uqccha18
Copy link

I got the same error here:

Atom: 1.41.0 x64
Electron: 4.2.7
OS: Microsoft Windows 10 Pro
Thrown From: script package 3.25.0

Stack Trace

Uncaught TypeError: Cannot read property 'remove' of undefined

At C:\Users\chank\.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 (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:349392)
    at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:1252536)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:1248670)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:284598)

Commands

Non-Core Packages

docker 0.8.0 
script 3.25.0 
vim-mode-plus 1.36.3 

@wesgt
Copy link

wesgt commented Dec 13, 2019

me too

@alexandergogl
Copy link

alexandergogl commented Dec 13, 2019

Same here.

Atom: 1.41.0
Electron: 4.2.7
Chrome: 69.0.3497.128
Node: v10.11.0
OS: Mac OSX 10.14.6
Thrown From: script package 3.25.0

/Users/alex/.atom/packages/script/node_modules/atom-message-panel/lib/MessagePanelView.js:189
Hide Stack Trace
TypeError: Cannot read property 'remove' of undefined
    at ScriptView.MessagePanelView.remove (/Users/alex/.atom/packages/script/node_modules/atom-message-panel/lib/MessagePanelView.js:189:30)
    at ScriptView.detach (/Users/alex/.atom/packages/asciidoc-image-helper/node_modules/jquery/dist/jquery.js:5357:15)
    at ScriptView.removePanel (/Users/Alex/.atom/packages/script/lib/script-view.js:89:10)
    at Object.closeScriptViewAndStopRunner (/Users/Alex/.atom/packages/script/lib/script.js:161:21)
    at HTMLElement.coreCancel (/Users/Alex/.atom/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)

@vv3rd
Copy link

vv3rd commented Dec 15, 2019

Same thing.

[Enter steps to reproduce:]

  1. Press Escape

Atom: 1.41.0 x64
Electron: 4.2.7
OS: Unknown Windows version
Thrown From: script package 3.25.0

Stack Trace

Uncaught TypeError: Cannot read property 'remove' of undefined

At C:\Users\lyuds\.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 (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:349392)
    at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:1252536)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:1248670)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:11:284598)

Commands

 12x -5:45.7.0 core:backspace (input.hidden-input)
     -2:25.3.0 script:run (input.hidden-input)
  2x -2:21.9.0 core:backspace (input.hidden-input)
     -2:18.5.0 editor:newline (input.hidden-input)
     -2:12.6.0 window:toggle-full-screen (div.am-panel.tool-panel.panel-bottom.native-key-bindings.script-view)
     -1:37.4.0 script:kill-process (div.am-panel.tool-panel.panel-bottom.native-key-bindings.script-view)
     -1:29.2.0 script:close-view (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:07.8.0 core:cancel (div.am-panel.tool-panel.panel-bottom.native-key-bindings.script-view)

Non-Core Packages

script 3.25.0 

@pfandzelter
Copy link
Collaborator

Hey everyone, this is a known issue as reported in #2002 and #1997. The PR #2004 should fix this (feel free to try that out). Unfortunately so far none of the maintainers have merged it or made a new release for the package.

@misterchalm22
Copy link

misterchalm22 commented Dec 17, 2019

Hey everyone, this is a known issue as reported in #2002 and #1997. The PR #2004 should fix this (feel free to try that out). Unfortunately so far none of the maintainers have merged it or made a new release for the package.

That's fine, but how would one implement this without building their own version of Atom based on this commit? Maintainers need to fix this error, especially if it is as simple as it looks.

[Enter steps to reproduce:]

  1. Run Python script in Atom
  2. Close console window by clicking on the x

Atom: 1.42.0 x64
Electron: 4.2.7
OS: Microsoft Windows 10 Home
Thrown From: script package 3.25.0

Stack Trace

Uncaught TypeError: Cannot read property 'remove' of undefined

At C:\Users\travc\.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.scriptCloseView (/packages/script/lib/script.js:94:39)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:349385)
    at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:347860)
    at ScriptView.close (/packages/script/lib/script-view.js:99:19)
    at /packages/script/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLDivElement.dispatch (/packages/script/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/packages/script/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -9:57.2.0 editor:indent (input.hidden-input)
  2x -9:55.6.0 core:backspace (input.hidden-input)
     -9:28.5.0 intentions:highlight (input.hidden-input)
     -9:28.2.0 core:save (input.hidden-input)
     -9:26.4.0 intentions:highlight (input.hidden-input)
     -9:25.6.0 script:run (input.hidden-input)
     -9:10.5.0 core:backspace (input.hidden-input)
     -9:06.2.0 intentions:highlight (input.hidden-input)
     -9:05.8.0 core:save (input.hidden-input)
     -9:02.6.0 intentions:highlight (input.hidden-input)
     -9:01.7.0 script:run (input.hidden-input)
     -8:57.5.0 intentions:highlight (input.hidden-input)
     -8:57 script:run (input.hidden-input)
     -8:35.4.0 editor:newline (input.hidden-input)
 22x -8:34.8.0 core:backspace (input.hidden-input)
     -7:54.3.0 script:close-view (atom-workspace.workspace.scrollbars-visible-always.theme-atom-material-syntax.theme-one-dark-ui.teletype-Authenticated)

Non-Core Packages

atom-dark-fusion-syntax 2.2.1 
atom-ide-ui 0.13.0 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
atom-panda-syntax 0.18.0 
autocomplete-python 1.16.0 
busy-signal 2.0.1 
fonts 3.9.0 
ide-python 1.5.0 
intentions 1.1.5 
kite 0.175.0 
language-babel 2.85.0 
language-javascript-jsx 0.3.7 
linter 2.3.1 
linter-flake8 2.4.0 
linter-ui-default 1.8.0 
script 3.25.0 
teletype 0.13.4 

`

@ghost
Copy link

ghost commented Dec 30, 2019

Same here.

@bekaertruben
Copy link

same.

@HE1CO
Copy link

HE1CO commented Jan 1, 2020

Got the same issue on macOS.

@TricolorHen061
Copy link

Same here.

@overly-excessive
Copy link

same issue on Manjaro Linux

@rubenayla
Copy link

The same. Trying to stop the execution of a python program that recognizes the tone of the sound from the mic, and prints the result.

@eula01
Copy link

eula01 commented Jan 6, 2020

same

1 similar comment
@ghost
Copy link

ghost commented Jan 7, 2020

same

@alekks
Copy link

alekks commented Jan 7, 2020

Same for me.
Atom: 1.42.0 x64
Electron: 4.2.7
OS: Microsoft Windows 10 Enterprise
Thrown From: script package 3.25.0

@Sonderwoods
Copy link

solved with this fix:

tcarlsen/atom-message-panel@529dcb5

@marcelinollano
Copy link

marcelinollano commented Jan 7, 2020

@Sonderwoods it sorta fixes it, because now if you close the panel clicking the x then try to run again it never opens again.

@marcelinollano
Copy link

marcelinollano commented Jan 7, 2020

I found this workaround to work #1984 (comment)

@aeonian-joy
Copy link

aeonian-joy commented Jan 9, 2020

Same here..
Atom : 1.42.0
Script : 3.25.0
OS : Win10 Pro

Though, I downgrade the version of Script from 3.25.0 to 3.18.1 now it is working fine. So for a time being this may be a workaround. Thanks to marcelinollano.

@ghost
Copy link

ghost commented Jan 11, 2020

@Sonderwoods it`s work thanks!

@pensierinmusica
Copy link

What @Sonderwoods proposes doesn't work. If you close the window then you can't open it again.

pensierinmusica referenced this issue in tcarlsen/atom-message-panel Jan 13, 2020
@pensierinmusica
Copy link

@rgbkrk any chance to see this fixed?

@xl33
Copy link

xl33 commented Jan 14, 2020

It's not a problem with the package itself. It comes from atom doesn't know where the scripts are. I have multiple problems with all packages at the moment and the reason is atom can't find the path of the package location

@pfandzelter
Copy link
Collaborator

What @Sonderwoods proposes doesn't work. If you close the window then you can't open it again.

It doesn't as the current code only creates a view on the first run, not again after you close it. You can see the code here. Hence the fix is to create the view every time you run a script. That is not necessarily a bug in carlsen/atom-message-panel (in fact I think this is the opposite of a bug: script stopped working when a bug on their side was fixed).

@pensierinmusica
Copy link

@pfandzelter so maybe atom-script should be modified to re-create a view if the previous one has been closed?

@pfandzelter
Copy link
Collaborator

@pensierinmusica That's what I think as well, hence this change in #2004

@guptacharchil
Copy link

same in ubunto also

@TheRealMRMango
Copy link

TheRealMRMango commented Jan 22, 2020

Same here
[Enter steps to reproduce:]

  1. ...Esc

Atom: 1.43.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/MyComputer/.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:349290)
    at KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1253549)
    at KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1249683)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:284496)

Commands

  8x -1:41.9.0 script:run (input.hidden-input)
     -1:06.9.0 script:close-view (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -0:03.3.0 core:cancel (a.btn-copy-report.icon.icon-clippy)

Non-Core Packages

script 3.25.0 

@EyeOdin
Copy link

EyeOdin commented Jan 27, 2020

Same here

@jameswilliams1
Copy link

jameswilliams1 commented Jan 27, 2020

Also get this when closing script:

/home/james/.atom/packages/script/node_modules/atom-message-panel/lib/MessagePanelView.js:189
Hide Stack Trace
TypeError: Cannot read property 'remove' of undefined
    at ScriptView.MessagePanelView.remove (/home/james/.atom/packages/script/node_modules/atom-message-panel/lib/MessagePanelView.js:189:30)
    at ScriptView.detach (/home/james/.atom/packages/autocomplete-python/node_modules/jquery/dist/jquery.js:5357:15)
    at ScriptView.removePanel (/home/james/.atom/packages/script/lib/script-view.js:89:10)
    at Object.closeScriptViewAndStopRunner (/home/james/.atom/packages/script/lib/script.js:161:21)
    at HTMLElement.scriptCloseView (/home/james/.atom/packages/script/lib/script.js:94:39)
    at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/<embedded>:11:349290)
    at CommandRegistry.dispatch (/usr/share/atom/resources/app/static/<embedded>:11:347765)
    at ScriptView.close (/home/james/.atom/packages/script/lib/script-view.js:99:19)
    at HTMLDivElement.<anonymous> (/home/james/.atom/packages/autocomplete-python/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLDivElement.dispatch (/home/james/.atom/packages/autocomplete-python/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (/home/james/.atom/packages/autocomplete-python/node_modules/jquery/dist/jquery.js:4121:28)

System:

Distributor ID:	Debian
Description:	Debian GNU/Linux bullseye/sid
Release:	testing
Codename:	bullseye

Atom:

Atom    : 1.43.0
Electron: 4.2.7
Chrome  : 69.0.3497.128
Node    : 10.11.0
script@3.25.0

Window refuses to close until atom is restarted after any code has been ran.

@aminya aminya closed this as completed Dec 30, 2020
@aminya aminya reopened this Dec 30, 2020
@aminya aminya removed the duplicate label Dec 30, 2020
@aminya
Copy link
Member

aminya commented Dec 30, 2020

Does this still happen in the latest version?

@aminya aminya added the bug label Dec 30, 2020
@aminya aminya pinned this issue Dec 30, 2020
@LoseUFaith
Copy link

click the X button just close the UI frame but the running process won't since this issue open........

@LoseUFaith
Copy link

Is that a feature?

@Clumsyoof
Copy link

Clumsyoof commented Nov 15, 2021

this problem is currently being faced in java by me and the above mentioned fixes dont work
Atom: 1.58.0 64x
Electron: 12.0.11
OS: Windows 10 pro 21H1 19043.1348 64x
Thrown From: script package 3.32.2
##Stack trace-
TypeError: Cannot read property 'includes' of undefined
^C

##Non-Core Packages:
Atom aframe 1.0.0
Atom live server 2.3.0
Minimap 4.40.0
Minimap pigment 0.2.2
pigment 0.40.6
devmind 1.3.0
emmit 2.4.3
busy signal 2.0.1
file icon 2.1.47
highlight selected 0.17.0
linter 3.4.0
TODO 0.6.0
script 3.32.2

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

No branches or pull requests