hyperledger / firefly-cli

FireFly Command Line Interface (CLI)
Apache License 2.0
58 stars 55 forks source link

Failed to find installed chaincode #283

Open lutfi-haslab opened 10 months ago

lutfi-haslab commented 10 months ago

Hi, i can't deploy chaincode, here my environment version:

Step to reproduced:


prifalab@H-LAPTOP-122:~cd fabric-samples2.2.9/asset-transfer-basic/chaincode-go
prifalab@H-LAPTOP-122:~/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go$ touch core.yaml
prifalab@H-LAPTOP-122:~/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go$ peer lifecycle chaincode package -p . --label asset_transfer ./asset_transfer.zip
prifalab@H-LAPTOP-122:~/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go$ ff deploy fabric dev asset_transfer.zip firefly asset_transfer 1.0 -v
installing chaincode
/usr/bin/docker run --platform linux/amd64 --rm --network=dev_default -e CORE_PEER_ADDRESS=fabric_peer:7051 -e CORE_PEER_TLS_ENABLED=true -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/firefly/organizations/peerOrganizations/org1.example.com/peers/fabric_peer.org1.example.com/tls/ca.crt -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_PEER_MSPCONFIGPATH=/etc/firefly/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp -v /home/prifalab/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go/asset_transfer.zip:/package.tar.gz -v dev_firefly_fabric:/etc/firefly hyperledger/fabric-tools:2.3 peer lifecycle chaincode install /package.tar.gz
2024-01-11 11:31:36.271 UTC [cli.lifecycle.chaincode] submitInstallProposal -> INFO 001 Installed remotely: response:<status:200 payload:"\nOasset_transfer:792716372afe1321577882e8698479732192208d526c8f54321063edd82ab4ae\022\016asset_transfer" >
2024-01-11 11:31:36.271 UTC [cli.lifecycle.chaincode] submitInstallProposal -> INFO 002 Chaincode code package identifier: asset_transfer:792716372afe1321577882e8698479732192208d526c8f54321063edd82ab4ae
querying installed chaincode
/usr/bin/docker run --platform linux/amd64 --rm --network=dev_default -e CORE_PEER_ADDRESS=fabric_peer:7051 -e CORE_PEER_TLS_ENABLED=true -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/firefly/organizations/peerOrganizations/org1.example.com/peers/fabric_peer.org1.example.com/tls/ca.crt -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_PEER_MSPCONFIGPATH=/etc/firefly/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp -v dev_firefly_fabric:/etc/firefly hyperledger/fabric-tools:2.3 peer lifecycle chaincode queryinstalled --output json
{
        "installed_chaincodes": [
                {
                        "package_id": "firefly_1.0:b8e754685421dd03e40251b9ef2dd811e49659453cd489ca7bd27585d9be06b4",
                        "label": "firefly_1.0",
                        "references": {
                                "firefly": {
                                        "chaincodes": [
                                                {
                                                        "name": "firefly",
                                                        "version": "1.0"
                                                }
                                        ]
                                }
                        }
                },
                {
                        "package_id": "asset_transfer:792716372afe1321577882e8698479732192208d526c8f54321063edd82ab4ae",
                        "label": "asset_transfer"
                }
        ]
}
Error: failed to find installed chaincode```
nguyer commented 10 months ago

The FireFly CLI uses Fabric 2.3 or newer. That may cause an issue here. Could you update your Fabric version and try again?

dnakashima commented 7 months ago

I have the same error in follwing version. I guess this errer is a bug of fabric_provider.go, so can I take this issue?