0

Whenever I try to instantiate a contract according to the MagnetoCorp example, I receive the following errors. In the terminal:

$ docker exec cliMagnetoCorp peer chaincode instantiate -n papercontract -v 0 -l node -c '{"Args":["org.papernet.commercialpaper:instantiate"]}' -C mychannel -P "AND ('Org1MSP.member')"

2019-05-03 06:00:40.396 UTC [chaincodeCmd] InitCmdFactory -> INFO 001 Retrieved channel (mychannel) orderer endpoint: orderer.example.com:7050 2019-05-03 06:00:40.400 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default escc 2019-05-03 06:00:40.400 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1

I have already tried to update node js to version 10.x, but it didn't help. Any idea what should I do?

Rot-man
  • 18,045
  • 12
  • 118
  • 124
mp94
  • 11
  • 1
  • 7
  • I believe you are having the same issue as described here https://stackoverflow.com/questions/55856395/hyperledger-fabric-unable-to-instantiate-missing-contract-org-hyperledger-fa – david_k May 03 '19 at 17:20
  • I have also tried that, but it didn't work for me. Any other suggestion? – mp94 May 03 '19 at 17:23
  • 1
    suggest you clean out all chaincode images as well otherwise it could re-use the old images. I usually do docker rmi $(docker images dev-* -q). If that doesn't work, then you could try deleting the contract-metadata folders for each of the contracts – david_k May 03 '19 at 17:56
  • Great, deleting the contract-metadata folders resolved my error! Thank you @david_k – mp94 May 03 '19 at 19:41
  • Sorry, but I tried again with the same steps, and error is again appearing.. I assume that there is some bag or similar, and instantiating is confused during the process. Is there some more particular fix? – mp94 May 03 '19 at 21:29
  • Make sure you clear out all old chaincode images "docker rmi $(docker images dev-* -q)" or you need to install and instantiate using a new version number otherwise you will use old chaincode images that don't contain your changes – david_k May 04 '19 at 07:09

0 Answers0