Unclear gRPC error about unknown token and serialization

I’m using the Operator Model but I’m not sure has any effect on my issue.

I’m getting the following error when trying to run my test.

time="2022-12-08T14:54:12Z" level=error msg="GoError: unable to serialise request object to protocol buffer: proto:\u00a0syntax error (line 1:65): unexpected token {\n\tat reflect.methodValueCall (native)\n\tat file:///Users/nobody/core/ice-proto/get-history.js:57:93(32)\n\tat native\n" executor=ramping-vus scenario=default source=stacktrace

Here’s the data object

export default () => {
  client.connect('service-name.default:80', {
    plaintext: true,
    // reflect: true
  });

  const data = {
    "account_id": "84187e72-8a9d-47db-b1a9-9dbe9e749626",
    "end_date": {
        "nanos": 1752116586,
        "seconds": 2
    },
    "limit": 1536071622,
    "offset": 716788300,
    "start_date": {
        "nanos": 1752116586,
        "seconds": 2
    }
  }
message GetHistoryRequest {
  // @inject_tag: validate:"required,uuid4"
  string account_id = 1;
  int32 offset = 2;
  // @inject_tag: validate:"required"
  int32 limit = 3;
  // @inject_tag: validate:"required,protoDatetime"
  google.protobuf.Timestamp start_date = 4;
  // @inject_tag: validate:"required,protoDatetime"
  google.protobuf.Timestamp end_date = 5;
}
  1. What is the “unexpected token”
  2. Do i really need to serialize, if so how?

I should add that im using k6 archive my-file.js to create a .tar with my proto files - that im uploading to a ConfigMap for the operator to use as the test.

Ive been able to do this successfully for the same service using the HealthCheck endpoint but that required an empty data data = {}

Hi @nema.darban,
have you tried removing the inject_tag from the protobuf? I don’t think they are defined by the Protobuf API.