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

failed to resolve symbol #174

Open
ghost opened this issue Jul 20, 2020 · 3 comments
Open

failed to resolve symbol #174

ghost opened this issue Jul 20, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 20, 2020

Hi, thanks for this project.

I have just installed from main, and I setup a minimal gRPC server.

When listing services, I have no issues:

grpcurl --plaintext localhost:8080 list
grpc.reflection.v1alpha.ServerReflection
user.UserServic

However, when I go to describe the service or list the method, I get:

grpcurl --plaintext localhost:8080 describe
grpc.reflection.v1alpha.ServerReflection is a service:
service ServerReflection {
  rpc ServerReflectionInfo ( stream .grpc.reflection.v1alpha.ServerReflectionRequest ) returns ( stream .grpc.reflection.v1alpha.ServerReflectionResponse );
}
Failed to resolve symbol "user.UserService": Symbol not found: user.UserService

or

grpcurl --plaintext localhost:8080 list user.UserService
Failed to list methods for service "user.UserService": Symbol not found: user.UserService

Perhaps I am missing something obvious.

@ghost
Copy link
Author

ghost commented Jul 20, 2020

Realizing that this is probably due to my usage of gogo/protobuf. Might not be compatible with reflection.

@Lucareful
Copy link

I hava the same problem. and i used gogo/protobuf , Is this problem solved now?Grateful

@jhump
Copy link
Contributor

jhump commented Nov 7, 2022

@Lucareful, @ghost: this is not a grpcurl issue as the problem is in the server, which does not correctly provide the reflection service due to the use of gogo. It's really an issue between gogoprotobuf and the reflection service implementation in the grpc-go repo. Details here: https://jbrandhorst.com/post/gogoproto/#reflection.

Unfortunately, as of a couple of weeks ago, the gogo project is no longer supported: gogo/protobuf#691 (comment)

You might see if Crowdstrike's csproto helps. It's a runtime indirection meant to provide better interop between gogo and the official v1 and v2 APIs ("github.com/golang/protobuf" and "google.golang.org/protobuf" respectively). Unfortunately, from what I understand of the underlying issue, it probably will not be able to help with getting the reflection service to work.

So another option (which is likely a much bigger effort to migrate, but is probably the right long-term path) is to migrate from gogo to vtprotobuf. It is supported and most importantly compatible with the official V2 protobuf runtime API (e.g. no more need to use a forked runtime). It provides many of the same advantages offered by gogo (mostly related to performance, especially for serialization/deserialization).

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

2 participants