Questions tagged [hyperledger-fabric-sdk-js]

Use this tag for questions based on how to interact with ledger using NodeJS SDK, please don't use this for questions based on Fabric Infrastructure & chaincode related questions.

Hyperledger Fabric is the operating system of an enterprise-strength permissioned blockchain network. For a high-level overview of the fabric, visit http://hyperledger-fabric.readthedocs.io/en/latest/.

Applications can be developed to interact with the blockchain network on behalf of the users. APIs are available to:

  • create channels
  • ask peer nodes to join the channel
  • install chaincodes in peers
  • instantiate chaincodes in a channel
  • invoke transactions by calling the chaincode
  • query the ledger for transactions or blocks

The Hyperledger Fabric SDK for Node.js is designed in an Object-Oriented programming style. Its modular construction enables application developers to plug in alternative implementations of key functions such as crypto suites, the state persistence store, and logging utility. https://fabric-sdk-node.github.io/release-1.4/index.html

127 questions
8
votes
2 answers

Hyperledger fabric Error: 14 UNAVAILABLE: TCP Write failed

When chaincode container remains idle for some time then it stops with error: ERROR [lib/handler.js] Chat stream with peer - on error: "Error: 14 UNAVAILABLE: EOF\n at createStatusError (/usr/local/src/node_modules/grpc/src/client.js:64:15)\n …
5
votes
1 answer

Failed to get endorsement plan when trying to initialize Channel object to use service discovery

I'm trying to use the service discovery feature in Fabric 1.4. My network is default, 2 organizations and 2 peers per organization. I try to invoke a chaincode via service discovery feature rather than setting specific target peers. (Before using…
4
votes
3 answers

Instantiation of Chaincode using Fabric Node SDK gives API error (404): manifest for hyperledger/fabric-ccenv:latest not found

I am trying to instantiate a Golang chaincode on my Hyperledger Fabric network (setup on cloud) using Fabric Node SDK. However, I am facing the following error while performing the same: Error: error starting container: error starting container:…
4
votes
0 answers

Fabric SDK resource usage spike issue

We have containerized an express app using fabric node SDK to interact with the blockchain network. We have deployed this alongside the fabric network on a single VM. While testing with a certain load, we are observing that express app (fabric SDK)…
4
votes
1 answer

Failed to invoke chaincode name:"lscc" , error: container exited with 1: chaincode registration failed (Fabric 1.4.1)

I am trying to create a single org, single ca, single peer network, bootstrapped by the nodejs-sdk. I have used this sample for reference. When I try to instantiate() the chaincode I get this error in the peer accessed by docker logs…
4
votes
1 answer

Error initializing the network channel from node sdk in hyperledger fabric

Background: I have modified the first-network files (to a network with 2 Orgs and 1 peer in each of them) and installed my own chaincode on it. Additionally I have made a connection.yaml file to interact with the network. Problem: But when I try…
3
votes
0 answers

Hyperledger Fabric fabcar client can't connect to the peer node

Two months ago, I've written an application using Hyperledger Fabric. Now, I try to run it again, but I get error and I can't resolve it. So I go the the Hyperledger Fabric doc again(https://hyperledger-fabric.readthedocs.io/en/latest/install.html),…
3
votes
3 answers

Hyperledger Fabric: check if the transaction has been committed to the ledger

I have three client application that uses respectively the Java, Node.js and Go SDKs to interact with my blockchain Fabric. Using them, I can query and update the ledger successfully. Now I want to measure the latency during update of the ledger.…
3
votes
1 answer

Why genesis block is must for a peer to join the channel in Hyperledger fabric?

For peers to join the channel, the information of genesis block is must. Why peers required genesis block? I knew that channel configuration stored in genesis block but latest channel configuration also available in recent blocks then why only…
3
votes
1 answer

hyperledger fabric calling enrollment endpoint failed with error

I was trying to deploy hyperledger fabric on multiple hosts using this code and used the balance transfer chaincode using node-SDK. While I tried to enroll the user, I got the following error: [2019-01-10 18:12:20.635] [ERROR] Helper -…
3
votes
1 answer

Hyperledger Endorsement Failure when Invoking chaincode - failed: signature set did not satisfy policy

I am using balance transfer application with custom chaincode, when I use endorsement policy '1-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] then every thing works fine however if I use '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] invoke…
Sanket
  • 49
  • 2
2
votes
2 answers

Why does connection profile in Hyperledger Fabric has gRPC URL?

In the client applications (using Node/Go) we provide connection profile to identify the endpoints of endorsers. There we specify endpoint of peer in terms of grpc://localhost:port but actually gRPC runs on HTTP2 right? Then does the Fabric SDK…
2
votes
0 answers

Chaincode container was not started when commit Chaincode by using fabric-sdk-node in fabric 2.0

I am using fabric-node-sdk to handle fabric network. The version is fabric-client:2.0.0-snapshot.326 The Chaincode images were generated after install. When I commit the chaincode, it returns success but the chaincode container was not started.
Ethan Hu
  • 33
  • 3
2
votes
1 answer

fabric-sdk-node fails to retrieve the context of an existing user

I've got some problems while calling the function getUserContext(name, checkPersistence), so far I know it fails only when I try to get the context of an existing user, but it does work with non existing users. The code I use to create the…
2
votes
0 answers

Timeout expiry while executing a heavy transaction in chaicode of hyperledger fabric

I have cloned the fabric samples repository and am running the byfn script to build the first network. I am using the node js SDK for application development. I have written a chain code function which does a time-consuming computation and the…
1
2 3
8 9