Error while deploying chaincode in IBM Blockchain Please help

+1 vote

I'm following the instructions to deploy some chaincode to the IBM Hyperledger Blockchain v0.6.1 on Bluemix.. I need to submit a JSON request, which contains the path to the chaincode repository:

{
  "jsonrpc": "2.0",
  "method": "deploy",
  "params": {
    "type": 1,
    "chaincodeID": {
      "path": "https://github.com/series0ne/learn-chaincode/tree/master/finished"
    },
    "ctorMsg": {
      "function": "init",
      "args": [
        "Hello, world"
      ]
    },
    "secureContext": "user_type1_0"
  },
  "id": 0
}


I have logged in user_type1_0 before attempting to deploy, but this is the result I get:
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32001,
    "message": "Deployment failure",
    "data": "Error when deploying chaincode: Error getting chaincode package bytes: Error getting code 'go get' failed with error: \"exit status 1\"\npackage github.com/series0ne/learn-chaincode/tree/master/finished: cannot find package \"github.com/series0ne/learn-chaincode/tree/master/finished\" in any of:\n\t/opt/go/src/github.com/series0ne/learn-chaincode/tree/master/finished (from $GOROOT)\n\t/opt/gopath/_usercode_/424324290/src/github.com/series0ne/learn-chaincode/tree/master/finished (from $GOPATH)\n\t/opt/gopath/src/github.com/series0ne/learn-chaincode/tree/master/finished\n"
  },
  "id": 0
}

Any ideas how to resolve this?

Apr 26, 2018 in Blockchain by nsv999
• 5,500 points
897 views

1 answer to this question.

+1 vote
Best answer

Try stripping out the 'tree/master' portion of your deployment url. Notice that the example linked below does not include this portion of the url:

https://github.com/IBM-Blockchain/learn-chaincode#deploying-the-chaincode

This url is going to be passed into a 

go get <url> 

command inside the peer, which will download the chaincode so that it can be compiled. So, this url must match the format accepted by this command.

Following are some other things to check.

  • The v2.0 branch from https://github.com/IBM-Blockchain/learn-chaincode should be used with a Blockchain network running Hyperledger Fabric v0.6.1. Is your fork even with the v2.0 branch from https://github.com/IBM-Blockchain/learn-chaincode?
  • Was the chaincode deployment issued from the same validating peer used to register the user_type1_0 user? The validating peer can be selected at the top of the APIs tab. There is a note in the Learn Chaincode instructions indicating that the same validating peer must register the user and deploy the chaincode.

answered Apr 26, 2018 by Christine
• 15,790 points

selected Aug 10, 2018 by Omkar

Related Questions In Blockchain

0 votes
0 answers

I got stuck in Blockchain Course. Please Help Me!

Please help me I got stuck in ...READ MORE

Sep 6, 2020 in Blockchain by Arcadius
• 120 points
723 views
+1 vote
1 answer

How do i change the names of validating peers in IBM Bluemix blockchain?

IBM Bluemix Blockchain service Hyperledger Fabric v0.6 will ...READ MORE

answered Apr 11, 2018 in Blockchain by Perry
971 views
0 votes
1 answer

Send Payment error in Blockchain API

The following code should help: $address = null; try ...READ MORE

answered Jul 6, 2018 in Blockchain by Perry
• 17,100 points
1,753 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
+1 vote
1 answer

Car lease demo database location in IBM blockchain

Firstly, yes you can change the default DB ...READ MORE

answered Jun 7, 2018 in Blockchain by Christine
• 15,790 points
1,448 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 1,567 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP