github / VisualStudio

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

Inline comment goes to HTTPS only #1589

Open dacy opened 6 years ago

dacy commented 6 years ago

What happened (with steps, logs and screenshots, if possible) We use Github Enterprise which (i don't know if it's the same for everyone who uses this service) only allows HTTP traffic. So only port 80. The inline comment feature only goes to port 443 which is blocked and I am receiving below error message as the result. In the log I can see that it could not connect to our github server and it attempts to connect on port 443. image

Error log image

The repository is configured in Visual Studio with only http as the address and everything else is using the correct HTTP protocol except that this inline comment and the 'View conversation on Github' link on Pull Request, which also takes you to the HTTPS URL.

meaghanlewis commented 6 years ago

Hi @dacy thanks for opening this issue. So to clarify, your enterprise instance only uses http?

Also, could you send over the complete log error that you see after reproducing the error while leaving an inline comment?

I'll try to reproduce this error myself on a test instance of GitHub Enterprise.

dacy commented 6 years ago

@meaghanlewis Yes, our enterprise instance only uses http. I can't get to it on web browser via https URL. Below is the error log entry related to this. Thanks!

2018-04-09 16:53:28.611 EROR [01] CommentViewModel Error posting inline comment System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it xxx.xxx.xxx.xxx:443 at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Octokit.Internal.HttpClientAdapter.d10.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\HttpClientAdapter.cs:line 180 --- 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.Internal.HttpClientAdapter.d3.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\HttpClientAdapter.cs:line 47 --- 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.d55.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 582 --- 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.d541.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Http\Connection.cs:line 573 --- 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.PullRequestReviewCommentsClient.<Create>d__15.MoveNext() in C:\projects\visualstudio\submodules\octokit.net\Octokit\Clients\PullRequestReviewCommentsClient.cs:line 233 --- 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.AsyncSubject1.GetResult() at GitHub.InlineReviews.Services.PullRequestSessionService.d20.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSessionService.cs:line 309 --- 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.d13.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\Services\PullRequestSession.cs:line 125 --- 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.ViewModels.NewInlineCommentThreadViewModel.d18.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\ViewModels\NewInlineCommentThreadViewModel.cs:line 109 --- 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.ViewModels.CommentViewModel.d13.MoveNext() in C:\projects\visualstudio\src\GitHub.InlineReviews\ViewModels\CommentViewModel.cs:line 150