May 6, 2019

Oracle blockchain error: executing chaincode premature execution

[#OBPCS]

I received the below error while executing a rest service of a participant in the Oracle Blockchain network. I deployed and instantiated successfully a new version of a chain code into all the participants of a channel in the network. While executing the corresponding rest service, it has thrown the below error. This is because I executed the rest service immediately after the code was instantiated. It took a few seconds to available. I executed the rest service again after a few seconds and then it worked without any code or configuration changes. :).

It looks funny, but it worked for me.  So, when you see this error, don't be panic. Just wait a few seconds and try again. This is because it may take some time for chain code to be ready on rest servers as these changes have to be applied to many containers in the backend.

{
"returnCode":"Failure",
"info":{
"proxyError":"Failed query proposal from peer(s) prodorganicpeer1, prodorganicpeer0.",
"peerErrors":[
{
"peerId":"prodorganicpeer1",
"errMsg":"Sending proposal to prodorganicpeer1 failed because of: gRPC failure=Status{code=UNKNOWN, description=error executing chaincode: premature execution - chaincode (oow:v1.3) launched and waiting for registration, cause=null}",
"verified":false
},
{
"peerId":"prodorganicpeer0",
"errMsg":"Sending proposal to prodorganicpeer0 failed because of: gRPC failure=Status{code=UNKNOWN, description=error executing chaincode: premature execution - chaincode (oow:v1.3) launched and waiting for registration, cause=null}",
"verified":false
}
]
}}

#OBPCS #OracleBlockchain #Blockchain