TypeError: Cannot read property 'getChannel' of undefined at Fabric._joinChannels #fabric


Umas
 

Hi, there, 

When I run caliper benchmark, I get an error as below:
-----------------------------------------------------------------
npx caliper benchmark run --caliper-workspace . --caliper-benchconfig mydir/benchmark_config.yaml --caliper-networkconfig mydir/network_config.yaml

Benchmark for target Blockchain type fabric about to start
2020.03.04-14:05:22.820 info [caliper] [adapters/fabric] Using defined file wallet path /home/guest/GitHub/mepoc1/client/wallet
2020.03.04-14:05:22.822 info [caliper] [benchmark-validator] No observer specified, will default to `none`
2020.03.04-14:05:22.822 info [caliper] [caliper-flow] ####### Caliper Test #######
2020.03.04-14:05:22.824 info [caliper] [null-observer] Configured observer
2020.03.04-14:05:22.826 info [caliper] [adapters/fabric] Fabric SDK version: 1.4.4; TLS: server
2020.03.04-14:05:22.826 info [caliper] [adapters/fabric] skipping registrar initialisation due to presence of file system wallet
2020.03.04-14:05:22.837 info [caliper] [adapters/fabric] No admin.Org1 found in wallet - unable to perform admin options
2020.03.04-14:05:22.840 info [caliper] [adapters/fabric] Retriving credentials for admin from wallet
2020.03.04-14:05:23.015 info [caliper] [adapters/fabric] admin's materials are successfully loaded
2020.03.04-14:05:23.015 info [caliper] [adapters/fabric] Channel 'mychannel' is configured as created, skipping creation
2020.03.04-14:05:23.016 error [caliper] [caliper-flow] Error: TypeError: Cannot read property 'getChannel' of undefined
at Fabric._joinChannels (/home/guest/GitHub/caliper-benchmarks/node_modules/@hyperledger/caliper-fabric/lib/fabric.js:1468:43)
at Fabric.init (/home/guest/GitHub/caliper-benchmarks/node_modules/@hyperledger/caliper-fabric/lib/fabric.js:2320:24)
Benchmark failure
Error: Benchmark failure
at Function.handler (/home/guest/GitHub/caliper-benchmarks/node_modules/@hyperledger/caliper-cli/lib/benchmark/lib/runBenchmark.js:70:23)
Command failed
-----------------------------------------------------------------

I run 2 peers and 1 orderer, and have created 'mychannel' already, using Fabric 1.4.4 (a bit modified 'basic-network') and Caliper 0.2.0. 
'Wallet' is located in 
The 'wallet', 'clients' and 'channels' parts in network_config.yaml file says: 
-----------------------------------------------------------------
wallet: /home/guest/GitHub/my/client/wallet

clients:
    admin:
        client:
            organization: Org1

channels:
    mychannel:
        created: true
        orderers:
        - orderer.example.com
        peers:
            peer0.org1.example.com:
                eventSource: true
            peer1.org1.example.com:
                eventSource: true
        chaincodes:
        - id: mycc
          version: v1.0
          language: golang
          path: /home/guest/GitHub/my/chaincode/newcc
-----------------------------------------------------------------

I can enable query and invoke with the user 'admin'. 
It seems that error is catched in '
getOrganizationsOfChannel' function in 'fabric.js'. 
Would you please help me to find the cause? 
Thanks.