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

Actor Invoke serialization between Golang & JS #360

Open
danielgerlag opened this issue Feb 16, 2023 · 4 comments
Open

Actor Invoke serialization between Golang & JS #360

danielgerlag opened this issue Feb 16, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@danielgerlag
Copy link

Describe the bug
I have an actor host written in Javascript, and an actor client trying to invoke the actor, written in Go.
When I invoke a method from the Go client and serialize the data as JSON, the actor is activated but receives data that looks like this

{"type":"Buffer","data":[123,34,113,117,101,114,121,67,111,110,116,97,105,110,101,114,34,58,34,100,101,102,97,117,108,116,34,44,34,109,111,100,101,34,58,34,113,117,101,114,121,34,44,34,113,117,101,114,121,34,58,34,77,65,84,67,72,32,92,110,32,32,40,105,58,73,116,101,109,32,123,67,97,116,101,103,111,114,121,58,32,39,49,39,125,41,92,110,82,69,84,85,82,78,32,92,110,32,32,105,46,73,116,101,109,73,100,32,65,83,32,73,100,44,32,92,110,32,32,105,46,78,97,109,101,32,97,115,32,78,97,109,101,44,92,110,32,32,105,46,67,97,116,101,103,111,114,121,32,97,115,32,67,97,116,101,103,111,114,121,92,110,34,44,34,115,111,117,114,99,101,115,34,58,123,34,115,117,98,115,99,114,105,112,116,105,111,110,115,34,58,91,123,34,105,100,34,58,34,109,121,45,115,111,117,114,99,101,52,34,125,93,125,125],"id":"query20"}

If I invoke the actor from another Javascript client, it works as expected but from the Go client, the data payload comes in as an array of bytes.

@danielgerlag danielgerlag added the bug Something isn't working label Feb 16, 2023
@danielgerlag
Copy link
Author

UPDATE: Since 1.10 of the dapr sidecar was released, I now only get an empty object as the payload data on the host... if I manually downgrade the dapr sidecar to 1.9, then I get the byte array as mentioned above. A breaking change either way, in addition to the original bug.

@danielgerlag
Copy link
Author

ping @artursouza

@artursouza
Copy link
Member

We are fixing this. We have identified this regression and have an RC for 1.10.6. We still need to fix another regression before we release.

@danielgerlag
Copy link
Author

@artursouza any update on this yet, still is an issue? It seems that that invoking an actor from a grpc client and sending JSON data, there is no way to have the ContentType header of the request the gets sent to the actor host set to application/json

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

No branches or pull requests

2 participants