Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Uncaught TypeError: Cannot read property 'split' of undefined #249

Open
HRyii opened this issue Oct 19, 2017 · 10 comments
Open

Uncaught TypeError: Cannot read property 'split' of undefined #249

HRyii opened this issue Oct 19, 2017 · 10 comments

Comments

@HRyii
Copy link

HRyii commented Oct 19, 2017

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.1 ia32
Electron: 1.6.15
OS: Unknown Windows version
Thrown From: git-control package 0.9.0

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At C:\Users\Administrator\.atom\packages\git-control\lib\git-control-view.coffee:76

TypeError: Cannot read property 'split' of undefined
    at GitControlView.module.exports.GitControlView.initialize (/packages/git-control/lib/git-control-view.coffee:76:50)
    at /packages/git-plus/node_modules/space-pen/lib/space-pen.js:184:25)
    at /packages/git-control/lib/git-control-view.coffee:36:7)
    at Object.toggleView (/packages/git-control/lib/git-control.coffee:31:18)
    at /packages/git-control/lib/git-control.coffee:18:57)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.21.1/resources/app/src/command-registry.js:381:36)
    at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.21.1/resources/app/src/command-registry.js:266:23)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.21.1/resources/app/src/atom-environment.js:1348:34)
    at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.21.1/resources/app/src/application-delegate.js:335:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -3:38.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)
     -3:23.8.0 git-control:toggle (input.hidden-input)
     -1:30.9.0 core:confirm (input.hidden-input)
     -0:12.4.0 git-control:toggle (button.btn.btn-default.icon.icon-link-external)

Non-Core Packages

activate-power-mode 2.6.0 
activate-power-mode-delete 0.6.1 
atom-beautify 0.30.5 
atom-clock 0.1.15 
atom-html-preview 0.2.2 
atom-material-syntax 1.0.7 
atom-monokai 0.10.9 
atom-monokai-dark 0.4.0 
atom-monokai-php 1.0.0 
atom-terminal-panel 4.4.4 
atom-ternjs 0.18.3 
autocomplete-html-entities 0.1.0 
autocomplete-java 1.2.7 
autocomplete-json 5.5.0 
busy-signal 1.4.3 
chester-atom-syntax 0.3.0 
dash-syntax 0.4.1 
dash-ui 0.4.3 
docblockr 0.11.0 
ex-mode 0.18.0 
file-icons 2.1.13 
git-control 0.9.0 
git-plus 7.10.0 
git-split-diff-hyperclick 0.3.12 
goto-definition 1.3.4 
gruvbox-plus-syntax 1.3.1 
hey-pane 1.0.0 
highlight-selected 0.13.1 
hyperclick 0.1.5 
intentions 1.1.5 
js-hyperclick 1.11.1 
laravel 0.7.1 
linter 2.2.0 
linter-jshint 3.1.6 
linter-php 1.5.1 
linter-ui-default 1.6.10 
linter-write-good 0.9.0 
minimap 4.29.7 
minimap-autohide 0.10.1 
minimap-bookmarks 0.4.2 
minimap-codeglance 0.4.7 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-linter 2.1.1 
minimap-pigments 0.2.2 
minimap-selection 4.5.0 
minimap-split-diff 0.3.7 
monokai 0.24.0 
monokai-seti 0.9.0 
ninja-atom-syntax 0.1.2 
nord-atom-ui 0.11.0 
one-dark-shade-ui 0.1.0 
php-cs-fixer 4.1.1 
php-hyperclick 1.2.1 
php-integrator-autocomplete-plus 1.6.0 
php-integrator-navigation 1.2.1 
php-integrator-tooltips-legacy-php56 1.1.6 
power-mode 0.1.3 
pristine-ui 1.1.10 
remote-sync 4.1.6 
scroll-through-time 0.2.0 
seti-icons 1.5.4 
simplified-chinese-menu 5.3.4 
split-diff 1.5.1 
terminal-plus 0.14.5 
toggler 0.3.0 
tree-view-git-branch 0.1.2 
tree-view-git-status 1.4.0 
wombat-dark-syntax 1.2.0 
@TinoPilot
Copy link

This error was fixed – thanks: jayspirits

@antoniochacon
Copy link

i still have the same error, how did you fix it?

@ttristan
Copy link

@antoniochacon, read my comment in the pull request:
#247

@leaderhome
Copy link

.atom\packages\git-control\lib\git-control-view.coffee
line 76
@setWorkspaceTitle(git.getRepository().path.split('/').reverse()[1])

@setWorkspaceTitle(git.getRepository())
or
@setWorkspaceTitle('')

@pashute
Copy link

pashute commented Oct 24, 2017

From the pull request: by ts-de:

thanks @jayspirits
for those who don't know how to fix until the new version is released:
move to C:\Users[username].atom\packages\git-control\lib\git-control-view.coffee and change line 76 to:
@setWorkspaceTitle(git.getRepository().repo.workingDirectory.split('/').reverse()[1])

Works!

It seems the same problem exists when I press PROJECT. I get:

Uncaught TypeError: Path must be a string. Received undefined
path.js:7

TypeError: Path must be a string. Received undefined
 at assertPath (path.js:7:11)
 at Object.resolve (path.js:186:7)
 at fn (file:///C:/Users/pashute/.atom/packages/git-control/lib/dialogs/project-dialog.coffee:33:44)
 at ProjectDialog.module.exports.ProjectDialog.activate (file:///C:/Users/pashute/.atom/packages/git-control/lib/dialogs/project-dialog.coffee:28:5)
 at GitControlView.module.exports.GitControlView.projectMenuClick (file:///C:/Users/pashute/.atom/packages/git-control/lib/git-control-view.coffee:147:20)
 at MenuView.module.exports.MenuView.click (file:///C:/Users/pashute/.atom/packages/git-control/lib/views/menu-view.coffee:50:7)
 at MenuItem.click (file:///C:/Users/pashute/.atom/packages/git-control/lib/views/menu-view.coffee:39:17)
at HTMLDivElement.<anonymous> (C:\Users\pashute\.atom\packages\git-control\node_modules\space-pen\lib\space-pen.js:231:38)
at HTMLDivElement.dispatch (C:\Users\pashute\.atom\packages\git-control\node_modules\jquery\dist\jquery.js:4435:9)
at HTMLDivElement.elemData.handle (C:\Users\pashute\.atom\packages\git-control\node_modules\jquery\dist\jquery.js:4121:28)

@antoniochacon
Copy link

antoniochacon commented Oct 24, 2017

thanks @TS-DE , it works

@plaformsre
Copy link

Still a problem
ypeError: Cannot read property 'split' of undefined at GitControlView.module.exports.GitControlView.initialize (file:///C:/Users/Dejan/.atom/packages/git-control/lib/git-control-view.coffee:76:50) at GitControlView.View [as constructor] (C:\Users\Dejan\.atom\packages\git-plus\node_modules\space-pen\lib\space-pen.js:184:25) at new GitControlView (file:///C:/Users/Dejan/.atom/packages/git-control/lib/git-control-view.coffee:36:7) at Object.toggleView (file:///C:/Users/Dejan/.atom/packages/git-control/lib/git-control.coffee:31:18) at HTMLElement.<anonymous> (file:///C:/Users/Dejan/.atom/packages/git-control/lib/git-control.coffee:18:57) at CommandRegistry.handleCommandEvent (C:\Users\Dejan\AppData\Local\atom\app-1.22.1\resources\app\src\command-registry.js:381:36) at CommandRegistry.dispatch (C:\Users\Dejan\AppData\Local\atom\app-1.22.1\resources\app\src\command-registry.js:266:23) at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\Dejan\AppData\Local\atom\app-1.22.1\resources\app\src\atom-environment.js:1382:34) at EventEmitter.outerCallback (C:\Users\Dejan\AppData\Local\atom\app-1.22.1\resources\app\src\application-delegate.js:335:31) at emitThree (events.js:116:13) at EventEmitter.emit (events.js:194:7)

@Ace5040
Copy link

Ace5040 commented Nov 17, 2017

have this error too right after upate to 1.22.0

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.22.1 x64
Electron: 1.6.15
OS: linux 4.13.13-1-ck
Thrown From: git-control package 0.9.0

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At /home/ace/.atom/packages/git-control/lib/git-control-view.coffee:76

TypeError: Cannot read property 'split' of undefined
    at GitControlView.module.exports.GitControlView.initialize (/packages/git-control/lib/git-control-view.coffee:76:50)
    at /packages/terminal-plus/node_modules/space-pen/lib/space-pen.js:184:25)
    at /packages/git-control/lib/git-control-view.coffee:36:7)
    at Object.toggleView (/packages/git-control/lib/git-control.coffee:31:18)
    at /packages/git-control/lib/git-control.coffee:18:57)
    at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:381:30)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:617:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:408:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/lib/atom/src/window-event-handler.js:100:36)
    at HTMLDocument.<anonymous> (/usr/lib/atom/src/window-event-handler.js:3:59)

Commands

     -1:24 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)
     -1:22.1.0 git-control:toggle (div.panels-item)
     -1:16.6.0 core:cancel (div.panels-item)
     -1:11.7.0 intentions:highlight (input.hidden-input)
     -1:11.4.0 git-control:toggle (input.hidden-input)

Non-Core Packages

atom-autocomplete-php 0.25.6 
atom-ide-ui 0.5.4 
atom-languageclient 1.0.7 
busy-signal 1.4.3 
chary-tree-view 0.2.13 
duplicate-line-or-selection 0.9.0 
file-icons 2.1.13 
flow-ide 1.9.0 
git-control 0.9.0 
git-diff-details 1.4.0 
git-log 0.4.1 
git-plus 7.10.0 
git-split-diff-hyperclick 0.3.12 
git-time-machine 1.5.9 
goto-definition 1.3.4 
hyperclick 0.0.0 
ide-json 0.1.0 
ide-php 0.6.10 
ide-typescript 0.7.0 
intentions 1.1.5 
js-hyperclick 1.12.2 
linter 2.2.0 
linter-ui-default 1.6.10 
menu-editor 0.2.0 
php-debug 0.2.5 
php-hyperclick 1.2.1 
php-twig 4.0.0 
project-manager 3.3.5 
split-diff 1.5.1 
teletype 0.1.4 
termination 0.6.1 
tree-view-git-status 1.4.0 
zentabs 0.8.9 

@Jipem
Copy link

Jipem commented Nov 19, 2017

Hello,

Same error :

Atom: 1.22.1 x64
Electron: 1.6.15
OS: Windows 10
Thrown From: git-control package 0.9.0

Stack Trace

Uncaught TypeError: Cannot read property 'split' of undefined

At C:\Users\jipem\.atom\packages\git-control\lib\git-control-view.coffee:76

TypeError: Cannot read property 'split' of undefined
    at GitControlView.module.exports.GitControlView.initialize (/packages/git-control/lib/git-control-view.coffee:76:50)
    at /packages/Remote-FTP/node_modules/space-pen/lib/space-pen.js:184:25)
    at /packages/git-control/lib/git-control-view.coffee:36:7)
    at Object.toggleView (/packages/git-control/lib/git-control.coffee:31:18)
    at /packages/git-control/lib/git-control.coffee:18:57)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.22.1/resources/app/src/command-registry.js:381:36)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.22.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.22.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.22.1/resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.22.1/resources/app/src/window-event-handler.js:3:65)

Commands

     -5:18.1.0 git-control:toggle (atom-pane.pane.active)
     -4:48.1.0 window:toggle-dev-tools (ul.list-inline.tab-bar.inset-panel)
     -0:48.4.0 git-control:toggle (div.package-detail.panels-item)

Non-Core Packages

atom-beautify 0.30.6 
git-control 0.9.0 
project-viewer 1.2.5 
Remote-FTP 1.3.1 

@ghost
Copy link

ghost commented Nov 28, 2017

Hi Devteam.

When fix bug?

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

No branches or pull requests

9 participants