Kerollmops / Kerollmops/atom-header-42

Uncaught TypeError: Cannot read property 'getPath' of undefined

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
15
Forks
4
PR merge metrics
No merged PRs in 30d

Description

1. Just try to execute it.
2. ...

**Atom Version**: 1.2.4
**System**: Mac OS X 10.10.5
**Thrown From**: [header-42](https://github.com/Kerosene2000/atom-header-42) package, v0.3.0
### Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

```
At /Users/ssteiner/.atom/packages/header-42/lib/header-42.coffee:63

TypeError: Cannot read property 'getPath' of undefined
at Object.module.exports.Header42.getHeaderText (/Users/ssteiner/.atom/packages/header-42/lib/header-42.coffee:63:36)
at Object.module.exports.Header42.getHeader (/Users/ssteiner/.atom/packages/header-42/lib/header-42.coffee:71:21)
at Object.module.exports.Header42.insert (/Users/ssteiner/.atom/packages/header-42/lib/header-42.coffee:106:15)
at atom-workspace.subscriptions.add.atom.commands.add.header-42:insert (/Users/ssteiner/.atom/packages/header-42/lib/header-42.coffee:38:31)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
at HTMLDocument. (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)
```
### Commands

```
5x -6:23 core:backspace (atom-text-editor.editor.is-focused)
-6:20 core:save (atom-text-editor.editor.is-focused)
-1:07.8.0 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
2x -0:58.1.0 core:move-down (atom-text-editor.editor.mini.is-focused)
-0:57.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:57.3.0 settings-view:install-packages-and-themes (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:54 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:30.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:27.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:25.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:25.5.0 auto-header:generate (atom-text-editor.editor)
20x -0:23.5.0 core:move-up (atom-text-editor.editor.is-focused)
-0:05.7.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-base16-tomorrow-dark-theme.theme-atom-dark-ui)
-0:01.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:01.6.0 header-42:insert (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-base16-tomorrow-dark-theme.theme-atom-dark-ui)
```
### Config

``` json
{
"core": {
"disabledPackages": [
"metrics"
],
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
]
}
}
```
### Installed Packages

``` coffee
# User
Sublime-Style-Column-Selection, v1.3.0
atom-beautify, v0.28.19
auto-header, v0.2.4
block-comment, v0.4.3
block-cursor, v0.13.1
comment-headers, v2.13.0
commentcode, v0.1.0
header-42, v0.3.0
jshint, v1.8.3
linter, v1.11.3
minimap, v4.16.2
pigments, v0.19.1
sass-watch, v0.3.1

# Dev
No dev packages
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at lib/header-42.coffee:63 and reproduce the failure by invoking the header-42:insert command, as shown in the stack trace. The work is done when that command no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.