Closed Philmod closed 10 months ago
Hi!
When trying to use this proxy[0], I'm getting the following error: failed to unmarshal the received message: failed to unmarshal, message is *proxy.Frame, want proto.Message
failed to unmarshal the received message: failed to unmarshal, message is *proxy.Frame, want proto.Message
Some more info in case that helps:
proto3
What could I do to fix?
Thank you so much, Philmod
[0]
director := func(ctx context.Context, fullMethodName string) (context.Context, *grpc.ClientConn, error) { md, _ := metadata.FromIncomingContext(ctx) outCtx := metadata.NewOutgoingContext(ctx, md.Copy()) if err := CheckBearerToken(ctx); err != nil { return outCtx, nil, grpc.Errorf(codes.PermissionDenied, "unauthorized access: %v", err) } return outCtx, backendConn, nil } server := grpc.NewServer(grpc.UnknownServiceHandler(proxy.TransparentHandler(director)))
I was able to fix it using a new codec:
func EncodingCodec() encoding.Codec { return &rawCodec{&protoCodec{}} }
Hi!
When trying to use this proxy[0], I'm getting the following error:
failed to unmarshal the received message: failed to unmarshal, message is *proxy.Frame, want proto.Message
Some more info in case that helps:
proto3
What could I do to fix?
Thank you so much, Philmod
[0]