#fabric-sdk-node #fabric-sdk-node


pham.qtpham@...
 

Hi,

I can run and test my Smart Contract manually using command like this without any error:

peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls true --cafile /Users/phamquoctrung/PLN.V1.5/pharma-ledger-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C plnchannel -n pharmaLedgerContract --peerAddresses localhost:7051 --tlsRootCertFiles /Users/phamquoctrung/PLN.V1.5/pharma-ledger-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles /Users/phamquoctrung/PLN.V1.5/pharma-ledger-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt --peerAddresses localhost:11051 --tlsRootCertFiles /Users/phamquoctrung/PLN.V1.5/pharma-ledger-network/organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt -c '{"function":"makeOrder","Args":["100", "Test"]}'

But when using SDK (node) to deploy, there is error when calling function in JavaScript, e.g.:

const response = await contract.submitTransaction('makeOrder', orderNumber, ownerName);

How to troubleshoot the error in fabric-sdk-node ?

Thx in advance.

 

Join fabric@lists.hyperledger.org to automatically receive all group messages.