Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

System.NullReferenceException throw in v1.37.12 to v1.37.16 when access /checkreadystatus endpoint #2259

Closed
xiguichen opened this issue Oct 30, 2021 · 4 comments · Fixed by #2446

Comments

@xiguichen
Copy link

Roslyn currently have problem when access /checkreadystatus endpoint, following exception will be throw

System.NullReferenceException
HResult=0x80004003
Source=Microsoft.AspNetCore.Server.Kestrel.Core
StackTrace:
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.CreateResponseHeader(Boolean appCompleted)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.InitializeResponseAsync(Int32 firstWriteByteCount)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.WriteAsync(ReadOnlyMemory`1 data, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at OmniSharp.Http.Middleware.MiddlewareExtensions.WriteJson(HttpResponse response, Object value) in C:\Users\xiguic\develop\omnisharp-roslyn\src\OmniSharp.Http\Middleware\MiddlewareExtensions.cs:line 20

This exception was originally thrown at this call stack:
[External Code]
OmniSharp.Http.Middleware.MiddlewareExtensions.WriteJson(Microsoft.AspNetCore.Http.HttpResponse, object) in MiddlewareExtensions.cs

The problem was first introduced in v1.37.12.

Can someone help to fix?

@mispencer
Copy link
Contributor

I am seeing this error too.
I am guess it is the same issue as this, but the fix there doesn't appear to be applicable to .NET Framework.

@mispencer
Copy link
Contributor

This appears to be caused by the upgrade to ASP.NET Core 2.2.0. Downgrading back to 2.1.1 like I have done in this branch in my fork appears to solve this issue, but likely causes other issues and upgrading to a newer version would be a more proper solution anyway.

@mispencer
Copy link
Contributor

This continues to be a blocking issue for our use case.

@puremourning
Copy link

This continues to block us upgrading.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants