libp2p / go-libp2p-examples

Example libp2p applications
MIT License
338 stars 145 forks source link

Error getting chat-with-rendezvous (proto.InternalMessageInfo) #11

Closed Wei-1 closed 5 years ago

Wei-1 commented 5 years ago

While running:

go get github.com/libp2p/go-libp2p-examples/chat-with-rendezvous

I encounter this error:

# github.com/libp2p/go-libp2p-record/pb
/Users/weichen/go/src/github.com/libp2p/go-libp2p-record/pb/record.pb.go:68:28: undefined: proto.InternalMessageInfo

Based on these issues:

https://github.com/grpc/grpc-go/issues/2095 https://github.com/google/go-genproto/issues/77

The first thing that I should try is:

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

But after getting the new proto and protoc-gen-go, I still get the same error.

Then I try to delete the current protobuf src dir based on this issue https://github.com/golang/protobuf/issues/642

But apparently, it still doesn't help. (still get the same error while running the first script)

The current environment that I am using is go1.11, which is the latest version of Go already.

upperwal commented 5 years ago

Best and fastest solution is to remove everything in GOPATH/src/ and run

go get -d github.com/libp2p/go-libp2p-examples/...

I tried

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

with the same error.

or try removing everything from github.com/golang/protobuf and try running go get

Wei-1 commented 5 years ago

Delete the entire $GOPATH/src does solve the issue. Thanks @upperwal