Paradox
Paradox

Reputation: 367

Error while using hyperledger composer with explorer

I am trying to use hyperledger composer alongside hyperledger explorer. I've deployed a simple business network on fabric-dev-servers. On the composer side it is working fine and I am able to interact with the network perfectly but when I am trying to integrate it with hyperledger explorer I am getting the following error while starting it.

console log

postgres://hppoc:[email protected]:5432/fabricexplorer
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
    at Platform.initialize (/home/paradox/hyperledger/fabric/blockchain-explorer/app/platform/fabric/Platform.js:54:48)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:23248) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
Received kill signal, shutting down gracefully
Closed out connections

App log:

[2018-10-29 22:14:30.719] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******
[2018-10-29 22:14:30.719] [DEBUG] Platform - Setting admin organization enrolment files

db log:

[2018-10-29 22:14:22.055] [INFO] pgservice - Please set logger.setLevel to DEBUG in ./app/helper.js to log the debugging.

Following is my config.json
config:

{
  "network-config": {
    "org1": {
      "name": "Org1",
      "mspid": "Org1MSP",
      "peer1": {
        "requests": "grpcs://127.0.0.1:7051",
        "events": "grpcs://127.0.0.1:7053",
        "server-hostname": "peer0.org1.example.com",
        "tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
      },
      "admin": {
        "key": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore",
        "cert": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts"
      }
    }
  },
  "channel": "composerchannel",
  "orderers": [
    {
      "mspid": "OrdererMSP",
      "server-hostname": "orderer.example.com",
      "requests": "grpcs://127.0.0.1:7050",
      "tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
    }
  ],
  "keyValueStore": "/tmp/fabric-client-kvs",
  "configtxgenToolPath": "/home/playground/fabric-samples/bin",
  "SYNC_START_DATE_FORMAT": "YYYY/MM/DD",
  "syncStartDate": "2018/9/01",
  "eventWaitTime": "30000",
  "license": "Apache-2.0",
  "version": 1.0
}

Upvotes: 0

Views: 575

Answers (2)

vikas balyan
vikas balyan

Reputation: 806

I have faced similar kind of issue and solved it using following steps.

  1. Download Explorer 3.5 from given url.
    https://github.com/hyperledger/blockchain-explorer/tree/v0.3.5.1

  2. Hyperledger Composer Setup(Update config.json)

  3. Build Hyperledger Explorer

  4. Run Hyperledger Explorer

Finally it work for Fabric 1.2 and [email protected].

I hope it will help you !

Upvotes: 1

Paul Russell
Paul Russell

Reputation: 544

Looking at the format of your config.json file, it looks like you might be either using an old version of Explorer, or an old config.json. Support for Fabric 1.2 (which it looks like you are using) was only added in Explorer 3.7, along with changes to the structure of config.json.

So, I would recommend the following:

  • Update to Explorer 3.7 (branch release-3.7).
  • Follow the instructions here.

Upvotes: 0

Related Questions