Actor method invocation throws error for Services in different solution
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
I have two services Service1 and Service2. Service1 supports Actor1 which has method1.
Service2 would invoke Actor1.method1 in Service1
Now when both Services are in same solution with the common interface and classes in a Common project referenced by both the services the call from Service2 to Actor1.method1 is successful
But if the Services are in different solution where the common interface and classes are just copied in both solution (with same namespace) the call fails with exception
```
fail: facade.Controllers.AlarmController[0]
== APP == [null]
== APP == Dapr.Actors.ActorMethodInvocationException: Remote Actor Method Exception
== APP == ---> Dapr.Actors.ActorInvokeException: Element 'urn:actors:value' contains data of the 'urn:actors:UpdateAttributesAsyncReqBody' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'UpdateAttributesAsyncReqBody' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.
== APP == --- End of inner exception stack trace ---
== APP == at Dapr.Actors.DaprHttpInteractor.InvokeActorMethodWithRemotingAsync(ActorMessageSerializersManager serializersManager, IActorRequestMessage remotingRequestRequestMessage, CancellationToken cancellationToken)
== APP == at Dapr.Actors.Communication.Client.ActorRemotingClient.InvokeAsync(IActorRequestMessage remotingRequestMessage, CancellationToken cancellationToken)
== APP == at Dapr.Actors.Client.ActorProxy.InvokeMethodAsync(Int32 interfaceId, Int32 methodId, String methodName, IActorRequestMessageBody requestMsgBodyValue, CancellationToken cancellationToken)
== APP == at facade.Controllers.AlarmController.b__4_0() in E:\Project\alarm-manager\facade\Controllers\AlarmController.cs:line 66
== APP == info: facade.Controllers.AlarmController[0]
```
I was wondering why the two cases are different given all the common actor interface and classes have similar structure and namespace in the second scenario
Contributor guide
Assessment
This issue has not been assessed yet.