Skip to content

Commit

Permalink
FAB-7836 Fix "No identity type provided" Error
Browse files Browse the repository at this point in the history
Fix the following error:
[[{"code":0,"message":"No identity type provided. Please provide identity type"}]]

Change-Id: I5a0b04aadbf87d1661f9605f0eb4ec9b2dbab62a
Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com>
  • Loading branch information
armujahid committed Jan 21, 2018
1 parent 5eb2fb2 commit 25f6091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fabcar/registerUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Fabric_Client.newDefaultKeyValueStore({ path: store_path

// at this point we should have the admin user
// first need to register the user with the CA server
return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1'}, admin_user);
return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1',role: 'client'}, admin_user);
}).then((secret) => {
// next we need to enroll the user with CA server
console.log('Successfully registered user1 - secret:'+ secret);
Expand Down

4 comments on commit 25f6091

@skyelves
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it occurred to me that "Failed to register: Error: fabric-ca request register failed with errors [[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"}]]"

How can I fix it ?

@skyelves
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran "node registerUser.js" and met the problem.

@narcis2007
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skyelves It seems that the go version works ok, the node version has this issue

@armujahid
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skyelves @narcis2007 Kindly discuss that issue at https://chat.hyperledger.org/. They may redirect you to jira for issue logging like this https://jira.hyperledger.org/browse/FAB-7836

Please sign in to comment.