title: Integrating hyperledger explorer in hyperledger fabric 2.2.0, facing issue while enrolling client failed to create wallet
body: <p>Using BAF, I have setup fabric 2.2.0 with 6 orgs and 1 orderer in a kubernetes cluster. Each org has one peer. Now I am trying to integrate Explorer v1.1.2 with nodejs v12.16.0 apline3.11, postgresql v10 by creating separate pod for explorer and postgresql. I am facing the following issue while starting the explorer app (main.js)</p>
  <pre><code>[2020-12-10T01:44:56.894] [DEBUG] main - false ssl-certs /opt/explorer/ssl-certs
  [2020-12-10T01:44:56.995] [INFO] PgService - SSL to Postgresql disabled
  [2020-12-10T01:44:56.995] [INFO] PgService - connecting to Postgresql postgres://hppoc:******@explorerdb:5432/fabricexplorer
  [2020-12-10T01:44:57.621] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******
  [2020-12-10T01:44:57.622] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******, {
    Bankema: { name: 'Bankema', profile: './connection-profile/Bankema.json' }
  }
  [2020-12-10T01:44:57.622] [DEBUG] Platform - Setting admin organization enrolment files
  [2020-12-10T01:44:57.622] [INFO] Platform -  client_configs.name  Bankema  client_configs.profile  ./connection-profile/Bankema.json
  [2020-12-10T01:44:57.622] [DEBUG] Platform - Creating client [Bankema] &gt;&gt;  { name: 'Bankema', profile: './connection-profile/Bankema.json' }
  [2020-12-10T01:44:57.623] [DEBUG] User - User : admin
  [2020-12-10T01:44:57.646] [INFO] Platform - Already registered : admin
  [2020-12-10T01:44:57.647] [DEBUG] FabricUtils - ************ Initializing fabric client for [Bankema]************
  [2020-12-10T01:44:57.647] [DEBUG] FabricClient - Client configuration [Bankema]  ...  this.client_config  { name: 'Bankema', profile: './connection-profile/Bankema.json' }
  [2020-12-10T01:44:57.648] [INFO] FabricConfig - config.client.tlsEnable  true
  [2020-12-10T01:44:57.648] [DEBUG] FabricGateway - LOADING CONFIGURATION  [OBJECT OBJECT]
  [2020-12-10T01:44:57.648] [INFO] FabricConfig - FabricConfig, this.config.channels  bankemachannel
  [2020-12-10T01:44:57.756] [INFO] FabricGateway - enrollUserIdentity: userName : admin
  [2020-12-10T01:44:57.923] **[ERROR] FabricGateway - TypeError: org.peers is not iterable
  [2020-12-10T01:44:57.924] [ERROR] FabricClient - ExplorerError: [
    'Failed to create wallet, please check the configuration, and valid file paths'
  ]
      at FabricGateway.initialize (/opt/explorer/app/platform/fabric/gateway/FabricGateway.js:135:10)
  [2020-12-10T01:44:57.925] [ERROR]** main - &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; Explorer Error &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  [2020-12-10T01:44:57.925] [ERROR] main - Error :  [ 'Invalid platform configuration, Please check the log' ]
  [2020-12-10T01:44:59.926] [INFO] main - Received kill signal, shutting down gracefully
  [2020-12-10T01:44:59.927] [INFO] main - Closed out connections
  </code></pre>
  <p>Can anyone suggest me how to resolve this? This is the connection profile which I am using</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>`{
      "name": "Bankema",
      "version": "1.0.0",
      "client": {
          "tlsEnable": true,
          "caCredential": {
              "id": "bankema-admin",
              "password": "bankema-adminpw"
          },
          "adminCredential": {
              "id": "exploreradmin",
              "password": "exploreradminpw"
          },
          "enableAuthentication": true,
          "organization": "bankema",
          "channel": ["bankemachannel"]
      },
      "channels": {
          "bankemachannel": {
              "peers": {
                  "peer0.bankema-net": {
                      "ledgerQuery": true
                  },
                  "peer0.vendor-net": {
                      "ledgerQuery": true
                  },
                  "peer0.factor-net": {
                      "ledgerQuery": true
                  },
                  "peer0.corg-net": {
                      "ledgerQuery": true
                  },
                  "peer0.insurer-net": {
                      "ledgerQuery": true
                  },
                  "peer0.investor3-net": {
                      "ledgerQuery": true
                  }
              },
              "orderers": {
                  "orderer1.ordorg-net": {}
              },
              "connection": {
                  "timeout": {
                      "peer": {
                          "endorser": "6000",
                          "eventHub": "6000",
                          "eventReg": "6000"
                      }
                  }
              }
          }
      },
      "organizations": {
          "bankema": {
              "mspid": "bankemaMSP",
              "peers": {
                  "peer0.bankema-net": {}
              },
              "certificateAuthorities": {
                  "ca.bankema-net": {}
              },
              "fullpath": true,
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/bankema-net/msp/keystore/server.key"
              },
              "signedCert": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/bankema-net/msp/signcerts/server.crt"
              }
          },
          "bankemaMSP": {
              "mspid": "bankemaMSP",
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/msp/keystore/server.key"
              }
          },
          "vendor": {
              "mspid": "vendorMSP",
              "peers": {
                  "peer0.vendor-net": {}
              },
              "certificateAuthorities": {
                  "ca.vendor-net": {}
              },
              "fullpath": true,
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/vendor-net/msp/keystore/server.key"
              },
              "signedCert": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/vendor-net/msp/signcerts/server.crt"
              }
          },
          "vendorMSP": {
              "mspid": "vendorMSP",
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/msp/keystore/server.key"
              }
          },
          "factor": {
              "mspid": "factorMSP",
              "peers": {
                  "peer0.factor-net": {}
              },
              "certificateAuthorities": {
                  "ca.factor-net": {}
              },
              "fullpath": true,
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/factor-net/msp/keystore/server.key"
              },
              "signedCert": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/factor-net/msp/signcerts/server.crt"
              }
          },
          "factorMSP": {
              "mspid": "factorMSP",
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/msp/keystore/server.key"
              }
          },
          "corg": {
              "mspid": "corgMSP",
              "peers": {
                  "peer0.corg-net": {}
              },
              "certificateAuthorities": {
                  "ca.corg-net": {}
              },
              "fullpath": true,
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/corg-net/msp/keystore/server.key"
              },
              "signedCert": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/corg-net/msp/signcerts/server.crt"
              }
          },
          "corgMSP": {
              "mspid": "corgMSP",
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/msp/keystore/server.key"
              }
          },
          "insurer": {
              "mspid": "insurerMSP",
              "peers": {
                  "peer0.insurer-net": {}
              },
              "certificateAuthorities": {
                  "ca.insurer-net": {}
              },
              "fullpath": true,
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/insurer-net/msp/keystore/server.key"
              },
              "signedCert": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/insurer-net/msp/signcerts/server.crt"
              }
          },
          "insurerMSP": {
              "mspid": "insurerMSP",
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/msp/keystore/server.key"
              }
          },
          "investor3": {
              "mspid": "investor3MSP",
              "peers": {
                  "peer0.investor3-net": {}
              },
              "certificateAuthorities": {
                  "ca.investor3-net": {}
              },
              "fullpath": true,
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/investor3-net/msp/keystore/server.key"
              },
              "signedCert": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/investor3-net/msp/signcerts/server.crt"
              }
          },
          "investor3MSP": {
              "mspid": "investor3MSP",
              "adminPrivateKey": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/msp/keystore/server.key"
              }
          }
      },
      "peers": {
          "peer0.bankema-net": {
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/bankema-net/msp/tlscacerts/tlsca.crt"
              },
              "url": "grpcs://peer0.bankema-net:7051",
              "grpcOptions": {
                  "ssl-target-name-override": "peer0.bankema-net"
              }
          },
          "peer0.vendor-net": {
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/vendor-net/msp/tlscacerts/tlsca.crt"
              },
              "url": "grpcs://peer0.vendor-net:7051",
              "grpcOptions": {
                  "ssl-target-name-override": "peer0.vendor-net"
              }
          },
          "peer0.factor-net": {
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/factor-net/msp/tlscacerts/tlsca.crt"
              },
              "url": "grpcs://peer0.factor-net:7051",
              "grpcOptions": {
                  "ssl-target-name-override": "peer0.factor-net"
              }
          },
          "peer0.corg-net": {
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/corg-net/msp/tlscacerts/tlsca.crt"
              },
              "url": "grpcs://peer0.corg-net:7051",
              "grpcOptions": {
                  "ssl-target-name-override": "peer0.corg-net"
              }
          },
          "peer0.insurer-net": {
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/insurer-net/msp/tlscacerts/tlsca.crt"
              },
              "url": "grpcs://peer0.insurer-net:7051",
              "grpcOptions": {
                  "ssl-target-name-override": "peer0.insurer-net"
              }
          },
          "peer0.investor3-net": {
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/investor3-net/msp/tlscacerts/tlsca.crt"
              },
              "url": "grpcs://peer0.investor3-net:7051",
              "grpcOptions": {
                  "ssl-target-name-override": "peer0.investor3-net"
              }
          }
      },
      "orderers": {
          "orderer1.ordorg-net": {
              "url": "grpcs://orderer1.ordorg-net:7050",
              "grpcOptions": {
                  "ssl-target-name-override": "orderer1.ordorg-net"
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/ordererOrganizations/ordorg-net/orderers/orderer1.ordorg-net/tls/ca.crt"
              }
          }
      },
      "certificateAuthorities": {
          "ca.bankema-net": {
              "url": "https://ca.bankema-net:7054",
              "httpOptions": {
                  "verify": false
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/bankema-net/ca/ca.bankema-net-cert.pem"
              },
              "registrar": {
                  "enrollId": "bankema-admin",
                  "enrollSecret": "bankema-adminpw"
              },
  
              "caName": "ca.bankema-net"
          },
          "ca.vendor-net": {
              "url": "https://ca.vendor-net:7054",
              "httpOptions": {
                  "verify": false
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/vendor-net/ca/ca.vendor-net-cert.pem"
              },
  
              "caName": "ca.vendor-net"
          },
          "ca.factor-net": {
              "url": "https://ca.factor-net:7054",
              "httpOptions": {
                  "verify": false
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/factor-net/ca/ca.factor-net-cert.pem"
              },
  
              "caName": "ca.factor-net"
          },
          "ca.corg-net": {
              "url": "https://ca.corg-net:7054",
              "httpOptions": {
                  "verify": false
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/corg-net/ca/ca.corg-net-cert.pem"
              },
  
              "caName": "ca.corg-net"
          },
          "ca.insurer-net": {
              "url": "https://ca.insurer-net:7054",
              "httpOptions": {
                  "verify": false
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/insurer-net/ca/ca.insurer-net-cert.pem"
              },
  
              "caName": "ca.insurer-net"
          },
          "ca.investor3-net": {
              "url": "https://ca.investor3-net:7054",
              "httpOptions": {
                  "verify": false
              },
              "tlsCACerts": {
                  "path": "/mnt/fabric/crypto-config/peerOrganizations/investor3-net/ca/ca.investor3-net-cert.pem"
              },
  
              "caName": "ca.investor3-net"
          }
      },
      "configtxgenToolPath": "/mnt/fabric/fabric-samples/bin",
      "license": "Apache-2.0"
  }</code></pre>
  </div>
  </div>
  </p>