IBM-Blockchain-Archive / marbles

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Apache License 2.0
1.03k stars 979 forks source link

[client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error #209

Closed sensahin closed 6 years ago

sensahin commented 6 years ago

I dont know how many times i tried this but cant get over from this error.

I am always encountering below error when i run node install_chaincode.js

Yes, i am using latest version of marbles.

[client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
    at new createStatusError (/home/marbles/node_modules/grpc/src/client.js:64:15)
    at /home/marbles/node_modules/grpc/src/client.js:583:15

image

dshuffma-ibm commented 6 years ago

I'm guessing you have seen this thread already? https://github.com/IBM-Blockchain/marbles/issues/198

check what cert you are sending by looking in you connection profile file. I'm assuming you are using a local hyperledger network thus your connection profile would be this file.

the field x-adminCert.path needs to point to a real admin cert. in the latest code we are using the peer's cert from the basic-network example in fabric-samples. make sure the path to this cert is correct.

you can also dig into the marbles code and print out the contents of the PEM you are using. https://github.com/IBM-Blockchain/marbles/blob/master/utils/connection_profile_lib/parts/org.js#L87

dshuffma-ibm commented 6 years ago

closing, inactivity