question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: [client-utils.js]: sendPeersProposal - Promise is rejected

See original GitHub issue

first time after a start, site working fine but after few minutes i get errors and site stop a work

sudo docker logs web npm info it worked if it ends with ok npm info using npm@3.10.10 npm info using node@v6.11.3 npm info lifecycle blockchain-for-insurance@2.1.0~preserve: blockchain-for-insurance@2.1.0 npm info lifecycle blockchain-for-insurance@2.1.0~serve: blockchain-for-insurance@2.1.0

blockchain-for-insurance@2.1.0 serve /app cross-env NODE_ENV=production node ./bin/server

/app/app/static/js Server running on port: 3000 Default channel not found, attempting creation… Successfully created a new default channel. Joining peers to the default channel. Chaincode is not installed, attempting installation… Base container image present. info: [packager/Golang.js]: packaging GOLANG from bcins info: [packager/Golang.js]: packaging GOLANG from bcins info: [packager/Golang.js]: packaging GOLANG from bcins info: [packager/Golang.js]: packaging GOLANG from bcins Successfully installed chaincode on the default channel. error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {“message”:“network buildblockchaininsuranceapp_default not found”}

at new createStatusError (/app/node_modules/grpc/src/client.js:64:15)
at /app/node_modules/grpc/src/client.js:583:15

Fatal error instantiating chaincode on some(all) peers! Error: Proposal rejected by some (all) of the peers: Error: 2 UNKNOWN: error starting container: API error (404): {“message”:“network buildblockchaininsuranceapp_default not found”}

at /app/www/blockchain/utils.js:248:15
at next (native)
at step (/app/bin/blockchain/utils.js:102:191)
at /app/bin/blockchain/utils.js:102:361

npm info lifecycle blockchain-for-insurance@2.1.0~serve: Failed to exec serve script npm ERR! Linux 4.8.0-49-generic npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “serve” npm ERR! node v6.11.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! blockchain-for-insurance@2.1.0 serve: cross-env NODE_ENV=production node ./bin/server npm ERR! Exit status 255 npm ERR! npm ERR! Failed at the blockchain-for-insurance@2.1.0 serve script ‘cross-env NODE_ENV=production node ./bin/server’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the blockchain-for-insurance package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cross-env NODE_ENV=production node ./bin/server npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs blockchain-for-insurance npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls blockchain-for-insurance npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /app/npm-debug.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
ganzrcommented, Jul 10, 2018

i do as the following steps and it works for me:

  • input “docker network ps” to figure out the name of the network( it is “buildblockchaininsuranceapp_default” for me)

  • go to ./peer-base.yaml and change CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE to the corresponding network name.

  • input"./clean.sh" to clean the docker containers and rebuild the app again

hope it works for u all too. and thank you for your help @lll2657

2reactions
lll2657commented, Jul 10, 2018

Before solving these issues, please use ./clean.sh first to clean your docker containers.

Join Peer Issue

Symptoms: Stuck inJoining peers to the default channel. Timeout: error: [Peer.js]: sendProposal - timed out after:45000 (node:21) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined

The reason for the issue is that the peers fail to join the channel because they are not ready to be used by the callback function in joinChannel() in ./web/www/blockchain/utils.js. In order to fix this, we need to separate the functions in the line docker-compose up -d, so that the containers are built and waited long enough for all the peers to be ready.

So all you need to do is to change build_ubuntu to the code below (similarly for build_mac):

#!/bin/bash
cp ./binary_ubuntu/* .
export FABRIC_CFG_PATH=$PWD
sh ./ibm_fabric.sh
sh ./docker-images.sh
sleep 5
docker-compose up --no-start
sleep 60
docker-compose up -d

Network not found Issue

Symptoms: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}

The reason for the issue is that the network name cannot be found. To solve this, run docker network ls to figure out what the actual network name is, such as “buildblockchaininsuranceapp_default”. Go to ./peer-base.yaml and change CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE to the corresponding network name. Clean the docker containers with ./clean.sh and then rebuild the app again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error: [client-utils.js]: sendPeersProposal - Promise is ... - GitHub
When I tested the merbles example with caliper, I tried to replace its network configuration with two organizations, each with three peers.
Read more >
Promise is rejected: Error: Failed to deserialize creator identity ...
Just ran into the same problem as yourself. My solution: sudo apt-get --purge remove docker-ce curl -fsSL ...
Read more >
[client-utils.js]: sendPeersProposal - Promise is rejected: Error ...
error : [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err MSP Org1MSP is unknown
Read more >
Error: Failed to connect before the deadline at checkState (/opt ...
Re: error: [Remote.js]: Error: Failed to connect before the deadline error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: ...
Read more >
OBPCS Submit Transaction Fail with Error "Promise is rejected
info: [packager/Golang.js]: packaging GOLANG from github.com error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 14 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found