Open marcusvcs opened 7 years ago
Hi @marcusvcs , try to run govend -v -u
. That will scan your project, update all dependencies and update the vendor.yml
revision versions.
In alternative, remove the vendor.yml
and run govend -v -l
to scan and install all the dependencies and create a new vendor.yml
.
Let us know if this helps.
I did run govend -v -u
. After that, I had to change the method signature of init, query, and invoke in chaincode.go to the following:
func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
as are in the example that I was trying to replicate. The code is deployed and the method add_test_data
is invoked with no errors, but when I try to execute any query method, either by REST API or HFC lib, I get the following error on my node log:
OUT - [31m14:10:47.814 [chaincode] processStream -> ERRO 5be[0m Got error: [c3ad1ffb-fc95-422d-811f-1f7c2c9750c1]Chaincode handler FSM cannot handle message (RANGE_QUERY_STATE) with payload size (18) while in state: ready
OUT - [31m14:10:47.814 [chaincode] processStream -> ERRO 5bf[0m [c3ad1ffb]Error handling message, ending stream: [c3ad1ffb-fc95-422d-811f-1f7c2c9750c1]Chaincode handler validator FSM cannot handle message (ERROR) with payload size (146) while in state: ready
Tried the same chaincode on BlueMix too and I am getting the same error.
Example of a query function that is not working:
func get_user(stub shim.ChaincodeStubInterface, args []string) pb.Response {
var item data.User
err := utils.Get(stub, &item, args[0])
if err != nil {
return shim.Error("Could not get user")
}
itemJson, err := json.Marshal(item)
if err != nil {
return shim.Error("Could not marshal user to json")
}
return shim.Success(itemJson)
}
I am trying to include "github.com/hyperledger/fabric/accesscontrol/impl" as a import in the fabric-boilerplate example, but when I try to run govend, I get this error:
github.com/hyperledger/fabric/accesscontrol/impl bad ping: GetFileAttributesEx vendor\github.com\hyperledger\fabric\accesscontrol\impl: The system cannot find the path specif ied. github.com/magiconair/properties/_third_party/gopkg.in/check.v1 bad ping: GetFileAttributesEx vendor\github.com\magiconair\properties_third_party\gopkg.in\check.v1: The syst em cannot find the path specified.
Is there something I am missing? I am new to Go.