Hyperledger Fabric v2.4.1 Sample Application failing to endorse


WebZest
 

Greetings,

 

I am running the latest version oof HLF 2.4.1 and installed all the prerequisites and started the netowrk with ./network.sh up successfully.

I also installed the test basic typescript chaincode.  When I started the interaction and submitted a transaction with: npm start,  I get the followint error:

 

--------------------------

 

> asset-transfer-basic@1.0.0 start

> node dist/app.js

 

--> Submit Transaction: InitLedger, function creates the initial set of assets on the ledger

*** Transaction committed successfully

 

--> Evaluate Transaction: GetAllAssets, function returns all the current assets on the ledger

*** Result: [

  {

    AppraisedValue: 300,

    Color: 'blue',

    ID: 'asset1',

    Owner: 'Tomoko',

    Size: 5,

    docType: 'asset'

  },

  {

    AppraisedValue: 400,

    Color: 'red',

    ID: 'asset2',

    Owner: 'Brad',

    Size: 5,

    docType: 'asset'

  },

  {

    AppraisedValue: 500,

    Color: 'green',

    ID: 'asset3',

    Owner: 'Jin Soo',

    Size: 10,

    docType: 'asset'

  },

  {

    AppraisedValue: 600,

    Color: 'yellow',

    ID: 'asset4',

    Owner: 'Max',

    Size: 10,

    docType: 'asset'

  },

  {

    AppraisedValue: 700,

    Color: 'black',

    ID: 'asset5',

    Owner: 'Adriana',

    Size: 15,

    docType: 'asset'

  },

  {

   AppraisedValue: 800,

    Color: 'white',

    ID: 'asset6',

    Owner: 'Michel',

    Size: 15,

    docType: 'asset'

  }

]

 

--> Submit Transaction: CreateAsset, creates new asset with ID, Color, Size, Owner and AppraisedValue arguments

*** Transaction committed successfully

 

--> Async Submit Transaction: TransferAsset, updates existing asset owner

*** Successfully submitted transaction to transfer ownership from Tom to Saptha

*** Waiting for transaction commit

*** Transaction committed successfully

 

--> Evaluate Transaction: ReadAsset, function returns asset attributes

*** Result: {

  AppraisedValue: 1300,

  Color: 'yellow',

  ID: 'asset1640013286123',

  Owner: 'Saptha',

  Size: 5

}

 

--> Submit Transaction: UpdateAsset asset70, asset70 does not exist and should return an error

*** Successfully caught the error:

EndorseError: 10 ABORTED: failed to endorse transaction, see attached details for more info

    at /home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/client.js:45:347

    at Object.callback (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@hyperledger/fabric-gateway/dist/client.js:81:27)

    at Object.onReceiveStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client.js:180:36)

    at Object.onReceiveStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)

    at Object.onReceiveStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)

    at /home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78

    at processTicksAndRejections (node:internal/process/task_queues:78:11) {

  code: 10,

  details: [

    {

      address: 'peer0.org1.example.com:7051',

      message: 'chaincode response 500, The asset asset70 does not exist',

      mspId: 'Org1MSP'

    }

  ],

  cause: Error: 10 ABORTED: failed to endorse transaction, see attached details for more info

      at Object.callErrorFromStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/call.js:31:26)

      at Object.onReceiveStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client.js:180:52)

      at Object.onReceiveStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)

      at Object.onReceiveStatus (/home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)

      at /home/johnny/fabric-samples/asset-transfer-basic/application-gateway-typescript/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78

      at processTicksAndRejections (node:internal/process/task_queues:78:11) {

    code: 10,

    details: 'failed to endorse transaction, see attached details for more info',

    metadata: Metadata { internalRepr: [Map], options: {} }

  },

  transactionId: '7cc05ac0b4c7be551fd72e7a4d2df976326d7ca095559dff057f04e43f56f1bf'

}

 

 

_._,_._,_

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