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

'Couldn't find merge base' displayed when opening pull request #1190

Closed
meaghanlewis opened this Issue Aug 23, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@meaghanlewis
Contributor

meaghanlewis commented Aug 23, 2017

Version

  • GitHub Extension for Visual Studio version: 2.3.0.22
  • Visual Studio version: 2017

What happened
I encountered this 'Couldn't find merge base..' exception after cloning the repo and then trying to open this PR: AvaloniaUI/Avalonia#1127
couldnt find merge base

This issue was consistently reproducible, but now I can't reproduce it anymore. Will add more details to this issue if I encounter this problem again.

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Aug 25, 2017

Hi @meaghanlewis,

Once #1199 has been merged, you should see a message like, "The Pull Request failed to load. Please check your network connection and click refresh to try again", if this happens again. It will also write more detail to the logs.

If you do see this, could you send me the logs from:
\Users\<user>\AppData\Local\GitHubVisualStudio\extension.log (or
\Users\<user>\AppData\Local\GìtHūbVisualStudio\extension.log for local builds).

Hopefully that will show me where the issue is!

@meaghanlewis

This comment has been minimized.

Contributor

meaghanlewis commented Aug 25, 2017

Thanks for the note @jcansdale! I'll keep an eye out for when this is ready to be tested.

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Aug 25, 2017

#1191 and this issue shouldn't have been closed! A bug in github.com perhaps? Reopening.

btw, #1199 is now in master so should make it into the next release.

@jcansdale jcansdale reopened this Aug 25, 2017

@meaghanlewis

This comment has been minimized.

Contributor

meaghanlewis commented Aug 28, 2017

So I noticed this again while trying to view this PR: meaghanlewis/TestWebAppProject#7

Here's what I see from extension.log
`2017-08-28 14:33:19.6917|ERROR|thread: 1|PullRequestDetailViewModel|Error loading PullRequestModel
LibGit2Sharp.NotFoundException: The Pull Request failed to load. Please check your network connection and click refresh to try again. If this issue persists, please let us know at support@github.com ---> LibGit2Sharp.NotFoundException: Couldn't find 8ea5d6a4c0b8202398614ef13a50167aadb00914 after fetching from https://github.com/meaghanlewis/TestWebAppProject.git:test-branch-2.
   at GitHub.Services.GitClient.<GetPullRequestMergeBase>d__24.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.App\Services\GitClient.cs:line 408
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSessionService.<GetPullRequestMergeBase>d__12.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSessionService.cs:line 131
   --- End of inner exception stack trace ---
   at GitHub.InlineReviews.Services.PullRequestSessionService.<GetPullRequestMergeBase>d__12.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSessionService.cs:line 135
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<UpdateFile>d__16.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 194
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<CreateFile>d__17.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 234
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<GetFile>d__9.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 86
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<GetFile>d__8.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.ViewModels.PullRequestDetailViewModel.<CreateChangedFilesTree>d__104.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.App\ViewModels\PullRequestDetailViewModel.cs:line 523
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GitHub.ViewModels.PullRequestDetailViewModel.<Load>d__100.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.App\ViewModels\PullRequestDetailViewModel.cs:line 389    at GitHub.InlineReviews.Services.PullRequestSessionService.<GetPullRequestMergeBase>d__12.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSessionService.cs:line 135
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<UpdateFile>d__16.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 194
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<CreateFile>d__17.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 234
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<GetFile>d__9.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 86
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.InlineReviews.Services.PullRequestSession.<GetFile>d__8.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitHub.ViewModels.PullRequestDetailViewModel.<CreateChangedFilesTree>d__104.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.App\ViewModels\PullRequestDetailViewModel.cs:line 523
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GitHub.ViewModels.PullRequestDetailViewModel.<Load>d__100.MoveNext() in c:\jenkins\workspace\GHfVS\src\GitHub.App\ViewModels\PullRequestDetailViewModel.cs:line 389
@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Aug 29, 2017

@meaghanlewis,

Excellent, this log is very useful!

LibGit2Sharp.NotFoundException: Couldn't find 8ea5d6a4c0b8202398614ef13a50167aadb00914
   after fetching from https://github.com/meaghanlewis/TestWebAppProject.git:test-branch-2

It looks like it's trying to fetch a branch that has been deleted (from a closed PR):
meaghanlewis/TestWebAppProject#7

I'm a bit confused about feting from deleted branches. I have tried this a couple of times and I thought it worked. Maybe the branch was cashed somehow. 😕

I'm wondering if calling, git fetch origin refs/pull/7/head, in the TestWebAppProject repo would fix it.

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Aug 30, 2017

It looks like deleted branches can be fetched, but only if you have the correct rights to that repo?

@jcansdale

This comment has been minimized.

Contributor

jcansdale commented Sep 1, 2017

It looks like deleted branches can be fetched, but only if you have the correct rights to that repo?

I believe @meaghanlewis tried viewing a closed PR with a deleted branch that had been submitted from her own fork. She will have had the rights to this forked repo, but was still not able to view the PR.

It's almost as if you can fetch deleted branches from the repo you're in, but not from forks (whoever created them). I'm a little surprised by this though because it isn't obvious to me what the difference is. Aren't they just different remotes on the same repo? 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment