merge-conflicts icon indicating copy to clipboard operation
merge-conflicts copied to clipboard

Resolve entire file throws Uncaught TypeError: undefined is not a function

Open wolfgang42 opened this issue 8 years ago • 8 comments

When I right-click on a binary file (I don't have a text file to test with readily available) and select Resolve Entire File (either Theirs or Ours) I get the following error:

Atom Version: 1.0.7 System: Microsoft Windows 8.1 Pro Thrown From: merge-conflicts package, v1.3.5

Stack Trace

Uncaught TypeError: undefined is not a function

At C:\Users\wfaust\.atom\packages\merge-conflicts\lib\git-bridge.coffee:175

TypeError: undefined is not a function
  at Function.GitBridge.checkoutSide (C:\Users\wfaust\.atom\packages\merge-conflicts\lib\git-bridge.coffee:175:28)
  at space-pen-div.<anonymous> (C:\Users\wfaust\.atom\packages\merge-conflicts\lib\view\merge-conflicts-view.coffee:133:17)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\command-registry.js:241:29)
  at CommandRegistry.handleCommandEvent (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\command-registry.js:156:19)
  at [object Object].jQuery.fn.trigger (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\space-pen-extensions.js:64:23)
  at EventEmitter.<anonymous> (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\window-event-handler.js:75:67)
  at emitTwo (events.js:87:13)
  at EventEmitter.emit (events.js:169:7)
  at EventEmitter.ipc.sendSync (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\atom.asar\renderer\api\lib\ipc.js:21:31)
  at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\atom.asar\renderer\api\lib\remote.js:110:29)
  at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\context-menu-manager.js:170:31)
  at HTMLDocument.<anonymous> (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\window-event-handler.js:150:33)
  at HTMLDocument.handler (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\src\space-pen-extensions.js:112:34)
  at HTMLDocument.jQuery.event.dispatch (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
  at HTMLDocument.elemData.handle (C:\Users\wfaust\AppData\Local\atom\app-1.0.7\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)

Commands

     -9:11.5.0 merge-conflicts:detect (atom-text-editor.editor.is-focused)
     -7:34.7.0 editor:delete-to-end-of-word (atom-text-editor.editor.is-focused)
     -7:33.1.0 atom-terminal-panel:toggle-autocompletion (atom-text-editor.editor.is-focused.autocomplete-active)
     -7:32.9.0 core:undo (atom-text-editor.editor.is-focused.autocomplete-active)
     -7:31.5.0 merge-conflicts:detect (atom-text-editor.editor.is-focused)
     -3:54.8.0 atom-terminal-panel:toggle-autocompletion (atom-text-editor.editor.conflicted.is-focused)
     -3:54.6.0 core:undo (atom-text-editor.editor.conflicted.is-focused)
  2x -3:46.7.0 merge-conflicts:detect (atom-text-editor.editor.conflicted.is-focused)
     -3:28.3.0 atom-terminal-panel:toggle-autocompletion (atom-text-editor.editor.is-focused.conflicted)
  3x -3:28.1.0 core:undo (atom-text-editor.editor.is-focused.conflicted)
     -3:26.2.0 atom-terminal-panel:toggle-autocompletion (atom-text-editor.editor.is-focused.conflicted)
  3x -3:26.1.0 core:undo (atom-text-editor.editor.is-focused.conflicted)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ],
    "disabledPackages": [
      "file-icons"
    ]
  },
  "merge-conflicts": {}
}

Installed Packages

# User
atom-terminal-panel, v4.4.4
atomatigit, v1.5.4
custom-title, v1.0.1
emmet, v2.3.12
file-type-icons, v0.7.3
indent-guide-improved, v1.4.2
language-diff, v0.3.1
merge-conflicts, v1.3.5
mocha-runner, v1.1.5
raml, v0.2.0
symbol-gen, v1.0.0
tidy-tabs, v0.2.0
tree-view-git-status, v0.1.2

# Dev
No dev packages

wolfgang42 avatar Aug 21 '15 18:08 wolfgang42

I have this same issue

djnugent avatar Aug 27 '15 17:08 djnugent

I ran into the same issue for a text file.

calebmeyer avatar Sep 02 '15 18:09 calebmeyer

Same issue, Atom 1.0.11, Ubuntu 14.04, git 2.5.1

lithrel avatar Sep 10 '15 10:09 lithrel

This error occurs to me when i open a file listed on the conflicts list on the bottom of atom. After the error i choose to use ours or theirs, the conflict markers are not removed, neither the colored areas. Very annoying, this makes the package unusable.

pietrovismara avatar Nov 11 '15 10:11 pietrovismara

This error occurs to me when i open a file listed on the conflicts list on the bottom of atom.

Have you tried with 1.3.7? I thought I resolved this with #192, but I could have missed something. If you're still seeing a stack trace, can you paste it here?

After the error i choose to use ours or theirs, the conflict markers are not removed, neither the colored areas. Very annoying, this makes the package unusable.

Ah, that's a different issue, and just an oversight on my part. I thought someone had filed that one but I can't find it now. Noted :+1:

smashwilson avatar Nov 11 '15 15:11 smashwilson

Same here @smashwilson i'm posting the stack trace below:

TypeError: undefined is not a function at SideView.CoveringView.attached (/home/marcio/.atom/packages/merge-conflicts/lib/view/covering-view.coffee:38:21) at SideView.attached (/home/marcio/.atom/packages/merge-conflicts/lib/view/side-view.coffee:61:35) at space-pen-div.View.element.attached (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:164:63) at space-pen-div.CustomElementPrototype.attachedCallback (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:51:55) at OverlayManager.module.exports.OverlayManager.renderOverlay (/usr/share/atom/resources/app.asar/src/overlay-manager.js:77:21) at OverlayManager.module.exports.OverlayManager.render (/usr/share/atom/resources/app.asar/src/overlay-manager.js:17:16) at TextEditorComponent.module.exports.TextEditorComponent.updateSync (/usr/share/atom/resources/app.asar/src/text-editor-component.js:226:15) at TextEditorComponent.module.exports.TextEditorComponent.becameVisible (/usr/share/atom/resources/app.asar/src/text-editor-component.js:278:21) at TextEditorComponent.module.exports.TextEditorComponent.checkForVisibilityChange (/usr/share/atom/resources/app.asar/src/text-editor-component.js:810:16) at atom-text-editor.TextEditorElement.attachedCallback (/usr/share/atom/resources/app.asar/src/text-editor-element.js:98:22)

marcioc0sta avatar Dec 01 '15 13:12 marcioc0sta

@marcioc0sta, can you double check your merge-conflicts version? In 1.3.7, the top line in your stack trace is a comment.

If you aren't on 1.3.7 yet, an upgrade and (possibly) an Atom restart should fix things up for you.

smashwilson avatar Dec 01 '15 13:12 smashwilson

Hi @smashwilson my version is 1.3.7, i've removed and installed again and the problem persists :/

image

and thanks for the quick response

marcioc0sta avatar Dec 01 '15 17:12 marcioc0sta