Welcome to the Linux Foundation Forum!

Lab 6.1 - Not able to see docker container for chaincode

Hey All,
I am working on reportsContract lab 6.1, where i see that my Reports contract does gets installed, and committed to network without any issue. But the same when i try to invoke it gives me

Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction d12a78ea031d...: could not launch chaincode reports_chaincode_1.0:b68555e34...: chaincode registration failed: container exited with 1"

I checked docker images, and found that docker image for Smart Contract was not created. Not sure then how fabric is installing and committing the chaincode. Is there any issue with chaincode? If yes how can i build the chaincode.
For Fabric 1.4, for go lang there was a tool, provided by Fabric community, to compile the golang code and check for errors. Do we have anything for nodejs? How can i make sure there is no problem in my contract?


  • SumitVedpathak
    SumitVedpathak Posts: 21
    edited July 9

    I figured out, after a long research. It was
    "start": "fabric-chaincode-node start"
    code which was missing from package.json file.
    But i still have a question, how can i make sure that the Contract is working properly before installing it on the network.

  • Bobbijn
    Bobbijn Posts: 78

    @SumitVedpathak , Lets see if we can understand your question. are you attempting to test your smart contract before installing it? At what point in the lab are you attempting to do this test?

  • No, all steps Lifecycle steps were carried out, but still i was not able to invoke any function, until i figured out that i was missing an command in package.json file to start the chaincode.
    Thanks though.

  • Bobbijn
    Bobbijn Posts: 78

    @SumitVedpathak Glad it worked out, Do you still need information on testing smart contracts? Keep on learning. Bobbi


Upcoming Training