dapr / dapr/go-sdk

Actor Invoke serialization between Golang & JS

Open
#360 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
479
Forks
187
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Reproduce the actor invocation from the Go client and compare its serialization boundary with the working JavaScript client; done means the JavaScript actor receives the decoded payload rather than a byte array.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
api, backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.