Cysharp/GrpcWebSocketBridge

MagicOnion 6.0 and GrpcWebSocketBridge: Buffer is not large enough for header

Sen-Gupta opened this issue · 1 comments

Just Updated to MagicOnion 6.0 and using latest GrpcWebSocketBridge. We get the following error.
It works fine with previous releas of magic onion which is 5.1.8.

{
"@t": "2024-02-01T15:08:21.0248904Z",
"@mt": "Status(StatusCode="Internal", Detail="Error starting gRPC call. InvalidOperationException: Buffer is not large enough for header", DebugException="System.InvalidOperationException: Buffer is not large enough for header")",
"@m": "Status(StatusCode="Internal", Detail="Error starting gRPC call. InvalidOperationException: Buffer is not large enough for header", DebugException="System.InvalidOperationException: Buffer is not large enough for header")",
"@i": "c845d5d8",
"@l": "Error",
"@x": "Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. InvalidOperationException: Buffer is not large enough for header", DebugException="System.InvalidOperationException: Buffer is not large enough for header")\r\n ---> System.InvalidOperationException: Buffer is not large enough for header\r\n at Grpc.Net.Client.Web.Internal.GrpcWebResponseStream.ReadAsync(Memory1 data, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.StreamExtensions.ReadMessageAsync[TResponse](Stream responseStream, GrpcCall call, Func2 deserializer, String grpcEncoding, Boolean singleMessage, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.GrpcCall2.ReadMessageAsync(Stream responseStream, String grpcEncoding, Boolean singleMessage, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.GrpcCall2.RunCall(HttpRequestMessage request, Nullable1 timeout)\r\n --- End of inner exception stack trace ---\r\n at MagicOnion.Client.ResponseContextRaw2.FromRawResponseToResponseAsync()\r\n at MagicOnion.Client.ResponseContextRaw2.WaitResponseAsync()\r\n at Insights.Core.Client.Grpc.LoggingFilter.SendAsync(RequestContext context, Func2 next)\r\n at MagicOnion.Client.Internal.RawMethodInvoker4.InvokeUnaryCore(MagicOnionClientBase client, String path, TRequest request, Func2 requestMethod)\r\n at MagicOnion.UnaryResult1.UnwrapResponse()\r\n at Insights.Core.Client.Grpc.GrpcClients.EquitiesGrpcServiceClient.GetAllEntitiesAsync(String userId, Int64 lastSyncStamp)", "Application": "InsightsMaui", "ApplicationName": "Insights Logging", "ApplicationType": "Native", "BusinessEntityId": null, "ConnectionId": "0HN136QGA9ABU", "Env": null, "ExceptionDetail": { "HResult": -2146233088, "InnerException": { "HResult": -2146233079, "Message": "Buffer is not large enough for header", "Source": "GrpcWebSocketBridge.Client", "TargetSite": "Void MoveNext()", "Type": "System.InvalidOperationException" }, "Message": "Status(StatusCode=\"Internal\", Detail=\"Error starting gRPC call. InvalidOperationException: Buffer is not large enough for header\", DebugException=\"System.InvalidOperationException: Buffer is not large enough for header\")", "Source": "System.Private.CoreLib", "Status": { "DebugException": { "Data": [], "HResult": -2146233079, "HelpLink": null, "InnerException": null, "Message": "Buffer is not large enough for header", "Source": "GrpcWebSocketBridge.Client", "StackTrace": " at Grpc.Net.Client.Web.Internal.GrpcWebResponseStream.ReadAsync(Memory1 data, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.StreamExtensions.ReadMessageAsync[TResponse](Stream responseStream, GrpcCall call, Func2 deserializer, String grpcEncoding, Boolean singleMessage, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.GrpcCall2.ReadMessageAsync(Stream responseStream, String grpcEncoding, Boolean singleMessage, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.GrpcCall2.RunCall(HttpRequestMessage request, Nullable1 timeout)",
"TargetSite": "Void MoveNext()",
"_typeTag": "InvalidOperationException"
},
"Detail": "Error starting gRPC call. InvalidOperationException: Buffer is not large enough for header",
"StatusCode": "Internal",
"_typeTag": "Status"
},
"StatusCode": "Internal",
"TargetSite": "Void Throw()",
"Trailers": [],
"Type": "Grpc.Core.RpcException"
},
"InstanceId": "0e9734ddc4ab45f590949d546bac6532",
"MachineName": "ICAN-SEN",
"Origin": "Client",
"ProcessId": 61688,
"ProcessName": "InsightsMauiApp",
"RequestId": "0HN136QGA9ABU:00000005",
"RequestPath": "/clientlog",
"SourceContext": "Insights.Core.Client.Grpc.GrpcClients.EquitiesGrpcServiceClient",
"ThreadId": 1
}

Closing as I saw updated nuget package today, will update in a new ticket!