lucasmazza / copy-as-rtf

A package to export highlighted code as RTF
Other
19 stars 13 forks source link

Uncaught TypeError: Cannot read property 'getGrammar' of undefined #34

Open OvermindDL1 opened 8 years ago

OvermindDL1 commented 8 years ago
  1. Installed this
  2. Selected text
  3. Hit <Alt+r>

Atom Version: 1.9.4 System: Microsoft Windows 10 Pro Thrown From: copy-as-rtf package, v0.9.3

Stack Trace

Uncaught TypeError: Cannot read property 'getGrammar' of undefined

At /C:/Users/<user>/.atom/packages/copy-as-rtf/lib/copy-as-rtf.coffee:39

TypeError: Cannot read property 'getGrammar' of undefined
    at Object.module.exports.copy (file:///C:/Users/<user>/.atom/packages/copy-as-rtf/lib/copy-as-rtf.coffee:26:21)
    at atom-workspace.<anonymous> (file:///C:/Users/<user>/.atom/packages/copy-as-rtf/lib/copy-as-rtf.coffee:22:65)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\src\command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:388:22)
    at KeymapManager.module.exports.KeymapManager.terminatePendingState (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:561:14)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:432:21)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\src\window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (C:\Users\<user>\AppData\Local\atom\app-1.9.4\resources\app.asar\src\window-event-handler.js:3:61)

Commands

  5x -1:10.3.0 blur (atom-text-editor.editor.is-focused)
     -1:06.7.0 linter:lint (atom-text-editor.editor.is-focused)
     -1:01.8.0 core:copy (atom-text-editor.editor.is-focused)
  4x -0:57.8.0 blur (atom-text-editor.editor.is-focused)
     -0:31 copy-as-rtf:copy (atom-text-editor.editor.is-focused)
     -0:30.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:30.6.0 blur (atom-text-editor.editor.is-focused)
     -0:23.3.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:23.3.0 core:cancel (atom-text-editor.editor.mini.is-focused)
  4x -0:23.3.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:10.7.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-solarized-dark-syntax.theme-atom-dark-ui)
  5x -0:10.6.0 blur (atom-text-editor.editor.is-focused)
     -0:02.7.0 copy-as-rtf:copy (atom-text-editor.editor)
  3x -0:02.5.0 blur (div.panels-item)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "autocomplete-go",
      "atom-powersnap",
      "activate-power-mode-delete",
      "autocomplete-dcd",
      "elm",
      "autocomplete-en-en",
      "spell-check",
      "latex-completions",
      "erlang-build"
    ],
    "projectHome": "C:\\Users\\<user>\\Projects",
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  },
  "copy-as-rtf": {
    "style": "default"
  }
}

Installed Packages

# User
activate-power-mode, v0.7.2 (active)
activate-power-mode-delete, v0.6.1 (inactive)
ascii-codes, v0.3.3 (active)
ascii-hex, v0.2.0 (active)
ascii-unicode-escape, v0.2.2 (inactive)
atom-autocomplete-erlang, v0.6.19 (active)
atom-beautify, v0.29.10 (inactive)
atom-csv-markdown, v1.0.2 (inactive)
atom-elixir, v0.2.1 (active)
atom-elixir-playground, v0.1.0 (inactive)
atom-formatter-jsbeautify, v1.1.2 (active)
atom-powersnap, v0.1.4 (inactive)
atom-solarized-dark-ui, v0.25.0 (inactive)
atom-sql-list, v0.3.1 (inactive)
atom-svg-icon-snippets, v0.3.3 (active)
atomic-chrome, v0.3.0 (active)
autocomplete-asciidoc, v0.1.1 (active)
autocomplete-awk, v0.1.2 (active)
autocomplete-cmake, v0.3.1 (active)
autocomplete-elixir, v1.5.14 (active)
autocomplete-emojis, v2.5.0 (active)
autocomplete-en-en, v0.2.0 (inactive)
autocomplete-erlang, v1.1.2 (active)
autocomplete-fortran, v0.9.1 (active)
autocomplete-gdscript, v0.4.0 (active)
autocomplete-glsl, v0.2.3 (active)
autocomplete-haskell, v0.6.5 (inactive)
autocomplete-html-entities, v0.1.0 (active)
autocomplete-java, v1.2.5 (inactive)
autocomplete-js-import, v1.0.1 (active)
autocomplete-json, v5.1.0 (active)
autocomplete-mathjax, v0.1.1 (active)
autocomplete-modules, v1.5.2 (active)
autocomplete-oracle, v0.4.0 (active)
autocomplete-php, v0.3.7 (active)
autocomplete-plus-clang, v0.1.0 (inactive)
autocomplete-python, v1.8.4 (active)
autocomplete-xml, v0.8.3 (active)
build, v0.65.0 (active)
build-elixir, v0.6.0 (active)
build-powershell, v0.5.2 (active)
busy, v0.6.0 (active)
camelify, v0.1.1 (inactive)
character-table, v0.4.3 (active)
clipboard-plus, v0.5.1 (active)
copy-as-rtf, v0.9.3 (active)
copy-with-syntax, v0.0.3 (inactive)
css-to-inline, v1.1.0 (inactive)
data-atom, v0.22.0 (active)
elixir-cmd, v0.2.9 (active)
elm-format, v2.0.1 (active)
elm-snippets, v0.1.0 (active)
emmet, v2.4.3 (active)
emoji-code, v0.3.2 (active)
erlang-autocompile, v0.1.1 (active)
erlang-build, v0.3.0 (inactive)
es-identifier-highlight, v0.2.11 (active)
escape-utils, v0.5.2 (inactive)
filesize, v0.4.2 (active)
fill-line, v1.0.0 (active)
fold-functions, v0.4.3 (active)
font-awesome-snippetset, v0.0.6 (active)
fonts, v1.6.0 (active)
format-sql, v0.3.0 (inactive)
git-checkout, v0.3.2 (active)
git-clone, v0.1.5 (inactive)
git-commit, v1.5.3 (active)
git-control, v0.8.2 (inactive)
git-controlhub, v0.3.0 (inactive)
git-diff-details, v1.3.0 (active)
git-history, v3.2.0 (inactive)
git-log, v0.4.1 (active)
git-plus, v5.16.2 (inactive)
git-status, v0.3.4 (inactive)
git-time-machine, v1.5.3 (inactive)
go-config, v1.2.1 (active)
go-get, v1.0.3 (active)
goto, v1.7.1 (inactive)
hex, v0.6.2 (active)
highlight-bad-chars, v1.0.5 (active)
html-entitize, v1.1.0 (active)
html-to-elm, v0.2.0 (inactive)
language-asn1, v0.3.0 (active)
language-batchfile, v0.4.0 (active)
language-csv, v1.1.2 (active)
language-elixir, v0.15.0 (active)
language-elm, v1.5.0 (active)
language-elmx, v1.2.6 (active)
language-erlang, v3.0.0 (active)
language-javascript-jsx, v0.3.7 (active)
language-jsx, v0.1.1 (inactive)
language-oracle, v1.4.1 (active)
language-pgsql, v0.2.3 (active)
language-powershell, v2.1.1 (active)
language-story, v1.2.0 (active)
language-svg, v0.9.0 (active)
latex-completions, v0.3.1 (inactive)
linter, v1.11.14 (active)
linter-checkbashisms, v0.1.5 (active)
linter-elixir-credo, v1.1.0 (active)
linter-elm-make, v0.14.0 (active)
linter-erlang, v0.3.1 (active)
linter-erlang-dialyzer, v0.0.1 (active)
markdown-helpers, v0.3.0 (inactive)
minimap, v4.24.7 (active)
minimap-bookmarks, v0.3.1 (active)
minimap-codeglance, v0.4.5 (active)
minimap-cursorline, v0.2.0 (active)
minimap-git-diff, v4.3.1 (active)
minimap-highlight-selected, v4.4.0 (active)
minimap-linter, v1.1.1 (active)
minimap-pigments, v0.2.1 (active)
minimap-selection, v4.4.0 (active)
minimap-titles, v1.7.2 (inactive)
multi-cursor-plus, v1.0.3 (inactive)
open-git-modified-files, v0.2.3 (inactive)
open-no-binaries, v0.1.1 (active)
oracle-format, v0.4.0 (inactive)
phoenix-elixir-snippets, v0.4.0 (active)
phoenix-toggle-test, v0.2.0 (inactive)
pigments, v0.31.2 (active)
project-colorize, v0.2.0 (active)
qolor, v0.2.2 (active)
quantum-shell, v0.7.1 (inactive)
quick-query, v0.8.4 (inactive)
react, v0.15.0 (active)
resize-indent, v0.3.0 (active)
script, v3.8.3 (inactive)
seti-ui, v1.3.2 (inactive)
shell-it, v0.2.1 (inactive)
solarized-dark-ui, v0.3.1 (inactive)
solarized-one-dark-syntax, v1.1.0 (inactive)
solid-execut0r, v2.0.0 (inactive)
sort-lines, v0.14.0 (inactive)
sorter, v0.1.2 (inactive)
special-symbols, v0.1.0 (inactive)
svg-preview, v0.8.0 (active)
svgo, v2.1.2 (inactive)
tabular, v0.1.0 (active)
text-manipulation, v0.6.0 (active)
tree-view-git-branch, v0.1.2 (active)
tree-view-git-status, v1.1.0 (active)
unicode-input, v0.5.1 (inactive)
url-encode, v0.5.0 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (active)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (inactive)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (inactive)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (active)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (active)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.38.2 (active)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (inactive)
status-bar, v1.4.0 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.0 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
Sel1kk commented 7 years ago

See the same after instaling copy-as-rtf.

JamesABaker commented 5 years ago

I only recieve this error type when trying to copy a Commit preview generated by the GitHub package.

[Enter steps to reproduce:]

  1. Show all staged changes
  2. Highlight text
  3. Hit <alt+r>

Atom: 1.34.0 x64 Electron: 2.0.16 OS: Mac OS X 10.14.2 Thrown From: copy-as-rtf package 0.9.3

Stack Trace

Uncaught TypeError: Cannot read property 'getGrammar' of undefined

At /Users/bakerjames/.atom/packages/copy-as-rtf/lib/copy-as-rtf.coffee:26

TypeError: Cannot read property 'getGrammar' of undefined
    at Object.copy (/packages/copy-as-rtf/lib/copy-as-rtf.coffee:26:22)
    at /packages/copy-as-rtf/lib/copy-as-rtf.coffee:22:65)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:350017)
    at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1212945)
    at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1209079)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:285196)

Commands

  3x -8:56.3.0 copy-with-style:preset1 (atom-text-editor.editor.is-focused.has-selection)
  3x -4:36.1.0 copy-as-rtf:copy (atom-text-editor.editor.is-focused.has-selection)
     -1:40.1.0 github:view-staged-changes-for-current-file (div.line-number.cursor-line.git-line-added)
  2x -1:05.6.0 core:select-all (atom-text-editor.editor.is-focused)
     -1:02.3.0 copy-as-rtf:copy (atom-text-editor.editor.is-focused.has-selection)

Non-Core Packages

atom-beautify 0.33.4 
copy-as-rtf 0.9.3 
language-gitignore 0.3.0 
language-latex 1.2.0 
markdown-pdf 2.2.0 
minimap 4.29.9 
pdf-view 0.71.0