Skip to content
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

Cryptic and un-actionable error message when actor interfaces do not match #424

Open
rynowak opened this issue Oct 11, 2020 · 5 comments
Open
Labels
area/actor kind/bug Something isn't working
Milestone

Comments

@rynowak
Copy link
Collaborator

rynowak commented Oct 11, 2020

Expected Behavior

A mismatch in actor interface contracts can be reported in a way that makes sense.

Actual Behavior

Having a mismatch in details like what namespace an interface or DTO is declared in results in a cryptic error message.

 No interface found with this Id 403064080

This error can't really be reasoned about since it's a generated checksum. Fixing the problem is a matter of trial and error. I don't have in my head yet a clear picture of what exactly has to match for communication to work properly.

It seems like the best way (right now) to use actors with Dapr is to rely on binary dependencies to share contracts. This fights with the rationale for using microservices in the first place (to version and deploy separately).

Steps to Reproduce the Problem

Using the actor sample in the repo - remove the project reference from the sample client. Copy the IDemoActor interface into the sample project, and change the namespace used to declare to be inconsistent with the hosting project.

@rynowak rynowak added the kind/bug Something isn't working label Oct 11, 2020
@amanbha
Copy link
Contributor

amanbha commented Oct 12, 2020

Non remoting scenario without the need for sharing the interface can be used for this: https://github.com/dapr/dotnet-sdk/blob/master/samples/Actor/ActorClient/Program.cs#L74

@vinayada1 vinayada1 added the question Further information is requested label Oct 27, 2020
@vinayada1 vinayada1 added this to To do in 1.0.0 Milestone via automation Oct 27, 2020
@vinayada1 vinayada1 removed the question Further information is requested label Oct 27, 2020
@rynowak rynowak removed this from To do in 1.0.0 Milestone Jan 8, 2021
@rynowak rynowak added this to the Post v1.0 milestone Jan 8, 2021
@MattCosturos
Copy link

I just ran into this error on a new project. Is a copy of existing project that works fine.

What do I need to start looking at to resolve this cryptic error?

@rynowak
Copy link
Collaborator Author

rynowak commented Oct 29, 2023

Hi @MattCosturos - It's a been a while since I opened this issue, so I'm remembering to the best of my ability ....

What I remember about this issue is that the C# strongly-typed actor programming model requires you to share interface definitions between the client and the server. It's not good enough for for the interfaces to have the same members and names, they need to actually be shared via project-references.

@MattCosturos
Copy link

Thanks for getting back to me.

I ended up having some mixed up reference in my new project docker builds. I was using Actor binary from project 1, but client binary from the new project 2, so in my case it was an actual mismatch interface.

It would be great if the error message could be improved to be something like "Actor with Interface definition Task<string> DoSomething(int param) not found"

@philliphoff
Copy link
Contributor

Somewhat related, I have a proposal/PR (#1158) that would eliminate the need for applications to share compiled definitions when using strongly-typed interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/actor kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants