Undefined Error when deploying Fabric 1.1.0 on Kubernetes with Fabric Nodejs SDK 1.1.0

3/22/2018

We have been developing blockchain-app using Fabric-Nodejs SDK (1.1.0) and trying to make it work with Fabric (1.1.0) on kubernetes. Have referred and following links - https://hackernoon.com/how-to-deploy-hyperledger-fabric-on-kubernetes-1-a2ceb3ada078, https://github.com/IBM/blockchain-network-on-kubernetes.

So far we could deploy two org solution and each having two peers on kubernetes. Now, using Fabric CLI we could run create channel, join channel, install and instantiate chaincodes and other chaincodes functionalities work as expected perfectly fine.

But when we try all similar functionalities with Fabric-Nodejs SDK, we could create the channel successfully and then during join-channel we are stuck with error. Error is not giving any clue and saying "err" object itself undefined into joinchannel.js file -

"(node:1832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'stack' of undefined (node:1832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."

We have checked logs of peers, orderer and CAs and none of them giving ERROR and all gives DEBUG details.

Using Nodejs code to create/join/install/invoke chaincode from Fabric sample - https://github.com/hyperledger/fabric-samples/tree/release-1.1/balance-transfer/app

-- sw_engineer
blockchain
hyperledger
hyperledger-fabric
kubernetes

1 Answer

3/23/2018

Any particular reason for following slightly older examples even though you are using release 1.1 .

You have setup of Kubernetes in release 1.1 @ https://github.com/hyperledger/fabric/blob/release-1.1/examples/e2e_cli/end-to-end.rst

Hyperledger fabric seems to be evolving towards use of Cello for complex networks - http://hyperledger-cello.readthedocs.io/

-- appbootup
Source: StackOverflow