Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NBug] Remote URLs should appear in pairs. #6562

Closed
zennboy opened this issue May 14, 2019 · 33 comments · Fixed by #6586
Closed

[NBug] Remote URLs should appear in pairs. #6562

zennboy opened this issue May 14, 2019 · 33 comments · Fixed by #6586
Assignees
Labels
type: bug 🐛 type: git issue Issues that attributable to git
Milestone

Comments

@zennboy
Copy link

zennboy commented May 14, 2019

edit from Git Extensions team:

This bug is due to an incompatibility between old version of git (before 2.17) and the last version of Git Extensions.
It has been fixed in https://github.com/gitextensions/gitextensions/releases/tag/v3.1.1

To avoid this error, you could:


Current behaviour

Crashes as soon as I try to open the app.

Expected behaviour

The app would open normally.

Steps to reproduce

Crashes as soon as I try to open the app.

Error Details

System.Exception: Remote URLs should appear in pairs.
   at GitCommands.GitModule.<GetRemotesAsync>g__ParseRemotes|155_0(IEnumerable`1 lines)
   at GitCommands.GitModule.<GetRemotesAsync>d__155.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.BranchTreePanel.RepoObjectsTree.RemoteBranchTree.<LoadNodesAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.BranchTreePanel.RepoObjectsTree.Tree.<ReloadNodesAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.BranchTreePanel.RepoObjectsTree.<>c__DisplayClass69_0.<<AddTree>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.ThreadHelper.<>c__DisplayClass13_0.<<FileAndForget>b__0>d.MoveNext()

Environment

  • Git Extensions 3.1.0.5877
  • Build bb1687f
  • Git 2.16.2.windows.1
  • Microsoft Windows NT 10.0.17134.0
  • .NET Framework 4.7.3394.0
  • DPI 96dpi (no scaling)
@RussKie
Copy link
Member

RussKie commented May 14, 2019

Please fill in all necessary information

@pmiossec
Copy link
Member

Could you run the command git remote -v in your repository and report here the result of the command?

Feel free to alter the url if it's confidential...

You've got this error because you should have a pair number of lines (one for 'fetch' and one for 'push').
Either you've got a problem in your repository or we missed something.

@zennboy
Copy link
Author

zennboy commented May 15, 2019

Sure:

$ git remote -v
origin https://github.com/--------/-------.git (fetch)
origin https://github.com/--------/-------.git (push)

Version 3.0.2.5232 works great. I got this error after updating to 3.1.0.5877 and trying to run GitExtensions.

@pmiossec
Copy link
Member

@zennboy Did you changed the version of git in the same time you updated GitExtensions?

Because the code that introduced this verification (c11a009) was introduced in v3.0.

Perhaps this code was used somewhere else in the application...

Your output seems good and I don't really understand why the exception is thrown.
Perhaps an empty line at the end that make the code unhappy.... (introduced by a2a3f28 with the use of GetOutputLinesAsync() instead of GetOutputLines() ? /cc @jbialobr )

@ghost
Copy link

ghost commented May 15, 2019

  • Git Extensions 3.1.0.5877
  • Build bb1687f
  • Git 2.21.0.windows.1
  • Microsoft Windows NT 10.0.17763.0
  • .NET Framework 4.7.3416.0
  • DPI 96dpi (no scaling)

I have not seen this issue on my computer, but I guess I am not opening the same type of repositories as those who see this issue. My only local repositories are local copies of those on my user page (https://github.com/illfated?tab=repositories).

@RussKie
Copy link
Member

RussKie commented May 16, 2019

We need more info or have consistent repro steps.

@pmiossec
Copy link
Member

We need more info or have consistent repro steps.

I will try to push a attempt of fix in a few minutes.
I imagine that the problem come from a version of git <=2.16 that return an empty line in the output of the command as #6562 (comment) output seems good....

pmiossec added a commit to pmiossec/gitextensions that referenced this issue May 16, 2019
Try to fix gitextensions#6562

As output of `git remote -v` seems good (See gitextensions#6562 (comment) ),
I suspect a problem with a version of git <= 2.16 that return an empty line at the end of the command output
 (all users reporting this error have a not up to date version of git.
See https://github.com/gitextensions/gitextensions/search?q=remote+URLs+should+appear+in+pairs&type=Issues )
@ghost ghost assigned pmiossec May 16, 2019
@ghost ghost added the status: ready label May 16, 2019
@pmiossec
Copy link
Member

pmiossec commented May 16, 2019

Could you (@zennboy , @dnoakes , @reydevelop , @MayorovSerg, @imranmu ) test the version given by @RussKie in this message: #6562 (comment)

@RussKie
Copy link
Member

RussKie commented May 16, 2019

I downgraded to git 2.16.1 and I get an error only when start with the dashboard... If I start with a repository - no errors
image

  • Git Extensions 3.1.0.5877
  • Build bb1687f
  • Git 2.16.1.windows.4
  • Microsoft Windows NT 10.0.17134.0
  • .NET Framework 4.7.3324.0
  • DPI 144dpi (150% scaling)

@pmiossec
Copy link
Member

I downgraded to git 2.16.1

So, now, you could try the fix 😉

@RussKie
Copy link
Member

RussKie commented May 16, 2019

I think this is the culprit - an error message wording has changed:
image

@pmiossec
Copy link
Member

So, that fails for the 'N' in upper case?

@RussKie
Copy link
Member

RussKie commented May 16, 2019

I suspect so...
Preparing a fix, shouldn't be long

RussKie added a commit to RussKie/gitextensions that referenced this issue May 16, 2019
It looks like there was a change in wording after git 2.16 that
changed from "fatal: Not a git..." to "fatal: not a git...".

The existing parser expected the warning to be in the lower case, and
thus failed for earlier versions of git.

The fix makes the check case insensitive.

Fixes gitextensions#6562
Closes gitextensions#6563
Closes gitextensions#6565
Closes gitextensions#6570
Closes gitextensions#6571
Closes gitextensions#6574
Closes gitextensions#6577
Closes gitextensions#6571
@ghost ghost assigned RussKie May 16, 2019
@pmiossec
Copy link
Member

@RussKie I have edited the first post to make a summary easier to understand for people reporting the same issue (without to be obliged to read all the messages of this issue).

Do you think that you could see if it's OK and update it if needed?

@RussKie
Copy link
Member

RussKie commented May 24, 2019 via email

@gerhardol
Copy link
Member

@pmiossec
Good summary but I would like to link to our wiki page

@pmiossec
Copy link
Member

Good summary but I would like to link to our wiki page

I don't know enough the wiki. Which page? Could you do it?

I found probably this one ( https://github.com/gitextensions/gitextensions/wiki/Canary-Builds ), but need to be updated... I will update it.

@gerhardol
Copy link
Member

I don't know enough the wiki. Which page? Could you do it?

Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 type: git issue Issues that attributable to git
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants