首页 > 解决方案 > 将 grpc 升级到使用 TargetFrameworkVersion 4.8 的 v 2.33.1 时出现“Grpc.Core.RpcException”类型的异常

问题描述

当我尝试将 grpc 版本升级到 2.33.1 TargetFrameworkVersion 时出现以下异常:4.8

这个异常的内容没有告诉我任何事情,任何人都可以提供任何帮助谢谢。

使用过的包参考:

<ItemGroup>
  <PackageReference Include="Google.Protobuf" Version="3.14.0" />
  <PackageReference Include="Grpc.Core.Api" Version="2.33.1" />
  <PackageReference Include="Grpc.Tools" Version="2.33.1" />
</ItemGroup>

消息:“Grpc.Core.RpcException”类型的异常发生并被捕获。

2021-11-05T19:00:30.966+01:00 异常消息:RpcException:Status(StatusCode="Cancelled", Detail="Cancelled", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@ 1636135230.919000000","description":"从对等 ipv6 收到的错误:[::1]:28000","file":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\lib\surface\call.cc ","file_line":1062,"grpc_message":"已取消","grpc_status":1}")

类型:Grpc.Core.RpcException,Grpc.Core.Api,版本=2.0.0.0,Culture=neutral,PublicKeyToken=d754f35622e28bad 消息:状态(StatusCode="Cancelled",Detail="Cancelled",DebugException="Grpc.Core。 Internal.CoreErrorDetailException: {"created":"@1636135230.919000000","description":"从对等 ipv6 收到的错误:[::1]:28000","file":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\ src\core\lib\surface\call.cc","file_line":1062,"grpc_message":"Cancelled","grpc_status":1}") 上下文消息:调用 /ServiceGrpc/Init 时发生异常。来源:mscorlib 状态:状态(StatusCode="Cancelled",Detail="Cancelled",DebugException="Grpc.Core.Internal。2.UnaryCall(TRequest msg) in T:\src\github\grpc\src\csharp\Grpc.Core\Internal\AsyncCall.cs:line 78 at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method2 方法,字符串主机,CallOptions 选项,TRequest 请求)在 T:\src\github\grpc\src\csharp\Grpc.Core\DefaultCallInvoker.cs:Grpc.Core.Interceptors.InterceptingCallInvoker.b__3_0[TRequest,TResponse 的第 46 行](TRequest req, ClientInterceptorContext`2 ctx) 在 T:\src\github\grpc\src\csharp\Grpc.Core.Api\Interceptors\InterceptingCallInvoker.cs:line 51

标签: grpc

解决方案


推荐阅读