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
I have a service Grpc Service that accepts simple type parameters / returns simple type results. The project uses code first, so let me post the interface:
When I call the reflection endpoint, the following Exception is raised in the service process:
Dataof this type has inbuilt behaviour,and cannot be added to a model in this way:<data-type>
bei ProtoBuf.Meta.RuntimeTypeModel.FindOrAddAuto(Type type, Boolean demand, Boolean addWithContractOnly, Boolean addEvenIfAutoDisabled, CompatibilityLevel ambient)in/_/src/protobuf-net/Meta/RuntimeTypeModel.cs: Zeile760
bei ProtoBuf.Meta.RuntimeTypeModel.<GetSchema>g__AddType|41_1(Type type, Boolean forceOutput, Boolean inferPackageAndOrigin,<>c__DisplayClass41_0&)in/_/src/protobuf-net/Meta/RuntimeTypeModel.cs: Zeile217
bei ProtoBuf.Meta.RuntimeTypeModel.GetSchema(SchemaGenerationOptions options)in/_/src/protobuf-net/Meta/RuntimeTypeModel.cs: Zeile289
bei ProtoBuf.Grpc.Reflection.SchemaGenerator.GetSchema(Type[] contractTypes)in/_/src/protobuf-net.Grpc.Reflection/SchemaGenerator.cs: Zeile127
bei ProtoBuf.Grpc.Reflection.SchemaGenerator.GetSchema(Type contractType)in/_/src/protobuf-net.Grpc.Reflection/SchemaGenerator.cs: Zeile44
bei ProtoBuf.Grpc.Reflection.FileDescriptorSetFactory.Populate(FileDescriptorSet fileDescriptorSet, Type serviceType, BinderConfiguration binderConfiguration)in/_/src/protobuf-net.Grpc.Reflection/FileDescriptorSetFactory.cs: Zeile47
bei ProtoBuf.Grpc.Reflection.FileDescriptorSetFactory.Create(IEnumerable`1 serviceTypes, BinderConfiguration binderConfiguration)in/_/src/protobuf-net.Grpc.Reflection/FileDescriptorSetFactory.cs: Zeile25
bei ProtoBuf.Grpc.Reflection.ReflectionService..ctor(BinderConfigurationbinderConfiguration, Type[]types) in /_/src/protobuf-net.Grpc.Reflection/ReflectionService.cs: Zeile33
bei ProtoBuf.Grpc.Server.ReflectionExtensions.<>c.<AddCodeFirstGrpcReflection>b__1_0(IServiceProvider serviceProvider)in/_/src/protobuf-net.Grpc.AspNetCore.Reflection/ReflectionExtensions.cs: Zeile60
bei Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)in Microsoft.Extensions.DependencyInjection.ServiceLookup\CallSiteVisitor.cs: Zeile32
bei Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)in Microsoft.Extensions.DependencyInjection.ServiceLookup\CallSiteRuntimeResolver.cs: Zeile78
bei Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)in Microsoft.Extensions.DependencyInjection.ServiceLookup\CallSiteVisitor.cs: Zeile20
bei Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)in Microsoft.Extensions.DependencyInjection.ServiceLookup\CallSiteRuntimeResolver.cs: Zeile28
bei Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)in Microsoft.Extensions.DependencyInjection\ServiceProvider.cs: Zeile209
bei Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)in Microsoft.Extensions.DependencyInjection\ServiceProvider.cs: Zeile179
bei Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)in Microsoft.Extensions.DependencyInjection.ServiceLookup\ServiceProviderEngineScope.cs: Zeile70
bei Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)in Microsoft.Extensions.DependencyInjection\ServiceProviderServiceExtensions.cs: Zeile12
bei Grpc.AspNetCore.Server.Internal.DefaultGrpcServiceActivator`1.Create(IServiceProvider serviceProvider)in Grpc.AspNetCore.Server.Internal\DefaultGrpcServiceActivator.cs: Zeile14
bei Grpc.Shared.Server.DuplexStreamingServerMethodInvoker`3.<Invoke>d__4.MoveNext()in Grpc.Shared.Server\DuplexStreamingServerMethodInvoker.cs: Zeile64
I used dotnet-grpc-cli to invoke the endpoint to list available services (ls). I assume that the tool is not the problem here, since the exception is raised in the service host.
I attached a debugger and found out, that on the first instance where either input or output parameters are simple types, the exception is thrown. I'm aware that this is no good service design and understand if you don't intend to put work in a fix. Perhaps at least the error message could be somewhat improvided.
Cheers,
Andreas
The text was updated successfully, but these errors were encountered:
AndreasSchommer
changed the title
Server reflection failes wehen either request oder response are simple types
Server reflection failes when either request oder response are simple types
Mar 19, 2024
I have a service Grpc Service that accepts simple type parameters / returns simple type results. The project uses code first, so let me post the interface:
When I call the reflection endpoint, the following Exception is raised in the service process:
I used dotnet-grpc-cli to invoke the endpoint to list available services (ls). I assume that the tool is not the problem here, since the exception is raised in the service host.
I attached a debugger and found out, that on the first instance where either input or output parameters are simple types, the exception is thrown. I'm aware that this is no good service design and understand if you don't intend to put work in a fix. Perhaps at least the error message could be somewhat improvided.
Cheers,
Andreas
The text was updated successfully, but these errors were encountered: