GPRC Oneof Serialization issues

I’m seeing an issue with Postman in serializing an object with a map field with a value that has a oneof field.

map<string, Value> extra_parameters = 3;

message Value {
  oneof value_oneof {
    string string_value = 1;
    int64 int64_value = 2;
    double double_value = 3;
    bool bool_value = 4;
    List list_value = 5;
    // TODO: Migrate User --> OverridableUser
    User user_value = 6;
    Map map_value = 7;
    Error error_value = 8;
    google.protobuf.NullValue null_value = 9;
    OverridableUser overridable_user_value = 10;
  }
}

When sending the following request over postman

{
    "evaluation_request": {
        "namespace_name": "ComponentTests",
        "feature_name": "SimpleComponentTest",
        "caller_user": {
            "user_id": "10105922394"
        },
        "extra_parameters": {
            "targetUser": {
                "string_value": "3"
            },
            "otherUser": {
                "user_value": {
                    "id": 456
                }
            }
        }
    }
}

The raw bytes deserialize as follows:

when sending the same request with a different GRPC client, the bytes deserialize correctly.

Is there an issue I’m missing or any workaround to this, or is this just a bug?

1 Like

Raw bytes from postman

0a 50 0a 13 53 69 6d 70 6c 65 43 6f 6d 70 6f 6e 65 6e 74 54 65 73 74 12 0e 43 6f 6d 70 6f 6e 65 6e 74 54 65 73 74 73 1a 10 0a 0a 74 61 72 67 65 74 55 73 65 72 12 02 48 00 1a 0f 0a 09 6f 74 68 65 72 55 73 65 72 12 02 48 00 22 06 08 da c6 f0 d2 25

Raw bytes from other GRPC client

0a 54 0a 13 53 69 6d 70 6c 65 43 6f 6d 70 6f 6e 65 6e 74 54 65 73 74 12 0e 43 6f 6d 70 6f 6e 65 6e 74 54 65 73 74 73 1a 11 0a 0a 74 61 72 67 65 74 55 73 65 72 12 03 0a 01 33 1a 12 0a 09 6f 74 68 65 72 55 73 65 72 12 05 32 03 08 c8 03 22 06 08 da c6 f0 d2 25

Hi @payload-geoscientis3 ! Thanks for reporting this issue. We’ve been able to reproduce it on our end and are currently investigating the root cause. I’ll keep this thread updated as we make progress.

1 Like