HyperledgerHandsOn / trade-finance-logistics

Trade Finance and Logistics based on Letter of Credit and Proof of Shipment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chaincode Invocation Failure

Sumanarayan opened this issue · comments

Sir,
We are working on this project. When we are trying to execute the createTradeApp.js in the middleware, we are getting the chaincode invocation failure error.
Command:::::node createTradeApp.js

Error:::::::::
2019-03-14T04:48:26.138Z - info: [ClientUtils]:



  • Using temp dir: ../network/client-certs


(node:10257) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
Successfully extracted the config update from the configtx envelope
Successfully enrolled user 'admin' for exporterorg
Successfully signed config as admin of exporterorg
Successfully enrolled user 'admin' for importerorg
Successfully signed config as admin of importerorg
Successfully enrolled user 'admin' for carrierorg
Successfully signed config as admin of carrierorg
Successfully enrolled user 'admin' for regulatororg
Successfully signed config as admin of regulatororg
Successfully enrolled user 'admin' for every org and obtained channel config signatures
Successfully enrolled user 'admin' for orderer
2019-03-14T04:48:26.587Z - error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND
Channel tradechannel does not exist yet (IGNORE ANY ORDERER ERROR MESSAGES YOU SEE ABOVE!!)
Successfully signed config update as orderer admin
Successfully created the channel.
Successfully waited to make sure new channel was created.


CHANNEL CREATION COMPLETE

Joining channel tradechannel
Successfully enrolled 'admin' user for org exporterorg
Successfully got the genesis block
TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/join-channel.js:141:22)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
Joining channel tradechannel
Successfully enrolled 'admin' user for org importerorg
Successfully got the genesis block
TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/join-channel.js:141:22)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
Joining channel tradechannel
Successfully enrolled 'admin' user for org carrierorg
Successfully got the genesis block
TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/join-channel.js:141:22)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
Joining channel tradechannel
Successfully enrolled 'admin' user for org regulatororg
Successfully got the genesis block
TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/join-channel.js:141:22)
at
at process._tickCallback (internal/process/next_tick.js:189:7)


CHANNEL JOIN COMPLETE

Successfully enrolled user 'admin'
2019-03-14T04:48:33.018Z - info: [install-chaincode]: install proposal was good from peer grpcs://localhost:7051 in org exporterorg
Successfully sent install Proposal and received ProposalResponses to peers of org exporterorg
Successfully installed chaincode in peers of organization "exporterorg"
Successfully enrolled user 'admin'
2019-03-14T04:48:33.933Z - info: [install-chaincode]: install proposal was good from peer grpcs://localhost:8051 in org importerorg
Successfully sent install Proposal and received ProposalResponses to peers of org importerorg
Successfully installed chaincode in peers of organization "importerorg"
Successfully enrolled user 'admin'
2019-03-14T04:48:34.845Z - info: [install-chaincode]: install proposal was good from peer grpcs://localhost:9051 in org carrierorg
Successfully sent install Proposal and received ProposalResponses to peers of org carrierorg
Successfully installed chaincode in peers of organization "carrierorg"
Successfully enrolled user 'admin'
2019-03-14T04:48:35.725Z - info: [install-chaincode]: install proposal was good from peer grpcs://localhost:10051 in org regulatororg
Successfully sent install Proposal and received ProposalResponses to peers of org regulatororg
Successfully installed chaincode in peers of organization "regulatororg"
Installations succeeded


CHAINCODE INSTALL COMPLETE

Successfully enrolled user 'admin'
Failed to initialize the channel. TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:124:19)
at
Error: Failed to initialize the channel
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:169:9)
at
Error: Error: Failed to initialize the channel
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:169:9)
at
at Client.newDefaultKeyValueStore.then.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:243:9)
at


CHAINCODE INSTANTIATE COMPLETE

Error: Error: Error: Failed to initialize the channel
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:169:9)
at
at Client.newDefaultKeyValueStore.then.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:243:9)
at
at Client.newDefaultKeyValueStore.then.then.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/instantiate-chaincode.js:261:18)
at
Successfully loaded user Importer from persistence
Successfully enrolled user Importer
Failed to get submitter Importer. Error: TypeError: client.newEventHub is not a function
Error: Failed to get submitter Importer. Error: TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/invoke-chaincode.js:145:9)
at
Error: Error: Failed to get submitter Importer. Error: TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/invoke-chaincode.js:145:9)
at
at Client.newDefaultKeyValueStore.then.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/invoke-chaincode.js:241:9)
at


CHAINCODE INVOCATION FAILED: Error: Error: Error: Failed to get submitter Importer. Error: TypeError: client.newEventHub is not a function
at Client.newDefaultKeyValueStore.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/invoke-chaincode.js:145:9)
at
at Client.newDefaultKeyValueStore.then.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/invoke-chaincode.js:241:9)
at
at Client.newDefaultKeyValueStore.then.then.then.then.then (/home/hp/go/src/github.com/hyperledger/fabric/middleware/invoke-chaincode.js:267:9)
at

#####################################################
#####################################################
And we are running the Fabric version 1.1

We request you to help in this issue.

Thanks.

See other issues similar to this topic. See the README. The master version of this code is pegged to Fabric v1.1. Using that with a newer version of Fabric will result in errors like the above. If you are using Fabric v1.4 (the latest), try checking out the release-1.4 branch of this code.