Lab 4: Error: error getting chaincode deployment spec for ccForAll: error getting chaincode package
In lab 4, when trying to install chaincode on any peer, I got the following error:
Error: error getting chaincode deployment spec for ccForAll: error getting chaincode package bytes: failed to calculate dependencies: incomplete package: google.golang.org/protobuf/encoding/prototext
Somehow running the following command before the chaincode installation fixes this error (not sure anymore where I found it, but it was not part of the lab guide):
docker exec -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_PEER_ADDRESS=peer0.org1.example.com:7051 -e CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp cli go get github.com/hyperledger/fabric-chaincode-go/shim
I thought it was worth sharing, in case someone also encounters this.
Also, is there anyone that can explain to me why the chaincode installation does not work for me without this command, but works for others without it?