1

I'm trying to export my Network Admin card from the Playground UI, but the export icon is disabled. In addition, I see the following error in my Chrome console:

Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated.

How do I export the Network Admin card from the Playground?

Here's the full Firefox log:

Establishing admin connection ...
main.d12285adf00f2401cf60.bundle.js:1:346887
@JS : ModelManager            :addSystemModels()        [object Object] 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver                :resolveRelationship()    Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager         :<ResourceManager>()      Binding in the tx names and impl 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : EngineTransactions      :createHistorianRecord()  created historian record 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver                :resolveRelationship()    Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : EngineTransactions      :createHistorianRecord()  created historian record 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : Resolver                :resolveRelationship()    Failed to resolve relationship [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : EngineTransactions      :createHistorianRecord()  created historian record 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
Establishing admin connection ...
main.d12285adf00f2401cf60.bundle.js:1:346887
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : IdentityManager         :validateIdentity()       Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated (ACTIVATION_REQUIRED) 
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : Engine                  :query()                  Caught error, rethrowing [object Object]
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager         :validateIdentity()       Error: The current identity, with the name 'admin' and the identifier 'ddae16d6f23947e9349627051b8ca5933cef53d2918f52295352d7dd24cdabcb', must be activated (ACTIVATION_REQUIRED) 
main.d12285adf00f2401cf60.bundle.js:1:848759
@JS : IdentityManager         :<ResourceManager>()      Binding in the tx names and impl 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : EngineTransactions      :createHistorianRecord()  created historian record 
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ConnectionProfileManager:getConnectionManagerByTy Looking up a connection manager for type web
main.d12285adf00f2401cf60.bundle.js:1:848811
@JS : ModelManager            :addSystemModels()        [object Object] 
main.d12285adf00f2401cf60.bundle.js:1:848811
connected
main.d12285adf00f2401cf60.bundle.js:1:61666
ulu
  • 5,872
  • 4
  • 42
  • 51

2 Answers2

2

This is the answer I got on GitHub:

The reason that the export is greyed out is because you are using the bluemix staged Playground that is in the 'web-connector' mode. In order to meaningfully export a business network card, you will need to create a connection to Hyperledger Fabric. The steps you outline above will not create a business network in Hyperledger Fabric, but within a web connector.

If you follow the developer tutorial (https://hyperledger.github.io/composer/tutorials/developer-tutorial) you will be taken through the process of creating a (local) Fabric, from which you can connect Playground and export business network cards.

ulu
  • 5,872
  • 4
  • 42
  • 51
  • Run `./createPeerAdminCard.sh` from your `fabric-tools` folder. Then you can deploy a new business network choosing “ID and Secret” option from setp 3; set enrollment id and enrollment secret. Now you can download your Network Admin card – Riccardo Apr 04 '19 at 15:19
1

You can create the admin card via composer-cli.

composer card create 
-p connection.json 
-u PeerAdmin -c Admin@org1.example.com-cert.pem 
-k 114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk 
-r PeerAdmin -r ChannelAdmin

Add connection.json file as following:

{
  "name": "fabric-network",
  "type": "hlfv1",
  "mspID": "Org1MSP",
  "peers": [
      {
          "requestURL": "grpc://localhost:7051",
          "eventURL": "grpc://localhost:7053"
      }
  ],
  "ca": {
      "url": "http://localhost:7054",
      "name": "ca.org1.example.com"
  },
  "orderers": [
      {
          "url" : "grpc://localhost:7050"
      }
  ],
  "channel": "composerchannel",
  "timeout": 300
}

The certificate file can be found in the signcerts subdirectory (fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp) and is named Admin@org1.example.com-cert.pem.

The private key file can be found in the keystore subdirectory. The name of the private key file is a long hexadecimal string, with a suffix of _sk, for example 114aab0e76bf0c78308f89efc4b8c9423e31568da0c340ca187a9b17aa9a4457_sk.

Step by step tutorial is available in Hyperledger Composer Tutorials @ https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.

Saad Bin Shahid
  • 334
  • 3
  • 14
  • The instructions refer to creating the PeerAdmin card. I'm having a problem with creating a Network Admin card -- the `composer network start` command creates a card that later gives me a 400 error, so I thought I could create this card manually. – ulu Feb 26 '18 at 17:10