Error while running
See original GitHub issueHello,
I am getting the following error when running the application:
> 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.
(node:21) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
at /app/www/routers/shop.router.js:49:19
at Generator.next (<anonymous>)
at step (/app/bin/routers/shop.router.js:20:191)
at /app/bin/routers/shop.router.js:20:361
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:21) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21) [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.
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
(node:21) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
at /app/www/routers/shop.router.js:49:19
at Generator.next (<anonymous>)
at step (/app/bin/routers/shop.router.js:20:191)
at /app/bin/routers/shop.router.js:20:361
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:21) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Successfully installed chaincode on the default channel.
I get no issues when running ./build_mac.sh.
The application just hangs after I ‘try to buy insurance for a bike’ on this step: https://github.com/IBM/build-blockchain-insurance-app/blob/master/images/Picture3.png
Docker version 18.03.1-ce, build 9ee9f40 docker-compose version 1.21.2, build a133471 npm 5.6.0 node v8.11.3 Python 2.7.13
I have tried multiple checkouts and reinstalling dependencies. I also get the same issue on Ubuntu 18.04.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Error while running - Support - Duplicati forum
This time it did run only correctly for two versions and today I got again this error message. I have no idea what...
Read more >Error-while running locally - Mendix Forum
Hi, I get an error while I start my app to run locally. The console message is : An exception occured while running...
Read more >Build error while running - Stack Overflow
It happens because sometime Test.exe keeps running even after you finish executing test. One solution is to kill Test.exe once your run is...
Read more >Error while running job -' status = 99 (Not running)' - IBM Support
Error while running job -' status = 99 (Not running)' ... We are facing an issue when running a sequence comprising multiple instances...
Read more >Getting an error while running export jobs - My Oracle Support
1. Login to OSC · 2. Navigate to FSM · 3. Search for Scheduled Export Process · 4. Create export process and select...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Before solving these issues, please use ./clean.sh first to clean your docker containers.
Join Peer Issue
Symptoms: Stuck in
Joining 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 linedocker-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):
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 changeCORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE
to the corresponding network name. Clean the docker containers with ./clean.sh and then rebuild the app again.@SirCipher how did you resolve this?