-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No marshaller available for xxx #306
Comments
|
if I don't use below code, it work well context.Services.AddCodeFirstGrpcReflection(); |
|
I ran into the same (or a similar) issue literally 20 minutes ago. This fails: [ServiceContract]
public interface IFooService
{
[OperationContract]
public ValueTask<FooResponse> Foo(FooRequest req);
// other methods
}
[ProtoContract]
public sealed class FooResponse
{
[ProtoMember(1)]
public bool Exists { get; set; }
[ProtoMember(2)]
public LocalDate? PlanningStart { get; set; }
[ProtoMember(3)]
public LocalDate? PlanningEnd { get; set; }
} with the following error:
Yet this works: [ServiceContract]
public interface IFooService
{
[OperationContract]
public ValueTask<Bar> Foo(FooRequest req);
// other methods
}
[ProtoContract]
public sealed class Bar
{
[ProtoMember(1)]
public required FooResponse Baz {get; set;}
}
[ProtoContract]
public sealed class FooResponse
{
[ProtoMember(1)]
public bool Exists { get; set; }
[ProtoMember(2)]
public LocalDate? PlanningStart { get; set; }
[ProtoMember(3)]
public LocalDate? PlanningEnd { get; set; }
} I had another issue yesterday where simply wrapping an object made an issue go away, which I can't explain. |
OK, that's weird; I'll investigate |
Thanks a lot! |
I'm available at marc.gravell at gmail.com, or another way that often works is inviting @mgravell to a private github repo |
if i add the package as below,it occur the error that i given
Is there any conflict ? |
You got mail. And because I forgot to mention it in the mail:
I have the |
hello, have you find the problem? |
If I had an update for you: I would have replied already. I haven't even had chance to look yet. Please be realistic about your expectations and demands here - this isn't paid commercial support; this is somebody giving up their free time to try to help strangers. I spent my weekend with my family. This is not my paid day job, and you're not a paying customer. Please don't pester people who are helping you on those terms! I'll look as soon as I can, but: don't nag - that just sucks the life and joy out of OSS. |
i'm sorry to disturb you, i neglect the time zone (it is workday in my zone). |
I had the issue like this once. For me the reason was in my grpc model. I had a property which is an enum that was inside the library (nuget), and the library was not directly (implicitly) added as a dependency to the assembly where I had my grpc model. Hope this can help someone. |
Is there any further Investigation? |
(1).if only it as client , it work well.
(2).now, it as client and server, and add grpc reflection
....
now .i ocur the error :
---> System.TypeInitializationException: The type initializer for 'DefaultProxyCache`1' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidOperationException: No marshaller available for Xchain.Share.Serv.Orders.Orders.OrderDto
at ProtoBuf.Grpc.Internal.MarshallerCache.g__Throw|5_0T in /_/src/protobuf-net.Grpc/Internal/MarshallerCache.cs:line 39
The text was updated successfully, but these errors were encountered: