xcottos / convector-example-supplychain-master

This is a simple supply chain blockchain based, running on Hyperledger fabric, implemented with the Convector framework
Apache License 2.0
24 stars 10 forks source link

Hi , I got a a problem . after I start the program #1

Closed elohffa closed 5 years ago

elohffa commented 5 years ago

In my console , it display the below error , it was mentioend the path is not collect , can u let me know where i can update the path ?

supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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) supplychain-app: (node:4683) [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. supplychain-app: Context exists supplychain-app: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 3) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 4) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 5) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 6) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org2.hurley.lab/users/Admin@org2.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 7) supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 8) supplychain-app: Context exists supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 9) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 10) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 11) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 12) supplychain-app: Context exists supplychain-app: (node:4683) UnhandledPromiseRejectionWarning: Error: Path '/Users/luca/Projects/GitHubProjects/cloned/convector-example-supplychain-master/fabric-hurl/artifacts/crypto-config/peerOrganizations/org1.hurley.lab/users/Admin@org1.hurley.lab/msp/keystore/' neither a file or a directory supplychain-app: at FabricControllerAdapter. (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/@worldsibu/convector-common-fabric-helper/src/client.helper.ts:356:13) supplychain-app: at step (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:133:27) supplychain-app: at Object.next (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:114:57) supplychain-app: at fulfilled (/home/suntaiwai/convector-example-supplychain-master/packages/supplychain-app/node_modules/tslib/tslib.js:104:62) supplychain-app: at supplychain-app: (node:4683) 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: 13)

xcottos commented 5 years ago

hi elhoffa,

try to remove the fabric-hurl directory and rebuild the project, it will re-create it with the right paths

I have to add it to the .gitignore

thank you for pointing it out

please let me know if it works Luca

elohffa commented 5 years ago

When I shoot a command : sudo npm run cc:start -- supplychainchaincode 1 under supplychian folder

it report a error message as below :

supplychainchaincode-cc@0.1.0 clean /home/suntaiwai/supplychain/packages/supplychainchaincode-cc rimraf dist client

supplychainchaincode-cc@0.1.0 client:generate /home/suntaiwai/supplychain/packages/supplychainchaincode-cc generate-controller-interface -c SupplychainchaincodeController

lerna success run Ran npm script 'build' in 1 package in 3.8s: lerna success - supplychainchaincode-cc (node:20975) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: access denied: channel [ch1] creator org [org1MSP] at new createStatusError (/home/suntaiwai/supplychain/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15) at /home/suntaiwai/supplychain/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: getChannelConfig - Failed getting channel config. Error: Error: 2 UNKNOWN: access denied: channel [ch1] creator org [org1MSP] at new createStatusError (/home/suntaiwai/supplychain/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15) at /home/suntaiwai/supplychain/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15 error: [Channel.js]: Error: 2 UNKNOWN: access denied: channel [ch1] creator org [org1MSP] at new createStatusError (/home/suntaiwai/supplychain/node_modules/fabric-client/node_modules/grpc/src/client.js:64:15) at /home/suntaiwai/supplychain/node_modules/fabric-client/node_modules/grpc/src/client.js:583:15 (node:20975) UnhandledPromiseRejectionWarning: Error: Error: 2 UNKNOWN: access denied: channel [ch1] creator org [org1MSP] at /home/suntaiwai/supplychain/node_modules/fabric-client/lib/Channel.js:159:28 at (node:20975) 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: 4) (node:20975) [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.

supplychain@0.1.0 cc:install /home/suntaiwai/supplychain f() { ./node_modules/.bin/hurl install $1 node -P ./chaincode-$1 -p $PWD/fabric-hurl; }; f "supplychainchaincode"

[hurley] - installing smart contract located at /home/suntaiwai/supplychain/chaincode-supplychainchaincode Installing Chaincode at org1 2019-01-19 01:00:19.603 CST [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-01-19 01:00:19.603 CST [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2019-01-19 01:00:19.652 CST [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" > Installed Chaincode at org1 Installing Chaincode at org2 2019-01-19 01:00:19.704 CST [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-01-19 01:00:19.704 CST [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc 2019-01-19 01:00:19.768 CST [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" > Installed Chaincode at org2 Instantiating Chaincode at org1 It may take a few minutes depending on the chaincode dependencies 2019-01-19 01:00:29.830 CST [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2019-01-19 01:00:29.830 CST [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Instantiated Chaincode at org1

elohffa commented 5 years ago

When I was : npm run cc:invoke -- supplychainchaincode org1 user1 supplychainchaincode createSupplier '{"id":"SPL_1","name":"supplier1","rawMaterialAvailable":2000}'> supplychain@0.1.0 cc:invoke /home/suntaiwai/convector-example-supplychain-master

f() { chaincode-manager --config ./$2.$1.config.json --user $3 invoke $1 ${@:4}; }; f "supplychainchaincode" "org1" "user1" "supplychainchaincode" "createSupplier" "{\"id\":\"SPL_1\",\"name\":\"supplier1\",\"rawMaterialAvailable\":2000}"

sh: 1: Bad substitution npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! supplychain@0.1.0 cc:invoke: f() { chaincode-manager --config ./$2.$1.config.json --user $3 invoke $1 ${@:4}; }; f "supplychainchaincode" "org1" "user1" "supplychainchaincode" "createSupplier" "{\"id\":\"SPL_1\",\"name\":\"supplier1\",\"rawMaterialAvailable\":2000}" npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the supplychain@0.1.0 cc:invoke script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/suntaiwai/.npm/_logs/2019-01-18T17_16_50_597Z-debug.log

xcottos commented 5 years ago

Hi elohffa,

sorry for the late reply

the problem seems to me that npm is using by default the sh shell,

try to run this command:

npm config set script-shell /bin/bash

obviously if bash is not in /bin but in another location put that location instead

It will tell npm to use bash as default shell

please tell me if it works so I close the issue

Thank you for the finding (I'm using mac, that's why I couldn't see this problem since my npm uses /bin/bash as default shell)

Luca

xcottos commented 5 years ago

Hi elohffa,

I verified that is working.

So you have to:

1) npm config set script-shell /bin/bash 2) bash testScript_sh.bash (I renamed it since it has to be executed with bash)

I close the issue now, please let me know if you have other issues

Luca

elohffa commented 5 years ago

Hi , i find another issue to start the program , i run :sudo npm run cc:start -- supplychainchaincode 1 to start the program ..

then it will give me error message as below lerna success run Ran npm script 'build' in 1 package in 4.1s: lerna success - supplychainchaincode-cc (node:7535) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:7535) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:7535) UnhandledPromiseRejectionWarning: Error: Failed to read or parse the network profile at './fabric-hurl/network-profiles/org1.network-profile.yaml', Error: ENOENT: no such file or directory, open '/home/suntaiwai/convector-example-supplychain-master/fabric-hurl/network-profiles/org1.network-profile.yaml' at Manager. (/home/suntaiwai/convector-example-supplychain-master/node_modules/@worldsibu/convector-common-fabric-helper/dist/src/client.helper.js:122:31) at step (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:133:27) at Object.throw (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:114:57) at rejected (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:105:69) at (node:7535) 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:7535) [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.

supplychain@0.1.0 cc:install /home/suntaiwai/convector-example-supplychain-master f() { ./node_modules/.bin/hurl install $1 node -P ./chaincode-$1 -p $PWD/fabric-hurl; }; f "supplychainchaincode"

[hurley] - Network configuration does not exist. Be sure to first create a new network with hurley new

elohffa commented 5 years ago

for above issue , I fixed .

elohffa commented 5 years ago

i run the command , npm config set script-shell /bin/bash , then i shoot
sudo npm run cc:invoke -- supplychainchaincode org1 user1 supplychainchaincode createSupplier '{"id":"SPL_1","name":"supplier1","rawMaterialAvailable":2000}' , then i got this error (node:11456) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:11456) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:11456) UnhandledPromiseRejectionWarning: Error: Transaction proposal was bad at Manager. (/home/suntaiwai/convector-example-supplychain-master/node_modules/@worldsibu/convector-common-fabric-helper/dist/src/client.helper.js:348:35) at step (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:133:27) at Object.next (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:114:57) at fulfilled (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:104:62) at (node:11456) 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:11456) [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. My OS IS Ubuntu 16

elohffa commented 5 years ago

Finally, I can start this project.

Many Thanks

nitinteotia6548 commented 4 years ago

i run the command , npm config set script-shell /bin/bash , then i shoot sudo npm run cc:invoke -- supplychainchaincode org1 user1 supplychainchaincode createSupplier '{"id":"SPL_1","name":"supplier1","rawMaterialAvailable":2000}' , then i got this error (node:11456) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:11456) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead (node:11456) UnhandledPromiseRejectionWarning: Error: Transaction proposal was bad at Manager. (/home/suntaiwai/convector-example-supplychain-master/node_modules/@worldsibu/convector-common-fabric-helper/dist/src/client.helper.js:348:35) at step (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:133:27) at Object.next (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:114:57) at fulfilled (/home/suntaiwai/convector-example-supplychain-master/node_modules/tslib/tslib.js:104:62) at (node:11456) 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:11456) [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. My OS IS Ubuntu 16

I am unable to resolve this issue yet. I hope you could help me.