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

"Building a gRPC service with Node.js" "go run client.go" causes "undefined: grpc.SupportPackageIsVersion3" #5

Closed
jab opened this issue Feb 1, 2017 · 3 comments

Comments

@jab
Copy link

jab commented Feb 1, 2017

I just started the "Building a gRPC service with Node.js" codelab and got up to the "go run client.go" step, but it fails with

# _/Users/<user>/src/cloud-grpc/start/books
books/books.pb.go:107: undefined: grpc.SupportPackageIsVersion3

I'm new to this stack but based on a quick search it looks like grpc/grpc-go#1002 is the issue?

@jab
Copy link
Author

jab commented Feb 1, 2017

In case it helps, the URL of the page I'm on is https://codelabs.developers.google.com/codelabs/cloud-grpc/index.html?index=..%2F..%2Findex#3

@MakMukhi
Copy link

MakMukhi commented Feb 1, 2017

#6

@jab
Copy link
Author

jab commented Feb 2, 2017

For anyone else who hits this in the future (until it's fixed in #6), you can work around it with the following patch (generated against latest master, 053463b):

diff --git a/start/books/books.pb.go b/start/books/books.pb.go
index bb210f0..59d1762 100644
--- a/start/books/books.pb.go
+++ b/start/books/books.pb.go
@@ -104,7 +104,7 @@ var _ grpc.ClientConn

 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion3
+const _ = grpc.SupportPackageIsVersion4

 // Client API for BookService service

@@ -327,7 +327,7 @@ var _BookService_serviceDesc = grpc.ServiceDesc{
 			ServerStreams: true,
 		},
 	},
-	Metadata: fileDescriptor0,
+	Metadata: "books.proto",
 }

 func init() { proto.RegisterFile("books.proto", fileDescriptor0) }

Thanks to @MakMukhi for the workaround.

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