Skip to content

fix: httpclient error on macos ci and lint.yml errors#11040

Open
filzrev wants to merge 2 commits intodotnet:mainfrom
filzrev:fix-httpclient-error-on-macos-ci
Open

fix: httpclient error on macos ci and lint.yml errors#11040
filzrev wants to merge 2 commits intodotnet:mainfrom
filzrev:fix-httpclient-error-on-macos-ci

Conversation

@filzrev
Copy link
Collaborator

@filzrev filzrev commented Mar 19, 2026

From Mar 4, XRefArchiveBuilderTest.TestDownload test is continuously failed on macos-latest.

And following exception is internally thrown.

Failed Docfx.Build.Engine.Tests.XRefArchiveBuilderTest.TestDownload [381 ms]
  Error Message:
   System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception.
---- System.Security.Authentication.AuthenticationException : The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown
  Stack Trace:
     at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.SocketsHttpHandler.<SendAsync>g__CreateHandlerAndSendAsync|115_0(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   at Docfx.Build.Engine.XRefMapDownloader.DownloadFromWebAsync(Uri uri, CancellationToken token) in /_/src/Docfx.Build/XRefMaps/XRefMapDownloader.cs:line 166
   at Docfx.Build.Engine.XRefMapDownloader.DownloadBySchemeAsync(Uri uri, CancellationToken token) in /_/src/Docfx.Build/XRefMaps/XRefMapDownloader.cs:line 93
   at Docfx.Build.Engine.XRefMapDownloader.<>c__DisplayClass3_0.<<DownloadAsync>b__0>d.MoveNext() in /_/src/Docfx.Build/XRefMaps/XRefMapDownloader.cs:line 53
--- End of stack trace from previous location ---
   at Docfx.Build.Engine.XRefMapDownloader.DownloadAsync(Uri uri, CancellationToken token) in /_/src/Docfx.Build/XRefMaps/XRefMapDownloader.cs:line 47
   at Docfx.Build.Engine.XRefArchiveBuilder.DownloadCoreAsync(Uri uri, XRefArchive xa, CancellationToken cancellationToken) in /_/src/Docfx.Build/XRefMaps/XRefArchiveBuilder.cs:line 41
   at Docfx.Build.Engine.XRefArchiveBuilder.DownloadAsync(Uri uri, String outputFile, CancellationToken cancellationToken) in /_/src/Docfx.Build/XRefMaps/XRefArchiveBuilder.cs:line 27
   at Docfx.Build.Engine.Tests.XRefArchiveBuilderTest.TestDownload() in /_/test/Docfx.Build.Tests/XRefArchiveBuilderTest.cs:line 23
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
   at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan`1 alert, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)

As far as I've confirmed.
Server certificate of https://dotnet.github.io has no issues.
But it seems failed to access OCSP endpoint with HTTP protocol and cause RevocationStatusUnknown error.

This PR add logics to skip RevocationStatusUnknown errors on macos
(On Windows/Linux environment, OSCP endpoint seems not used)

@filzrev filzrev changed the title fix: httpclient error on macos ci fix: httpclient error on macos ci and lint.yml errors Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant