Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying a contract in the testing environment - functions not showing up and unable to continue #6

Open
AndreiRinea opened this issue Jul 24, 2021 · 2 comments

Comments

@AndreiRinea
Copy link

Hi, I am a buyer of the book (2nd edition) and I'm doing the tutorial in the book. I am at "Deploying a contract in the testing environment" and I'm stuck at point 5.

Here's my environment:

OS: Ubuntu 20.04.2 LTS ("focal") - running in VirtualBox on a Mac OS X Big Sur
VS Code: 1.58.2
Node: 10.19.0
NPM: 6.14.4
TypeScript: 4.3.5
IBP Extension: 2.0.4 (also tried 2.0.2, 2.0.0 and 1.0.40)

Here's my steps before I get stuck:

a. I cloned this repository and I open in VS Code the v1/trade folder. The book does not specify v1 but after packaging the contract screenshots and text specify "[email protected]" while the v2/trade folder would generate a "[email protected]".
b. I "disable the access control mechanism" by commenting out the contents of the beforeTransaction function in trade-contract.ts as shown in the book.
c. Next I connect to "1 Org Local Fabric" environment which I created from a template early in the book.
d. Although not in the book I do an "npm install" in a terminal window in the v1/trade directory - else the next step fails - this might need to be added in the book
e. In IBP extension, in the Smart Contracts section/"window" I "choose" command Package Open Project. This succeeds. After some log entries I get a "[email protected]" item in this "window".
f. Now I reach section "Deploying a contract in a testing environment". I select "Deploy smart contract" in Fabric Environments under "mychannel". A wizard appears and I'm on step 1.
g. From the "Choose a smart contract to deploy" I select "[email protected]" and click next just as the book says.
h. In the second step I have Definition name prefilled to "trade" and Definition version prefilled to "1.0.0" and I leave "Endorsement policy" as the book says. I click next.
i. In step 3 I only review previous steps' values and click deploy. I get a lot of log output (you can inspect at https://blog.andrei.rinea.ro/hlf01.txt). The screen looks like this:

image

j. In "Fabric Gateways" I click on "Org1 Gateway" as the book implies.
k. Although the book specifies that I should be asked for an identity, the VS Code IBP extension assumes "Org1 Admin" and populates the tree this way:

image

I expand "mychannel":

image

Finally I expand "[email protected]" node, or so I thought, but nothing appears underneath it:

image

Here's the log generated precisely when I tried to expand the "[email protected]" node: https://blog.andrei.rinea.ro/hlf02.txt

At this point I'm stuck and cannot continue as I don't get to the functions to be able to invoke them. I retried this using several versions of the IBP extension (2.0.4, 2.0.2, 2.0.0 and 1.0.40) with the same results. I even tried the v2/trade folder with the same results. What can be done?

Thanks,
Andrei Rinea.

@AndreiRinea
Copy link
Author

Anyone else encountered this?

@florencioq
Copy link

Same problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants