hyperledger-composer-dev-tutorial
hyperledger-composer-dev-tutorial copied to clipboard
TypeError: adminConnection.createProfile is not a function
Hey Zach - thanks for the videos - they are brilliant!
I'm just getting this error when I'm trying to test the directory. I think the createProfile function was removed from the composer-admin module. Do you have any workaround for this?
Thanks again!
Glad you like them! May I ask at what command you are getting this error? I know they have released a new version since this tutorial so if you could copy/paste the error log that might help.
Yeah I'm just after checking my adminconnection.js file and it doesn't have a createProfile function anymore.
I'm just using npm test
in my project folder. I get the following error in my terminal:
"before all" hook:
TypeError: adminConnection.createProfile is not a function
at Context.
I checked composer-logs to see if there were any logs in there but there wasn't.
Which version of Composer are you running? In the latest version it doesn't look like this method is available.
Yes, the createProfile function isn't there...
I'm using the latest version - v0.15.2
The core devs have been making all sorts of changes with this new Identity Card syntax, and by the looks of the new sample network (https://github.com/hyperledger/composer-sample-networks/blob/master/packages/perishable-network/test/perishable.js), they are relying on MemoryCardStore
class from Common API for testing.
I will try and get back to this repo and update, but for now, I think you might download the new sample network and work from there.
Sorry I couldn't be of more help. This industry is moving at 100mph!!
I will say that most of the Composer documentation is pretty good, and if you follow my 5 part video series (even if you have to revert back to v0.15.0 to do so), you should have a framework of understanding that applies to the new versions. Working through new syntax is definitely the challenge at this point.
No worries Zach - I know the way!
I'll have a further look into it, and maybe take up the issue with the Hyperledger dev's to see if they know how to solve it...
Thanks again!
Yeah for sure - ill post the fix here when I figure it :)
Hey Zach - the fix was in that file you attached -> https://github.com/hyperledger/composer-sample-networks/blob/master/packages/perishable-network/test/perishable.js
You just have to connect as they do in it :)
Awesome, glad you got it figured out! Feel free to submit a PR or the lines of code you changed for future users of this repo :)