{"action":"created","issue":{"url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues/issues/67","repository_url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues","labels_url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues/issues/67/comments","events_url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues/issues/67/events","html_url":"https://github.com/IBM-Blockchain/ibm-blockchain-issues/issues/67","id":186111963,"number":67,"title":"When enrolling: \"Error: Identity lookup error: sql: no rows in result set\"","user":{"login":"MrBuggySan","id":9119360,"avatar_url":"https://avatars.githubusercontent.com/u/9119360?v=3","gravatar_id":"","url":"https://api.github.com/users/MrBuggySan","html_url":"https://github.com/MrBuggySan","followers_url":"https://api.github.com/users/MrBuggySan/followers","following_url":"https://api.github.com/users/MrBuggySan/following{/other_user}","gists_url":"https://api.github.com/users/MrBuggySan/gists{/gist_id}","starred_url":"https://api.github.com/users/MrBuggySan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrBuggySan/subscriptions","organizations_url":"https://api.github.com/users/MrBuggySan/orgs","repos_url":"https://api.github.com/users/MrBuggySan/repos","events_url":"https://api.github.com/users/MrBuggySan/events{/privacy}","received_events_url":"https://api.github.com/users/MrBuggySan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-30T02:00:07Z","updated_at":"2016-10-31T13:33:51Z","closed_at":null,"body":"Hi I'm looking through this sample hfc tutorial https://console.au-syd.bluemix.net/docs/services/blockchain/etn_sdk.html#nodesample and I'm running the Blockchain service in bluemix. \n\nI have have separated the register and enroll process like this code spnippet instead of using the default chain.registerAndEnroll() :\n\n```\n       var registrationRequest = {\n            enrollmentID: \"ElPerro\",\n            name: \"ElGato\",\n            account: \"group1\",\n            affiliation: \"00001\"\n        };\n        console.log(\"Now registering: \" + registrationRequest.name);\n        chain.register(registrationRequest, function(err, enrollmentSecret) {\n            if (err) {\n                throw Error(\"Failed to register \" + registrationRequest.name + \": \" + err);\n            }\n            console.log(\"Succesfully registered \" + registrationRequest.name);\n            registrationRequest.enrollmentSecret = enrollmentSecret;\n            //At this point, 'registration' only enables this person to enroll\n\n            console.log(\"Now enrolling: \" + registrationRequest.name);\n            chain.enroll(registrationRequest.name, registrationRequest.enrollmentSecret,\n                function(err, member) {\n                    if (err) {\n                        throw Error(\"Failed to enroll \" + registrationRequest.name + \": \" + err);\n                    }\n\n                    //A member object is returned \n                    console.log(member);\n                    console.log(\"Succesfully enrolled \" + registrationRequest.name);\n                }\n            );\n        });\n```\n\nI am getting this error, any tips on what to do here? \n\n```\nError: Failed to enroll Buiza2: Error: Identity lookup error: sql: no rows in result set\n    at Error (native)\n    at /home/andreibuiza/SchoolCode/capstone/HFCofficialTEST/BlockVoteNode/app.js:262:23\n    at /home/andreibuiza/SchoolCode/capstone/HFCofficialTEST/BlockVoteNode/node_modules/hfc/lib/hfc.js:468:28\n    at /home/andreibuiza/SchoolCode/capstone/HFCofficialTEST/BlockVoteNode/node_modules/hfc/lib/hfc.js:718:24\n    at Object.callback (/home/andreibuiza/SchoolCode/capstone/HFCofficialTEST/BlockVoteNode/node_modules/hfc/lib/hfc.js:1898:24)\n    at /home/andreibuiza/SchoolCode/capstone/HFCofficialTEST/BlockVoteNode/node_modules/grpc/src/node/src/client.js:420:14\n`\n```\n"},"comment":{"url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues/issues/comments/257294399","html_url":"https://github.com/IBM-Blockchain/ibm-blockchain-issues/issues/67#issuecomment-257294399","issue_url":"https://api.github.com/repos/IBM-Blockchain/ibm-blockchain-issues/issues/67","id":257294399,"user":{"login":"masterDev1985","id":14877096,"avatar_url":"https://avatars.githubusercontent.com/u/14877096?v=3","gravatar_id":"","url":"https://api.github.com/users/masterDev1985","html_url":"https://github.com/masterDev1985","followers_url":"https://api.github.com/users/masterDev1985/followers","following_url":"https://api.github.com/users/masterDev1985/following{/other_user}","gists_url":"https://api.github.com/users/masterDev1985/gists{/gist_id}","starred_url":"https://api.github.com/users/masterDev1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masterDev1985/subscriptions","organizations_url":"https://api.github.com/users/masterDev1985/orgs","repos_url":"https://api.github.com/users/masterDev1985/repos","events_url":"https://api.github.com/users/masterDev1985/events{/privacy}","received_events_url":"https://api.github.com/users/masterDev1985/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T13:33:51Z","updated_at":"2016-10-31T13:33:51Z","body":"@MrBuggySan you should use the `enrollmentID` parameter instead of the `name` parameter to reference your registered user when trying to enroll that user.  I don't think `name` gets used for anything.\r\n\r\nSee here:\r\nhttps://github.com/IBM-Blockchain/SDK-Demo/blob/master/helloblockchain.js#L153"}}
{"actor":{"display_login":"masterDev1985"}}