sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

Uncaught TypeError: wrapGuide.updateGuide is not a function #232

Closed liatreis closed 5 years ago

liatreis commented 5 years ago

UPDATE 2019/04/24: If you're seeing this error, please make sure you have version v2.4.0 of editorconfig installed (or newer). Some users may need to upgrade the package manually.

If you see an error linking to this issue, and have updated to v2.4.0, then the problem is unrelated. Please open a new issue instead.


  1. Searched for a word in a file
  2. Results in search bar showing 5 (or sometimes non although there are 5) but not highlighted in the file

Atom: 1.36.0-nightly9 x64 Electron: 2.0.16 OS: Mac OS X 10.12.6 Thrown From: editorconfig package 2.2.2

Stack Trace

Uncaught TypeError: wrapGuide.updateGuide is not a function

At /Users/Liat/.atom/packages/editorconfig/index.js:102

TypeError: wrapGuide.updateGuide is not a function
    at Object.applySettings (/packages/editorconfig/index.js:102:17)
    at observeActivePaneItem (/packages/editorconfig/index.js:244:36)
    at Function.simpleDispatch (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1170837)
    at Emitter.emit (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1172278)
    at Workspace.didChangeActivePaneItemOnPaneContainer (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:423932)
    at WorkspaceCenter.paneContainer.onDidChangeActivePaneItem.t (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:38690)
    at Function.simpleDispatch (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1170837)
    at Emitter.emit (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1172278)
    at PaneContainer.didChangeActiveItemOnPane (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:446215)
    at Pane.setActiveItem (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:455075)
    at Pane.activateItem (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:457245)
    at TabBarView.t.exports.TabBarView.onClick (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1121924)

Commands

     -1:03.0 find-and-replace:show (input.hidden-input)
  9x -1:00.9.0 core:confirm (input.hidden-input)
     -0:52.4.0 find-and-replace:show (input.hidden-input)
  2x -0:51 core:backspace (input.hidden-input)
     -0:50.3.0 project-find:show (input.hidden-input)
     -0:48.9.0 core:confirm (input.hidden-input)
     -0:41.1.0 core:undo (input.hidden-input)
     -0:40.5.0 find-and-replace:show (input.hidden-input)
  2x -0:38.7.0 core:backspace (input.hidden-input)
  2x -0:37.4.0 core:undo (input.hidden-input)
     -0:36 core:move-up (input.hidden-input)
  5x -0:35.4.0 core:confirm (input.hidden-input)
     -0:33.9.0 editor:select-to-first-character-of-line (input.hidden-input)
     -0:33.6.0 core:backspace (input.hidden-input)
     -0:24.5.0 find-and-replace:show (input.hidden-input)
  6x -0:23.7.0 core:confirm (input.hidden-input)

Non-Core Packages

atom-handlebars 1.3.0 
atom-text-transformer 0.7.0 
atom-typescript 12.7.3 
autoclose-html 0.23.0 
autocomplete-html-entities 0.2.0 
blame 1.1.0 
busy-signal 1.4.3 
editorconfig 2.2.2 
ember-cli-helper 0.18.0 
esformatter 3.0.0 
file-icons 2.1.26 
git-blame 1.8.0 
highlight-line 0.12.0 
highlight-selected 0.14.0 
html-entities 0.4.0 
intentions 1.1.5 
language-vue 0.23.1 
line-ending-converter 1.3.2 
linter 2.2.0 
linter-eslint 8.4.1 
linter-jsonlint 1.3.0 
linter-sass-lint 1.8.3 
linter-tslint 1.9.1 
linter-ui-default 1.7.1 
merge-conflicts 1.4.5 
minimap 4.29.9 
minimap-autohide 0.10.1 
multi-cursor 2.1.5 
package-cop 0.2.10 
pretty-json 2.0.3 
project-manager 3.3.6 
sequential-number 0.5.0 
split-diff 1.5.3 
sync-settings 0.8.6 
adamreisnz commented 5 years ago

I'm being spammed by this issue every time I switch to another file/tab. Latest nightly.

Alhadis commented 5 years ago

Heads up: I believe this issue was introduced by the recent addition of multiple wrap-guides (see atom/wrap-guide#56). I've fixed the issue, but things won't play nicely if one has multiple wrap-guides set in their config.cson files.

marvinschopf commented 5 years ago

I'm being spammed by this issue every time I switch to another file/tab. Latest nightly.

Me too. @Alhadis

Alhadis commented 5 years ago

@MagicMarvMan That really doesn't tell me much. Is it this exact same error, with the precise message, or something else? What OS and version of Atom are you running? Do you have the latest version of editorconfig installed?

Alhadis commented 5 years ago

I just ran the test suite in Atom Nightly. They pass fine, and I can't reproduce the issue.

Whatever you're experiencing is probably unrelated (if you have the latest version of each program/package installed), or due to an outdated installation.

titovanton commented 5 years ago

and me @Alhadis which data I need to share with you, to make this reproducable?

Alhadis commented 5 years ago

which data I need to share with you, to make this reproducable?

I'll repeat my own comment:

Is it this exact same error, with the precise message, or something else? What OS and version of Atom are you running? Do you have the latest version of editorconfig installed?

titovanton commented 5 years ago

@Alhadis sorry for the useless report I've just updated all packeges, the issue is gone. @liatreis , do the same :)

trusktr commented 5 years ago

After upgrading to Atom 1.36.0, I am now getting this error too.

Screen Shot 2019-04-18 at 8 36 33 PM
debug info with package info ```json { "atom": "1.36.0", "platform": "darwin", "release": "18.2.0", "vmpVersion": "1.36.0", "vmpConfig": {}, "activeCommunityPackages": [ "language-javascript-jsx: 0.3.7", "atom-material-syntax: 1.0.8", "aligner-javascript: 1.3.0", "atom-ide-ui: 0.13.0", "atom-ide-busy-signal: 0.0.0", "atom-ide-code-actions: 0.0.0", "atom-ide-code-format: 0.0.0", "atom-ide-code-highlight: 0.0.0", "atom-ide-console: 0.0.0", "atom-ide-datatip: 0.0.0", "atom-ide-debugger: 0.0.0", "atom-ide-definitions: 0.0.0", "atom-ide-diagnostics: 0.0.0", "atom-ide-diagnostics-ui: 0.0.0", "atom-ide-find-references: 0.0.0", "atom-ide-global: 0.0.0", "atom-ide-outline-view: 0.0.0", "atom-ide-refactor: 0.0.0", "atom-ide-signature-help: 0.0.0", "atom-ide-terminal: 0.0.0", "hyperclick: 0.0.0", "atom-vim-like-tab: 1.5.1", "autocomplete-modules: 2.2.2", "autocomplete-paths: 2.12.2", "better-git-blame: 0.4.7", "busy-signal: 1.4.3", "disable-keybindings: 0.6.0", "docblockr: 0.13.7", "emmet: 2.4.3", "ex-mode-sort: 1.0.0", "file-icons: 2.1.21", "file-watcher: 1.2.6", "git-plus: 8.1.0", "hey-pane: 1.1.0", "highlight-line: 0.12.0", "highlight-selected: 0.13.1", "imdone-atom: 2.4.29", "indent-guide-improved: 1.4.13", "intentions: 1.1.5", "keystroke: 0.4.0", "minimap: 4.29.8", "minimap-find-and-replace: 4.5.2", "minimap-git-diff: 4.3.1", "minimap-highlight-selected: 4.6.1", "minimap-linter: 2.2.1", "minimap-pigments: 0.2.2", "minimap-quick-highlight: 1.0.1", "pigments: 0.40.2", "prettier-atom: 0.56.2", "project-plus: 1.0.0", "quick-highlight: 0.13.0", "split-diff: 1.4.0", "teletype: 0.13.2", "todo-show: 2.3.0", "tree-view-git-status: 1.5.0", "vim-mode-plus: 1.36.0", "vim-mode-plus-keymaps-for-surround: 0.2.1", "editorconfig: 2.2.2", "language-jenkinsfile: 0.1.1", "language-vue: 0.23.1", "language-pug: 0.0.22", "termination: 0.7.1" ] } ```

I can reproduce every time I open the GitHub panel on the right, for example.

stevenvaleri commented 5 years ago

Same issue - occurs every time I switch windows.

Screen Shot 2019-04-19 at 10 53 47 AM

TypeError: wrapGuide.updateGuide is not a function at Object.applySettings (/Users/valerst/.atom/packages/editorconfig/index.js:102:17) at observeActivePaneItem (/Users/valerst/.atom/packages/editorconfig/index.js:244:36) at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/:11:1172021) at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/:11:1173462) at Workspace.didChangeActivePaneItemOnPaneContainer (/Applications/Atom.app/Contents/Resources/app/static/:11:424536) at WorkspaceCenter.paneContainer.onDidChangeActivePaneItem.t (/Applications/Atom.app/Contents/Resources/app/static/:14:38690) at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/:11:1172021) at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/:11:1173462) at PaneContainer.didChangeActiveItemOnPane (/Applications/Atom.app/Contents/Resources/app/static/:11:446819) at Pane.setActiveItem (/Applications/Atom.app/Contents/Resources/app/static/:11:455679) at Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/static/:11:457849) at TabBarView.t.exports.TabBarView.onClick (/Applications/Atom.app/Contents/Resources/app/static/:11:1123108)

trusktr commented 5 years ago

I spoke too soon before noticing that the fix is already released in v2.4.0. Thanks @Alhadis ! 🙏

Alhadis commented 5 years ago

Oh good! I'm relieved to hear that.

@stevenvaleri Could you please confirm you're using editorconfig v2.4.0? (The latest). You may need to uninstall and reinstall if the package isn't updating itself automatically.

stevenvaleri commented 5 years ago

Yes - reinstalling the editorconfig worked. Thanks!!

Alhadis commented 5 years ago

Awesome!

Alright, gonna lock this so users are encouraged to open new issues instead of here. For anybody who's experiencing a similar-looking error, make sure you've updated before reporting.

I'll update the OP so this is a bit more visible to anybody who might be coming here after clicking "This issue has already been reported" link in the error notice. Thanks everybody for being patient with this bug!