I got this error from trying to use CreateAsset() function twice.Error image
Does anyone know the cause of this? or what can I do to fix it?
I was playing with the fabric-samples and wanted to try to create asset as many as possible with CreateAsset() function. But I encountered a problem when you added the second CreatAsset() to the process.
I was using go chaincode from tutortial repo. Nothing is changed, only added 1 line of CreateAsset().
The asset-transfer-basic sample also has an example of how to unpack the additional information associated with a transaction invocation error. That would likely give you an error message (from the endorsing peer) that explained the reason for the failure.
If you look at the smart contract implementation, the first thing CreateAsset does is:
I suspect that you have called CreateAsset twice using the same asset ID. This is not allowed. You cannot create a new asset with the same ID as an asset that already exists. The asset ID is a unique identifier.