atom / fuzzy-finder

Find and open files quickly
MIT License
274 stars 138 forks source link

Uncaught TypeError: Cannot read property 'incrementCounter' of undefined #380

Closed jasonrudolph closed 5 years ago

jasonrudolph commented 5 years ago

[Enter steps to reproduce:]

  1. Toggle the git status finder (i.e., run the fuzzy-finder:toggle-git-status-finder command)
  2. Observe exception

Atom: 1.38.0-nightly2 x64 Electron: 2.0.18 OS: Mac OS X 10.14.4 Thrown From: Atom Core

Stack Trace

Uncaught TypeError: Cannot read property 'incrementCounter' of undefined

At /Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14

TypeError: Cannot read property 'incrementCounter' of undefined
    at renderExperimentPrompt (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:2364442)
    at GitStatusView.updateExperimentPrompt (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:567236)
    at FuzzyFinderView.subscriptions.add.atom.config.observe.e (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:563967)
    at Config.observeKeyPath (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:335524)
    at Config.observe (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:330006)
    at new FuzzyFinderView (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:14:563536)
    at new GitStatusView (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:789508)
    at Object.createGitStatusView (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:188121)
    at HTMLElement.fuzzy-finder:toggle-git-status-finder (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:186484)
    at CommandRegistry.handleCommandEvent (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:350386)
    at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1215326)
    at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:1211460)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom Nightly.app/Contents/Resources/app/static/<embedded>:11:285536)

Commands

  3x -0:04.0 core:close (input.hidden-input)
     -0:01.9.0 fuzzy-finder:toggle-git-status-finder (atom-workspace.workspace.scrollbars-visible-always.theme-one-light-syntax.theme-one-light-ui)

Non-Core Packages


/fyi @rafeca: It looks like our new metrics don't play nicely with the buffer finder. I'll try to get this issue queued up for us to investigate :soon:.

rafeca commented 5 years ago

Oh damm it!

I forgot to pass the metricsReporter on the constructor of the GitStatusView, this could be fixed by changing that line to this.gitStatusView = new GitStatusView(metricsReporter).

Sorry about that 😞

nathansobo commented 5 years ago

I updated the issue body to reflect that the exception occurs when triggering the toggle-git-status-finder command. Fixing now.