TasinIshmam / blockchain-academic-certificates

Academic certificate issuing and verification application using Hyperledger Fabric and Nodejs
60 stars 33 forks source link

error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: getAllCertificateByStudent #1

Closed mingjiahui closed 3 years ago

mingjiahui commented 3 years ago

Hey,

I'm following README.md When building the project, encountered this error when logging in after successful registration. Do you know how to solve it? I checked the Fabric network and the chaincode educert was successfully deployed. Hope to receive your reply soon, thank you very much!

图片

and here is my directory structure: ../go/src/github.com/hyperledger/fabric/scripts/blockchain-academic-certificates ../go/src/github.com/hyperledger/fabric/scripts/fabric-samples

mingjiahui commented 3 years ago

hello @TasinIshmam , i really need your help~~

TasinIshmam commented 3 years ago

Hi, did you set the CCP_PATH variable properly? It should be the connection-org1.json file generated by the fabric test network.

If this dosen't work perhaps you can consider using the vscode fabric extension to set up a 1 node network. It's usually easier to connect to a network started with that instead of directly using the fabric binaries.

mingjiahui commented 3 years ago

Hi, did you set the CCP_PATH variable properly? It should be the connection-org1.json file generated by the fabric test network.

If this dosen't work perhaps you can consider using the vscode fabric extension to set up a 1 node network. It's usually easier to connect to a network started with that instead of directly using the fabric binaries.

Yes, I did. CCP_PATH = /home/mingming/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/connection-org1.json is this right? I'll try the vscode fabric extension way. thanks!

mingjiahui commented 3 years ago

Hi, did you set the CCP_PATH variable properly? It should be the connection-org1.json file generated by the fabric test network.

If this dosen't work perhaps you can consider using the vscode fabric extension to set up a 1 node network. It's usually easier to connect to a network started with that instead of directly using the fabric binaries.

And, I'm not sure whether I should install the four chaincodes under the chaincode directory, or just install educert. Could you please tell me.

TasinIshmam commented 3 years ago

Hi, did you set the CCP_PATH variable properly? It should be the connection-org1.json file generated by the fabric test network. If this dosen't work perhaps you can consider using the vscode fabric extension to set up a 1 node network. It's usually easier to connect to a network started with that instead of directly using the fabric binaries.

And, I'm not sure whether I should install the four chaincodes under the chaincode directory, or just install educert. Could you please tell me.

All four js files together consist of the "chaincode". You need to package the whole thing and install it. There's a utility command to package the whole thing, given in the fabric tutorial. peer lifecycle chaincode package basic.tar.gz --path /path/to/repo/blockchain-academic-certificates/chaincode --lang node --label basic_1.0

Finally, you install the chaincode using the tar.gz file created.

mingjiahui commented 3 years ago

Hi, did you set the CCP_PATH variable properly? It should be the connection-org1.json file generated by the fabric test network. If this dosen't work perhaps you can consider using the vscode fabric extension to set up a 1 node network. It's usually easier to connect to a network started with that instead of directly using the fabric binaries.

And, I'm not sure whether I should install the four chaincodes under the chaincode directory, or just install educert. Could you please tell me.

All four js files together consist of the "chaincode". You need to package the whole thing and install it. There's a utility command to package the whole thing, given in the fabric tutorial. peer lifecycle chaincode package basic.tar.gz --path /path/to/repo/blockchain-academic-certificates/chaincode --lang node --label basic_1.0

Finally, you install the chaincode using the tar.gz file created.

Oh! I see. Thank you so much!!!

TasinIshmam commented 3 years ago

Welcome, good luck!

mingjiahui commented 3 years ago

Hi @TasinIshmam, It's me, again~

Could you please tell me what kind of data format should I input during verification? Can you give me an example? Thanks advanced! image

TasinIshmam commented 3 years ago

This will be a JSON object. When you generate a proof in the holder subportal, a popup modal/box will give you a JSON object, which is actually the proof object.

This proof object will be shared with some 3rd party verifier, who can paste it here to be verified by the platform.

Hope this helps!

mingjiahui commented 3 years ago

Oh, I see! When I click the "share button", it doesn't respond, so I can't get the JSON object. But I'll try again. Thanks!!!

TasinIshmam commented 3 years ago

You can just copy paste it manually. (It's just text).

TasinIshmam commented 3 years ago

Hey @mingjiahui I'm closing this issue since I assume your query has been answered.

sreenivasmalae commented 2 months ago

@TasinIshmam Facing the same issue