GRPC test throws syntax error: unexpected token "test@email.com"

Calling a GRPC method that does not take any parameter goes fine. But, when I try to call a method with parameter, string and bytes. For the string i get the following error:

“GoError: unable to serialise request object to protocol buffer: proto: syntax error (line 1:10): unexpected token “test@email.com””

` // creating client and loading protos followed by following function:
export default () => {
client.connect(‘localhost:9000’, {plaintext: true});

const data = {
    email : 'test@email.com',
    userID : "22d3-af-e443-2a"
}

const response = client.invoke('mypackage.myservice/GetUserInfo', data);

}`

Please share the protobuf definition of mypackage.myservice/GetUserInfo, including its parameter and result types. We can’t really help you without that, this error basically means that the JS object you passed client.invoke() can’t be transformed to the protobuf data the server expects.

I have reworded the proto, but there are other endpoints from the same proto files that dont require input data, and they work fine. However when I pass data to GetUserInfo I receive the error I mentioned earlier.

The following proto lives inside framework/typesRepo:

syntax = "proto3";

package framework.predefinedTypes;

message userID {
  bytes id = 1;
}

message email {
  string emailType = 1;
}

and this proto lives inside framework/services:

syntax = "proto3";

package mypackage;

import "framework/typesRepo/predefinedTypes.proto";

message User {
  framework.predefinedTypes.userID id = 1;
  string userInfo = 2;
}

message FindUserByEmailRequest {
  framework.predefinedTypes.email email = 1;
  framework.predefinedTypes.userID userid = 2;
}

message FindUserByEmailResponse { User user = 1; }


service myservice {
  rpc GetUserInfo(FindUserByEmailRequest)
      returns (FindUserByEmailResponse) {}
}

This question was solved through an email by the support team. Thank you!

import encoding from 'k6/encoding';
const data = {
        phone : {number: '+15555555501'},
        userID : {value : encoding.b64encode("22d3-af-e443-2a")}
}