Error: failed to normalize chaincode path: 'go list' failed with: Use -buildvcs=false to disable VCS stamping.: exit status 1 - hyperledger-fabric

I am follownig this tutorial - https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/get-started-chaincode.html - when i am using this command - docker exec cli peer lifecycle chaincode package ./abstore.tar.gz --path fabric-samples/chaincode/abstore/go/ --label abstore_1, this give me following error -
Error: failed to normalize chaincode path: 'go list' failed with: error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping.: exit status 1.
Expected result - it should create abstore.tar.gz file of chaincode.
I am using go version go1.18.4

could you try to add --lang go

this issue occurs when git is not configured properly.

Related

error [connectors/v2/FabricGateway] Failed to perform query transaction [ReadAsset] using arguments

Can someone please help me with this problem.
error [connectors/v2/FabricGateway] Failed to perform query transaction [ReadAsset] using arguments [2_4], with error: Error: error in simulation: failed to execute transaction 9ca49b08603ab086104fec8777546bbbc24d826a3900136b4a0e66aadf4bb6e4: could not launch chaincode basic_1:9820659c595e662a849033ca23b4424e87a126e8f40b5f81ace59820b81fe8e7: chaincode registration failed: error starting container: error starting container: API error (404): network _test not found
The report has been generated but all the transactions has failed.
It looks like the chaincode's Docker container failed to start for some reason. You will need to use the docker logs command to inspect the logs for the failure reason. Use the docker ps -a command to see what containers are available, including stopped / failed containers. Both the chaincode container (if it exists) and peer container logs may hold useful information.

Error While Installing Fabric Chaincode: _lifecycle.syscc: no such file or directory

While trying to install chaincode using Fabric v2.1, I am encountering an error. Does anyone face similar issues? My peer is running fine and able to join the channel as well. I am able to list the channel details as well.
Note: I am doing Native installation without using docker images for running orderer and peer.
Highly appreciate for your support and looking forward to hear from you.
Error:
chaincode install failed with status: 500 - error in simulation: failed to execute transaction 44688cc50afeda03e3f5e7735ae650030952477b6bdfce83064582f42bec6c84: could not launch chaincode _lifecycle.syscc: error building chaincode: error building image: failed to get chaincode package for external build: could not get legacy chaincode package '_lifecycle.syscc': open /home/vagrant/ledger/ORG2/peer1-org2/ledger/chaincodes/_lifecycle.syscc: no such file or directory
I got this error after upgrading from 1.4. In my case the problem was in the old config file for the peer.
Make sure you have next lines in your core.yaml:
chaincode:
...
# enabled system chaincodes
system:
_lifecycle: enable

Error when deploying chaincode in test network

I've just started working on fabric an am having some trouble using the command:
./network.sh deployCC
after setting up my channels. This is the terminal readout:
'''
deploying chaincode on channel 'mychannel'
Vendoring Go dependencies ...
~/desktop/HF/fabric-samples/chaincode/fabcar/go ~/desktop/HF/fabric-samples/test-network
scripts/deployCC.sh: line 24: go: command not found
~/desktop/HF/fabric-samples/test-network
Finished vendoring Go dependencies
Using organization 1
++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/go/ --lang golang --label fabcar_1
++ res=1
++ set +x
Error: failed to normalize chaincode path: failed to determine module root: exec: "go": executable file not found in $PATH
!!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!
ERROR !!! Deploying chaincode failed
'''
It seems that I must have messed something up in the prereqs. Any suggestions?
You are missing 'go' prerequisite. See in the test network documentation, the prerequisites section. You will need to install golang.
The Golang chaincodes can only be packaged through the CLI container. All the other language chain codes can be packaged through peer containers as well.

Convector Framework CLI returns error when installing chaincode

I am very new to the Hyperledger Fabric and Convector Framework and I have followed this tutorial:
https://worldsibu.github.io/convector/modules/getting_started.html
When I try to use the CLI tool and run the command (test is my chaincode name):
npm run cc:start -- test 1
It gives the following errors:
Installing Chaincode test version 1.0 at org1
Error: Error endorsing chaincode: rpc error: code = Unknown desc = access
denied: channel [] creator org [org1MSP]
...
Installing Chaincode test version 1.0 at org2
Error: error getting endorser client for install: endorser client failed to
connect to localhost:7151: failed to create new connection: context deadline
exceeded
I have not changed the configs and MSPs.
What is going wrong and how should I start to resolve the problem? Any guidance is appreciated!
#shole that documentation is now deprecated, you can use http://docs.worldsibu.com/convector for the latest versions.
About your error that usually happens when the environment gets corrupted and keeps cryptographic materials from a previous installation, try re-running npm run env:restart and try again.

Hyperledger Composer: install error (Error: Error trying to start business network. Error: No valid responses from any peers.)

When I try to install business network on Fabric, I get the error:
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: EOF
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: EOF
Logs of peer1 of org1:
Most likely, this is because of wrong setting up a Fabric. Can anybody tell me what I did wrong?
The problem is solved. I just had to configure TLS in peers like so:
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
And set valid key in CA-contaner configuration:
- FABRIC_CA_SERVER_TLS_KEYFILE=[Here path to key]
The same path must be specified after --ca.keyfile in command: field.
I was also getting similar error-
Installing business network. This may take a minute...
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed
Command failed
The solution work for me is, I have to start the initial setup script commands as part of development environment installation.
$ ./startFabric.sh
$ ./createPeerAdminCard.sh
And then run the command to install the business network-
$ composer network install --card PeerAdmin#hlfv1 --archiveFile tutorial-network#0.0.1.bna
I had the same error, but my fault was wrong env value for
- CORE_PEER_LOCALMSPID=
in docker-compose.yaml for every peer.

Resources