grpc / grpc/grpc-dotnet

System.Buffers Exception within Grpc.Core

Open
#2,670 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
4.5k
Forks
835
Avg merge
6d 3h
Merged PRs (30d)
7

Description

Has anyone on the DEV team scene this phenomenon:

_Exception thrown: 'System.MissingMethodException' in Grpc.Core.dll
TRSSCommsServiceClient.RequestServerStatus(): System.MissingMethodException: Method not found: 'System.Buffers.IBufferWriter`1 Grpc.Core.SerializationContext.GetBufferWriter()'.
at Grpc.Common.TRSSComms.__Helper_SerializeMessage(IMessage message, SerializationContext context)
at Grpc.Core.Internal.AsyncCallBase`2.UnsafeSerialize(TWrite msg, DefaultSerializationContext context) in /var/local/git/grpc/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs:line 257
at Grpc.Core.Internal.AsyncCall`2.UnaryCall(TRequest msg) in /var/local/git/grpc/src/csharp/Grpc.Core/Internal/AsyncCall.cs:line 104
at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request) in /var/local/git/grpc/src/csharp/Grpc.Core/DefaultCallInvoker.cs:line 46
at Grpc.Core.Interceptors.InterceptingCallInvoker.b__3_0[TRequest,TResponse](TRequest req, ClientInterceptorContext`2 ctx) in /_/src/Grpc.Core.Api/Interceptors/InterceptingCallInvoker.cs:line 52
at Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse](TRequest request, ClientInterceptorContext`2 context, BlockingUnaryCallContinuation`2 continuation) in /_/src/Grpc.Core.Api/ClientBase.cs:line 205
at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request) in /_/src/Grpc.Core.Api/Interceptors/InterceptingCallInvoker.cs:line 49
at Grpc.Common.TRSSComms.TRSSCommsClient.RequestCommsStatus(Empty request, CallOptions options) in C:\Users\Dev\source\repos\tcs_sensor_monitor\Grpc.Common\obj\Debug\netstandard2.0\TRSSCommsGrpc.cs:line 234
at Grpc.Common.TRSSComms.TRSSCommsClient.RequestCommsStatus(Empty request, Metadata headers, Nullable`1 deadline, CancellationToken cancellationToken) in C:\Users\Dev\source\repos\tcs_sensor_monitor\Grpc.Common\obj\Debug\netstandard2.0\TRSSCommsGrpc.cs:line 229
at Grpc.Client.TRSSCommsServiceClient.RequestServerStatus() in C:\Users\Dev\source\repos\tcs_sensor_monitor\Grpc.Client\TRSSCommsServiceClient.cs:line 96_

It appears the exception is getting thrown within Core. Some context: Not sure if you guys are familiar with TAK.GOV products, but I wrote a WinTAK plugin that makes a gPRC connection with another application. This connection code has been working until I migrated from WinTAK 5.2 to 5.4. The 5.4 does not have a dependency to System.Buffers.
Google.Protobuf 3.32.1
Grpc.Core 2.46.6
Grpc.Core.Api 2.71.0

Contributor guide

Open the contributing guide

Research direction

Start with the reported package versions for Google.Protobuf, Grpc.Core, and Grpc.Core.Api, then inspect the generated Grpc.Common/obj/Debug/netstandard2.0/TRSSCommsGrpc.cs and Grpc.Client/TRSSCommsServiceClient.cs call sites. Reproduce RequestServerStatus after the WinTAK 5.2-to-5.4 migration and determine whether the System.Buffers method mismatch is resolved without the MissingMethodException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.