error executing hyperledger fabric code on localhost:3000 (through REST) - transactionId

后端 未结 2 1908
北荒
北荒 2021-01-27 06:32

I have tried executing a sample case of transfer of money between two accounts while referring to this: https://medium.freecodecamp.org/ultimate-end-to-end-tutorial-to-create-an

相关标签:
2条回答
  • 2021-01-27 07:10

    I also faced the similar problem, after looking into it and spending lot of time. I found this is not the problem of npm and node.js, if we are installing them as non root. This is the problem of Loopback so you have to make an API JSON request without "transactionId" and "timestamp" means remove both of them. It will work fine as loopback swagger will update it automatically. I hope it will work for all, who are facing the same kind of problem.

    0 讨论(0)
  • 2021-01-27 07:24

    The transactionID (in the example) ideally should not appear in the Swagger example for the POST operations. That example is generated by the LoopBack to Swagger conversion that is done by LoopBack code (not Composer). You need to remove it (and the timestamp too ideally, as Composer will update its own) in your JSON.

    see Why can I submit a transactionID with a transaction in hyperledger composer REST? for an answer. This loopback/swagger issue was created against loopback - last issue created was https://github.com/strongloop/loopback/issues/3510

    0 讨论(0)
提交回复
热议问题