Hyperledger Composer issue identity but missing business card

孤街浪徒 提交于 2019-12-05 19:33:09

It works for me. I'm using composer 0.15.1.

var businessNetwork = new BusinessNetworkConnection();

return businessNetwork.connect('admin@carauction-network')
.then(() => {
  return businessNetwork.ping();
})
.then((result) => {
  console.log(`participant = ${result.participant ? result.participant : '<no participant found>'}`);
})
.catch((error) => {
  console.error(error);
});

Output is like this

linux1@fabric:~/eventclient$ node event.js
participant = org.hyperledger.composer.system.NetworkAdmin#admin

You may need to import ID card to wallet ?

composer card import --file networkadmin.card

I had a similar issue late last week. Part of the upgrade instructions from V0.14 to V0.15 states that we have to delete the (if existing) ~/.composer, ~/.composer-connection-profiles and ~/.composer-credentials. I skipped that step on my first upgrade to v01.5 and encountered the error you are seeing. Went back and deleted those three folders, reinstalled the binaries and rechecked docker image status. Error went away and has not reappeared.

You named the new card user001, not user001@@tutorial-network. Try connecting with just user001 as your connection card name.

I used the following command to create a card for the participant using the enrollment secret obtained from the javascript.

composer card create -u usr001 -s <enrollment_secret> -f usr001.card -n tutorial-network -p connection.json

You probably created the connection.json needed in some step before in the tutorial you are following. If this file is not available explicitly, you may get it from the composer wallet. In the current version, it can be located in /home/your_user/.composer/cards/. If you are only following the tutorial, any connection.json in this directory will do. After that, you must add the credential created to the wallet using:

composer card import -f usr001.card

Your code for testing the issued identity is correct.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!