Skip to content

StatusCode="Internal", Detail="Failed to deserialize response message." when using System.WebAdapters #2340

@pockets3407

Description

@pockets3407

I'm not sure if this issue is related to the System.WebAdapters project or here.

I have an existing gRPC server and we are looking to migrate a legacy web client using asp.net web forms to blazor. Ideally, I would like to use the same application hosting both gRPC and the blazor web application.
After adding the System.WebAdapters to my DI during startup,

services.AddSystemWebAdapters();

my gRPC clients no longer work and I get the following exception and log messages.
Exception:

Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Failed to deserialize response message.")
   at Grpc.Net.Client.Internal.HttpClientCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
   at Grpc.Core.Interceptors.InterceptingCallInvoker.<BlockingUnaryCall>b__3_0[TRequest,TResponse](TRequest req, ClientInterceptorContext`2 ctx)
   at Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse](TRequest request, ClientInterceptorContext`2 context, BlockingUnaryCallContinuation`2 continuation)
   at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
   at GrpcService1.Greeter.GreeterClient.SayHelloUnary(HelloRequest request, CallOptions options)
   at GrpcService1.Greeter.GreeterClient.SayHelloUnary(HelloRequest request, Metadata headers, Nullable`1 deadline, CancellationToken cancellationToken)

Log Messages:

Grpc.Net.Client.Internal.GrpcCall: Debug: Sending message.
Grpc.Net.Client.Internal.GrpcCall: Trace: Serialized 'GrpcService1.HelloRequest' to 7 byte message.
Grpc.Net.Client.Internal.GrpcCall: Trace: Message sent.
Grpc.AspNetCore.Server.ServerCallHandler: Debug: Reading message.
Grpc.AspNetCore.Server.ServerCallHandler: Trace: Deserializing 7 byte message to 'GrpcService1.HelloRequest'.
Grpc.AspNetCore.Server.ServerCallHandler: Trace: Received message.
Grpc.AspNetCore.Server.ServerCallHandler: Debug: Sending message.
Grpc.AspNetCore.Server.ServerCallHandler: Trace: Serialized 'GrpcService1.HelloReply' to 14 byte message.
Grpc.AspNetCore.Server.ServerCallHandler: Trace: Message sent.
Grpc.Net.Client.Internal.GrpcCall: Trace: Response headers received.
Grpc.Net.Client.Internal.GrpcCall: Debug: Reading message.
Grpc.Net.Client.Internal.GrpcCall: Trace: No message returned.
Grpc.Net.Client.Internal.GrpcCall: Debug: Message not returned from unary or client streaming call.
Grpc.Net.Client.Internal.GrpcCall: Information: Call failed with gRPC error status. Status code: 'Internal', Message: 'Failed to deserialize response message.'.
Grpc.Net.Client.Internal.GrpcCall: Debug: Finished gRPC call.

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions