github / VisualStudio

GitHub Extension for Visual Studio
https://visualstudio.github.com
MIT License
2.38k stars 1.2k forks source link

Pull request comments not visible inline for VS2017 #2542

Open dtuckerFort opened 4 years ago

dtuckerFort commented 4 years ago

Versions

What happened

The GitHub plugin let's me add a pull-request comment inline but doesn't show any comments inline. Comments are only visible within the Reviewer view. My teammates have the same problem. Sometimes it works, sometimes it doesn't

extension.log when clicking link to open PR comment: 2020-09-03 17:05:41.240 [43780] EROR [01] PullRequestDetailViewModel Error loading pull request [local git repo] System.NullReferenceException: Object reference not set to an instance of an object. at GitHub.ViewModels.GitHubPane.PullRequestDetailViewModel.d111.MoveNext() in C:\projects\visualstudio\src\GitHub.App\ViewModels\GitHubPane\PullRequestDetailViewModel.cs:line 0 2020-09-03 17:12:06.123 [07420] EROR [61] PullRequestSessionManager System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object. at GitHub.InlineReviews.Services.PullRequestSessionService.d24.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionService.cs:line 368 --- 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.PullRequestSessionManager.d18.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 249 --- 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.PullRequestSessionManager.d17.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 214 --- 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.PullRequestSessionManager.d16.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 193 --- End of inner exception stack trace --- ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at GitHub.InlineReviews.Services.PullRequestSessionService.d24.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionService.cs:line 368 --- 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.PullRequestSessionManager.d18.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 249 --- 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.PullRequestSessionManager.d17.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 214 --- 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.PullRequestSessionManager.d__16.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionManager.cs:line 193<---

extension.log when clicking link to a closed PR comment: "PullRequestReviewCommentViewModel Couldn't find line number for comment on"

This seems to occur when a user makes posts a comment directly on the GitHub website.

ghost commented 4 years ago

I have the same issue with both Visual Studio 2017 Pro and 2019 Pro.

GitHub Extension v2.11.106.19330 VS Pro 2017 15.9.27 VS Pro 2019 16.7.4

Not sure how to set the priority of this issue (as I am relatively new to GitHub), but this is hitting the productivity of our code review big time.

dtuckerFort commented 4 years ago

This seems to occur when a user makes posts a comment directly on the GitHub website.

ghost commented 4 years ago

@dtuckerFort One collaborator and I myself post comments through the Visual Studio's GitHub extension, but I think another collaborator used the website to post comment too.

stalek71 commented 3 years ago

It doesn't work with inline comments also... I created some comment when I was reviewing PR changes and it appeared on GitHub website without any problems but clicking it on Reviews subtab in GitHub extension(tab) resulted in providing the same error as usual.

At the moment it's just useless ... :(

PullRequestReviewCommentViewModel Couldn't find line number for comment on Some/Path/To/File.h @ 58e6e9ac17789dd89eb81debcc46d5c84fa47b86

ndouek-qontigo commented 3 years ago

Hi. Unfortunately my team are experiencing the same / similar issue :( in otherwise excellent extension. Although the error for me is different: [WARN 01] Couldn't find line number. The odd one works, can't figure out why one comment works when another doesn't I would be really interested to know what is planned here as it renders the reviews aspect somewhat impractical. Many thanks

jcansdale commented 3 years ago

@ndouek-qontigo,

The odd one works, can't figure out why one comment works when another doesn't

Unfortunately this feature depends on the diff format on github.com exactly matching diffs generated locally. This was working consistently, but it's possible some improved diff algorithm is now being used.

Do you have an example PR and (missing) comment you could show me?