How does one initialize chaincode for a DAML Runtime on Fabric?

See the issue at the link below, the error I’m encountering is:

Admin@org1.example.com sign cert: /root/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
[error] (run-main-0) com.daml.FabricContextException: response {
[error]   status: 500
[error]   message: "error in simulation: failed to execute transaction f9b97b21b963917a2807414c9832fe2f388f98ac0df946246c7b95754cebe942: invalid invocation: chaincode \'daml_on_fabric\' has not been initialized for this version, must call as init first"
[error] }
[error] com.daml.FabricContextException: response {
[error]   status: 500
[error]   message: "error in simulation: failed to execute transaction f9b97b21b963917a2807414c9832fe2f388f98ac0df946246c7b95754cebe942: invalid invocation: chaincode \'daml_on_fabric\' has not been initialized for this version, must call as init first"
[error] }

I’ve tried adding --isInit to the sbt command as noted here for the peer command but it doesn’t help.

1 Like

I’ve added the solution to the linked GitHub issue. It is down to a version mismatch in docker-compose. Please make sure you are using 1.24.0 as per the daml-on-fabric readme. However, this particular issue is easy to solve for older versions so I’ve submitted a PR to the daml-on-fabric repo.

1 Like