omnisharp-roslyn
omnisharp-roslyn copied to clipboard
System.NullReferenceException throw in v1.37.12 to v1.37.16 when access /checkreadystatus endpoint
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?
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.
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.
This continues to be a blocking issue for our use case.
This continues to block us upgrading.