bus-stop / Termination

Integrated terminal for Atom. Looks like terminal-plus, acts like your native terminal (except every other Friday). Looking for collaborators! :-)
https://atom.io/packages/termination
MIT License
86 stars 7 forks source link

Uncaught TypeError: Cannot set property '0' of undefined #97

Closed BrennanAyers closed 5 years ago

BrennanAyers commented 5 years ago

Enter steps to reproduce:

  1. Be using Termination as normal
  2. Have files to commit in Git
  3. Have a prebuilt COMMIT_EDITMSG
  4. Type gc, which opens vi to edit commit message
  5. Throw Exception

This is the current commit message that I believe started these issues, as we had been using this workflow for the previous hours/days. This exception only gets thrown in Termination, using normal Mac Terminal will not cause issues on loading vi.


Co-Authored-By: Me <my-email@email.com>
Co-Authored-By: Teammate1 <teammate1-email@email.com>
Co-Authored-By: Teammate2 <teammate2-email@email.com>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch 7-email-activiation
# Changes to be committed:
#       modified:   app/views/verification_mailer/verification_email.html.erb
#       modified:   app/views/verification_mailer/verification_email.text.erb
#
# Changes not staged for commit:
#       modified:   app/controllers/users_controller.rb
#       modified:   config/routes.rb
#       modified:   spec/features/user/user_receives_activation_email_on_registration_spec.rb
#
# Untracked files:
#       app/controllers/email_verification_controller.rb

Atom: 1.38.2 x64 Electron: 2.0.18 OS: Mac OS X 10.14.5 Thrown From: termination package 0.7.1

Stack Trace

Uncaught TypeError: Cannot set property '0' of undefined

At /Users/brennan/.atom/packages/termination/node_modules/term.js/src/term.js:1939

TypeError: Cannot set property '0' of undefined
    at Terminal.write (/packages/termination/node_modules/term.js/src/term.js:1939:55)
    at /packages/termination/lib/view.coffee:141:17
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:38293
    at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1206583)
    at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1208024)
    at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:37394)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Commands

     -0:47.5.0 termination:toggle (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

atom-html-preview 0.2.6 
busy-signal 2.0.1 
erb-snippets 1.1.0 
file-icons 2.1.32 
intentions 1.1.5 
language-slim 1.0.0 
linter 2.3.0 
linter-ruby 1.3.1 
linter-slim 2.0.0 
linter-ui-default 1.7.1 
markdown-preview-plus 3.8.1 
minimap 4.29.9 
minimap-autohider 1.6.0 
rainbow-csv 0.3.0 
remove-whitespace 0.2.1 
teletype 0.13.4 
termination 0.7.1 
BrennanAyers commented 5 years ago

This is something that popped up after I tried to reenable the package today. I think it's unrelated to the above issue, but it might not be. For context, I installed Python 3.7.4 just this previous week, after the above issue cropped up.

prebuild-install WARN install No prebuilt binaries found (target=3.1.10 runtime=electron arch=x64 libc= platform=darwin)
gyp ERR! configure error 
gyp ERR! stack Error: Python executable "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh" is v3.7.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at PythonFinder.failPythonVersion (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js:501:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Socket.emit (events.js:211:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:554:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--build_v8_with_gn=false"
gyp ERR! cwd /Users/brennan/.atom/packages/termination/node_modules/node-pty-prebuilt
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt@0.7.6 install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-pty-prebuilt@0.7.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/brennan/.atom/.apm/_logs/2019-07-27T00_04_54_842Z-debug.log
BrennanAyers commented 5 years ago

Refer to #96