gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Error when resolving merge conflict using Gitbluter and VS Code

Open Ignacio9172 opened this issue 1 year ago • 1 comments

Version

0.13.6

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

While trying to perform a merge using Gitbluter, I encountered a conflict in the files. I selected the "Resolve Conflict" option, and when I clicked to open the files in VS Code, I got an error. I have tried redoing the merge and restarting both Gitbluter and VS Code, but the error persists. I am unable to proceed with resolving the conflicts.

Attached is a screenshot of the error I encountered when attempting to open the files in VS Code.

image

How to reproduce

  1. Attempt a merge with conflicts in Gitbluter.
  2. Select "Resolve Conflict."
  3. Click on "Open files in VS Code."
  4. The error appears when trying to open the files.

Expected behavior

I should have been able to open the files in VS Code to manually resolve the conflict and continue with the merge without any issues.

Relevant log output

ipc.DuYoxua2.js:1 
 ipc->open_url: {"url":"vscode://file\\C:\\Users\\ignac\\OneDrive\\Documentos\\GitHub\\cortex\\apps\\frontend\\src\\pages\\explore-roadmaps.vue"} s: Invalid domain character
    at s.fromError (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:898)
    at l (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:1102)
    at async mo (https://tauri.localhost/_app/immutable/chunks/url.DW5Nbmmp.js:14:353) 
Object

app.Bqko059y.js:6  113118acba5842b0a4f8b4bac8dd3d82: Invalid domain character

Error: Invalid domain character
    at s.fromError (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:898)
    at l (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:1102)
    at async mo (https://tauri.localhost/_app/immutable/chunks/url.DW5Nbmmp.js:14:353)

X @ app.Bqko059y.js:6
ipc.DuYoxua2.js:1  Uncaught (in promise) s: Invalid domain character
    at s.fromError (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:898)
    at l (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:1102)
    at async mo (https://tauri.localhost/_app/immutable/chunks/url.DW5Nbmmp.js:14:353)
ipc.DuYoxua2.js:1  ipc->open_url: {"url":"vscode://file\\C:\\Users\\ignac\\OneDrive\\Documentos\\GitHub\\cortex\\apps\\frontend\\src\\pages\\roadmaps\\index.vue"} s: Invalid domain character
    at s.fromError (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:898)
    at l (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:1102)
    at async mo (https://tauri.localhost/_app/immutable/chunks/url.DW5Nbmmp.js:14:353) Object
l @ ipc.DuYoxua2.js:1
app.Bqko059y.js:6  0e6bc1bde2b547eb90b6318f85068641: Invalid domain character

Error: Invalid domain character
    at s.fromError (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:898)
    at l (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:1102)
    at async mo (https://tauri.localhost/_app/immutable/chunks/url.DW5Nbmmp.js:14:353)

X @ app.Bqko059y.js:6
ipc.DuYoxua2.js:1  Uncaught (in promise) s: Invalid domain character
    at s.fromError (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:898)
    at l (https://tauri.localhost/_app/immutable/chunks/ipc.DuYoxua2.js:1:1102)
    at async mo (https://tauri.localhost/_app/immutable/chunks/url.DW5Nbmmp.js:14:353)

Ignacio9172 avatar Oct 24 '24 21:10 Ignacio9172

Thanks a lot for reporting!

The issue seems to be in the way it tries to open VSCode. I have a feeling that this is actually a backend error, whose logs can be found here. There one would see the command invocation in the backend from which I'd think one can reproduce that particular error. Thanks again for your help with the backend logs.

Byron avatar Oct 25 '24 06:10 Byron

GitButler.2024-10-24.log

Thank you for the prompt response!

Apologies for the delay in getting back; I was serving as an election official over the weekend due to municipal elections in my country. I’ve attached the requested backend log to assist in resolving this issue. Let me know if there’s anything else I can provide to assist with debugging this further.

Thanks again for your help!

Ignacio9172 avatar Oct 28 '24 23:10 Ignacio9172

Thanks a lot, I think I got something

vscode://file\C:\Users\<redacted>\path\to\content.vue is a URL it tries to parse but fails due to an invalid domain character. It's probably the backslash in the URL that it chokes on. You can probably remove the log as well, @Ignacio9172.

Do you think, @estib-vega, that this path is incorrectly generated in the frontend already? Or is this happening in the backend, or a mix of both? Thanks for your help.

Byron avatar Oct 29 '24 06:10 Byron

Thanks a lot, I think I got something

vscode://file\C:\Users\<redacted>\path\to\content.vue is a URL it tries to parse but fails due to an invalid domain character. It's probably the backslash in the URL that it chokes on. You can probably remove the log as well, @Ignacio9172.

Do you think, @estib-vega, that this path is incorrectly generated in the frontend already? Or is this happening in the backend, or a mix of both? Thanks for your help.

@Byron Yeah, that sounds like the FE to me. I'll take a look!

estib-vega avatar Oct 29 '24 06:10 estib-vega