You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of gRPC and what language are you using?
Google.Protobuf 3.26.1
Grpc.Net.Client 2.62.0
Grpc.Tools 2.63.0
Language: C#
What operating system (Linux, Windows,...) and version?
Windows 11 Enterprise (10.0.22631 Build 22631)
What runtime / compiler are you using (e.g. .NET Core SDK version dotnet --info)
.NET 8.0.204
What did you do?
I followed the steps in the Microsoft tutorial for creating a .NET gRPC server and client. I modified the service operation to throw an exception with a long message as follows:
public class GreeterService : Greeter.GreeterBase
{
public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
{
return Task.FromException<HelloReply>(new Exception(string.Join("", Enumerable.Repeat("soi-", 4100))));
}
}
I have set MaxSendMessageSize to 10 MB on the server (MaxSendMessageSize = 10_485_760) and also set MaxReceiveMessageSize to 10 MB on the client. This is much larger than the length of the exception message.
If I make the operation return a long response message as in Task.FromResult(new HelloReply { Message = string.Join("", Enumerable.Repeat("soi-", 40000)) }) this works fine. This shows that the exception message isn't exceeding the maximum allowed message size.
What did you expect to see?
The following exception at the client:
Grpc.Core.RpcException: 'Status(StatusCode="Unknown", Detail="Exception was thrown by handler. Exception: soi-soi-soi-soi-soi-soi-soi-soi-soi-soi-soi-soi-soi-soi-soi-...
What did you see instead?
The following exception at the client:
Grpc.Core.RpcException: 'Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError) HttpProtocolException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)", DebugException="System.Net.Http.HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)")'
The text was updated successfully, but these errors were encountered:
What version of gRPC and what language are you using?
Language: C#
What operating system (Linux, Windows,...) and version?
Windows 11 Enterprise (10.0.22631 Build 22631)
What runtime / compiler are you using (e.g. .NET Core SDK version
dotnet --info
).NET 8.0.204
What did you do?
I followed the steps in the Microsoft tutorial for creating a .NET gRPC server and client. I modified the service operation to throw an exception with a long message as follows:
I have set
MaxSendMessageSize
to 10 MB on the server (MaxSendMessageSize = 10_485_760
) and also setMaxReceiveMessageSize
to 10 MB on the client. This is much larger than the length of the exception message.If I make the operation return a long response message as in
Task.FromResult(new HelloReply { Message = string.Join("", Enumerable.Repeat("soi-", 40000)) })
this works fine. This shows that the exception message isn't exceeding the maximum allowed message size.What did you expect to see?
The following exception at the client:
What did you see instead?
The following exception at the client:
The text was updated successfully, but these errors were encountered: