Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rmilejcz opened this issue Oct 1, 2019 · 3 comments

Comments

@rmilejcz
Copy link

rmilejcz commented Oct 1, 2019

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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

@hesmar
Copy link

hesmar commented Oct 8, 2019

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

@hesmar
Copy link

hesmar commented Oct 8, 2019

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

@emicklei
Copy link

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

grpc.WithCodec(proxy.Codec())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants