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,030 points
70 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+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

+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 10, 2018 in Blockchain by Perry
59 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
• 16,450 points
131 views
0 votes
1 answer

IBM Container Service blockchain deployment error.

This error might be caused because of ...READ MORE

answered Jul 10, 2018 in Blockchain by digger
• 27,620 points
25 views
0 votes
1 answer
+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
81 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 59 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.