smashwilson / merge-conflicts

Resolve git merge conflicts in Atom
https://atom.io/packages/merge-conflicts
MIT License
432 stars 42 forks source link

Uncaught TypeError: GitBridge.getActiveRepo is not a function #186

Open nemccall opened 8 years ago

nemccall commented 8 years ago

[Enter steps to reproduce below:]

Pressed Alt+M, D to detect merge errors, package threw this error

Atom Version: 1.0.19 System: Ubuntu 15.04 Thrown From: merge-conflicts package, v1.3.6

Stack Trace

Uncaught TypeError: GitBridge.getActiveRepo is not a function

At /home/nemccall/.atom/packages/merge-conflicts/lib/view/merge-conflicts-view.coffee:155

TypeError: GitBridge.getActiveRepo is not a function
  at Function.MergeConflictsView.detect (/home/nemccall/.atom/packages/merge-conflicts/lib/view/merge-conflicts-view.coffee:155:22)
  at /home/nemccall/.atom/packages/merge-conflicts/lib/main.coffee:27:28
  at /home/nemccall/.atom/packages/merge-conflicts/lib/git-bridge.coffee:42:9
  at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
  at ChildProcess.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:235:18)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:172:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

     -2:06.7.0 merge-conflicts:detect (atom-text-editor.editor.is-focused)
     -1:58.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  3x -1:56.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:55.4.0 core:move-up (atom-text-editor.editor.mini.is-focused)
  2x -1:55.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:54.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:54.6.0 settings-view:uninstall-packages (atom-text-editor.editor)
     -0:56.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
  3x -0:56 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:01.1.0 merge-conflicts:detect (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true
  },
  "merge-conflicts": {}
}

Installed Packages

# User
emmet, v2.3.13
file-icons, v1.6.11
linter, v1.8.1
merge-conflicts, v1.3.6
minimap, v4.15.0

# Dev
No dev packages
smashwilson commented 8 years ago

That's strange. I can't reproduce this, and looking through the source, I don't see how that method couldn't be defined.

Does this happen every time? If so, can you try keeping your dev tools open while you're activating the package, to see if something is going :boom: during package load?

nemccall commented 8 years ago

Hey! Thanks for getting back to me on this. Your package works phenomenally well so far for the workstation I use at work and my desktop at home. The laptop I carry around was the only one that can generate this bug, I can't reproduce it on any of my machines either. So far, yes any time I try to detect merge conflicts with the plugin it throws that error (again, just on one machine) so I'm convinced its something environment specific on the laptop (running Ubuntu 15.10). I'll try to generate a merge conflict scenario on one of my repos and play around with the dev tools to see what comes up. Any other information I can try to collect for you?

On Mon, Nov 2, 2015 at 12:19 PM, Ash Wilson notifications@github.com wrote:

That's strange. I can't reproduce this, and looking through the source, I don't see how that method couldn't be defined https://github.com/smashwilson/merge-conflicts/blob/master/lib/git-bridge.coffee#L76 .

Does this happen every time? If so, can you try keeping your dev tools open while you're activating the package, to see if something is going [image: :boom:] during package load?

— Reply to this email directly or view it on GitHub https://github.com/smashwilson/merge-conflicts/issues/186#issuecomment-153145140 .

smashwilson commented 8 years ago

Interesting! I wonder if the installation was corrupted somehow on that machine. I don't suppose you've tried uninstalling and reinstalling it?

Other than that, launching it with the dev tools open is probably our best bet right now. Something else might be causing a parsing failure on that file for some reason, and I'm hoping that that would show the error.