mwitkow / grpc-proxy

gRPC proxy is a Go reverse proxy that allows for rich routing of gRPC calls with minimum overhead.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

panic: interface conversion: *proxy.frame is not proto.Message: missing method ProtoMessage

rmilejcz opened this issue · comments

I have a project relying on https://github.com/improbable-eng/grpc-web/, specifically:

https://github.com/improbable-eng/grpc-web/go/grpcwebproxy

As of today, I can no longer make calls through the proxy, I get this error stack:

proxy_1    | panic: interface conversion: *proxy.frame is not proto.Message: missing method ProtoMessage
proxy_1    | 
proxy_1    | goroutine 47 [running]:
proxy_1    | google.golang.org/grpc/encoding/proto.marshal(0x923e20, 0xc0001a8400, 0xc000145980, 0x0, 0x0, 0x40c100, 0xc000145950, 0x30)
proxy_1    | 	/go/pkg/mod/google.golang.org/grpc@v1.24.0/encoding/proto/proto.go:54 +0x45
proxy_1    | google.golang.org/grpc/encoding/proto.codec.Marshal(0x923e20, 0xc0001a8400, 0x203000, 0x0, 0x0, 0x203000, 0x203000)
proxy_1    | 	/go/pkg/mod/google.golang.org/grpc@v1.24.0/encoding/proto/proto.go:74 +0xad
proxy_1    | google.golang.org/grpc.encode(0x7fc8845365d8, 0xee0970, 0x923e20, 0xc0001a8400, 0x0, 0xec4b80, 0x7fc88679e008, 0x0, 0x0)
proxy_1    | 	/go/pkg/mod/google.golang.org/grpc@v1.24.0/rpc_util.go:543 +0x52
proxy_1    | google.golang.org/grpc.prepareMsg(0x923e20, 0xc0001a8400, 0x7fc8845365d8, 0xee0970, 0x0, 0x0, 0x0, 0x0, 0x3, 0x40902b, ...)
proxy_1    | 	/go/pkg/mod/google.golang.org/grpc@v1.24.0/stream.go:1519 +0x85
proxy_1    | google.golang.org/grpc.(*clientStream).SendMsg(0xc000089b00, 0x923e20, 0xc0001a8400, 0x0, 0x0)
proxy_1    | 	/go/pkg/mod/google.golang.org/grpc@v1.24.0/stream.go:699 +0x169
proxy_1    | github.com/mwitkow/grpc-proxy/proxy.(*handler).forwardServerToClient.func1(0xafc6c0, 0xc0001a8220, 0xc0001884e0, 0xafc7e0, 0xc000089b00)
proxy_1    | 	/go/pkg/mod/github.com/mwitkow/grpc-proxy@v0.0.0-20181017164139-0f1106ef9c76/proxy/handler.go:155 +0xa0
proxy_1    | created by github.com/mwitkow/grpc-proxy/proxy.(*handler).forwardServerToClient
proxy_1    | 	/go/pkg/mod/github.com/mwitkow/grpc-proxy@v0.0.0-20181017164139-0f1106ef9c76/proxy/handler.go:148 +0x89

How can I go about debugging why this is happening?

I'm using this service / proto message:

service AuthService {
  rpc GetToken(AuthData) returns (Token) {
    option (google.api.http) = {
      post: "/v1/auth"
      body: "*"
    };
  }
}

message AuthData {
  string username = 1;
  string password = 2;
}

the Go output does have a method called ProtoMessage, the TypeScript output does not but even if I manually add this method to generated TypeScript the error is the exact same.

As far as I can tell no one is having this error but me, but I don't seem to have any ability to influence or debug it. Any sort of direction or suggestions are greatly appreciated thank you

I have the same problem. Any news regarding this issue?

Ok, I use this fork now: The issue is fixed there.

i had a similar stack trace. On dial out, I needed to pass the DialOption:

grpc.WithCodec(proxy.Codec())