Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

"Not Found" displayed when clicking on PR link in review #1683

Closed
meaghanlewis opened this issue May 17, 2018 · 2 comments
Closed

"Not Found" displayed when clicking on PR link in review #1683

meaghanlewis opened this issue May 17, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@meaghanlewis
Copy link
Contributor

Hello! Please read the contributing guidelines before submitting an issue regarding the GitHub Extension for Visual Studio.

  • GitHub Extension for Visual Studio version: VS2015
  • Visual Studio version: 2.5.2.2566

What happened
In VS2015 specifically when I click on a PR number link while doing a review I just see "Not Found". This fork can be used to repro: https://github.com/meaghanlewis-tester/my-first-repo

screen shot 2018-05-17 at 11 17 41 am

screen shot 2018-05-17 at 11 17 43 am

Logs

Octokit.NotFoundException: Not Found
   at Octokit.Connection.HandleErrors(IResponse response) in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 652
   at Octokit.Connection.<RunRequest>d__57.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 633
--- 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 Octokit.Connection.<Run>d__56`1.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 618
--- 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 Octokit.ApiConnection.<Get>d__8`1.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception exception)
   at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception)
   at System.Reactive.Subjects.AsyncSubject`1.GetResult()
   at GitHub.ViewModels.GitHubPane.PullRequestDetailViewModel.<Refresh>d__101.MoveNext() in C:\projects\visualstudio\src\GitHub.App\ViewModels\GitHubPane\PullRequestDetailViewModel.cs:line 482
{"message":"Not Found","documentation_url":"https://developer.github.com/v3/pulls/#get-a-single-pull-request"}
2018-05-17 13:00:31.217 [01536] EROR [01] PullRequestDetailViewModel Error loading pull request githubtestorganization/TestWebAppProject/24 from GitHub
Octokit.NotFoundException: Not Found
   at Octokit.Connection.HandleErrors(IResponse response) in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 652
   at Octokit.Connection.<RunRequest>d__57.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 633
--- 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 Octokit.Connection.<Run>d__56`1.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 618
--- End of stack trace from previous location where exception was thrown ---
   at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception exception)
   at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception)
   at System.Reactive.Subjects.AsyncSubject`1.GetResult()
   at GitHub.ViewModels.GitHubPane.PullRequestDetailViewModel.<Refresh>d__101.MoveNext() in C:\projects\visualstudio\src\GitHub.App\ViewModels\GitHubPane\PullRequestDetailViewModel.cs:line 482
{"message":"Not Found","documentation_url":"https://developer.github.com/v3/pulls/#list-pull-requests-files"}```
@StanleyGoldman
Copy link
Contributor

I'm testing locally and I'm not able to make this happen.
I think this might have been fixed already.

@StanleyGoldman StanleyGoldman self-assigned this Aug 1, 2018
@meaghanlewis
Copy link
Contributor Author

meaghanlewis commented Aug 6, 2018

I'm testing this again and notice a different issue than before actually

error opening pr number link

It looks like there might be 2 problems:
1. Can't open PR link from upstream

It looks like the link is trying to open up: meaghanlewis/my-first-repo/4 instead of: meaghanlewis-tester/my-first-repo/4

2. Clicking on the View on GitHub button in this error view tries open up a link to the wrong location and fails.

For instance, in the example above, clicking the View on GitHub button opens the browser to: https://github.com/meaghanlewis/my-first-repo/issues/4 instead of meaghanlewis-tester/my-first-repo#4

Log:
2018-08-06 10:26:52.074 [09120] INFO [14] GitHubPackage Initializing GitHub Extension v2.5.4.3431 in Microsoft Visual Studio 2015 (14.0.25420.1) 2018-08-06 10:31:52.775 [09120] EROR [01] PullRequestDetailViewModel Error loading pull request meaghanlewis/my-first-repo/4 from GitHub System.NullReferenceException: Object reference not set to an instance of an object. at GitHub.ViewModels.GitHubPane.PullRequestDetailViewModel.<Refresh>d__106.MoveNext() in C:\projects\visualstudio\src\GitHub.App\ViewModels\GitHubPane\PullRequestDetailViewModel.cs:line 0 2018-08-06 10:31:53.503 [09120] EROR [01] PullRequestDetailViewModel Error loading pull request meaghanlewis/my-first-repo/4 from GitHub

@grokys grokys assigned grokys and unassigned StanleyGoldman Aug 7, 2018
grokys added a commit that referenced this issue Aug 7, 2018
`PullRequestReviewAuthoringViewModel.NavigateToPullRequest` wasn't using `RemoteRepositoryOwner` to build the URL for the PR to navigate to.

Fixes #1683
@meaghanlewis meaghanlewis added this to the 2.5.5 milestone Aug 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants