Composer rest 服务器在执行事务时抛出错误

Composer rest server throwing error while performing transactions

我的网络正常,运行,其余服务器 运行 正常。但是当涉及到执行交易时,我收到了这个错误。你如何解决这个问题?这与我定义的同行数量有关,还是与将参与者绑定到身份有关。我卡住了。

{
  "error": {
    "statusCode": 500,
    "name": "Error",
    "message": "Error trying invoke business network. Error: No valid responses from any peers.\nResponse from attempted peer comms was an error: Error: error executing chaincode: transaction returned with failure: [-5929085f]Calling chaincode Invoke() returned error response [ReferenceError: alert is not defined]. Sending ERROR message back to peer\n",
    "stack": "Error: Error trying invoke business network. Error: No valid responses from any peers.\nResponse from attempted peer comms was an error: Error: error executing chaincode: transaction returned with failure: [-5929085f]Calling chaincode Invoke() returned error response [ReferenceError: alert is not defined]. Sending ERROR message back to peer\n\n    at _initializeChannel.then.then.then.then.catch (/Users/Admin/.nvm/versions/node/v8.9.4/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:912:34)\n    at <anonymous>"
  }
}

错误消息提供了有关问题的线索。在调用链代码时,您的 TP 失败并出现以下错误 ReferenceError: alert is not defined 看起来您已尝试使用名为警报的功能。这不存在。如果您在带有 Web 浏览器连接器的 playground 中使用它,那么它之所以有效,只是因为所有代码都在浏览器中执行,并且浏览器定义了 alert 全局函数。