2017-09-27 97 views
1

我的作曲家的新版本有問題。我chaincode工作正常與0.11,現在0.13,當我添加一個chaincode以外的資產,我有錯誤:作曲家0.13.0 - 錯誤:遺失編號

Error: Missing id" 

當然,ID出現在創建後的新的資產; - )

當我把模擬代碼在chaincode添加的資產,我有以下錯誤:

Error: Error trying invoke business network. Error: chaincode error (status: 500, message: Error: Object with ID 'Resource {id=zzz.yyy.xxx.tttt#e60e56d92a6928d3f4d1c5bc9bb828c3fc0a292c26ccc35935c594ac0e160c28}' in collection with ID 'Asset:zzz.yyy.xxx.tttt' does not exist) 

下面的代碼的提取物(沒什麼特別的)

return getAssetRegistry(NS + '.ttt') 
    .then(function (tttRegistry) { 

     // Create the asset 
     var ttt = factory.newResource(NS, 'ttt', '12345'); 

     // Add new ttt 
     return tttRegistry.add(ttt) 
      .then(function() { 

       // Emit an event 

起着代碼身份默認admin用戶

也許我發現日誌東西但我don'y懂得解釋它

2017-09-26T20:09:39.841Z ERROR HLFConnectionManager :fabric-client()   [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED)) at /home/hyperledger/node_modules/grpc/src/node/src/client.js:554:15 {}$ 
2017-09-26T20:09:39.842Z ERROR HLFConnection   :queryChainCode()   {"message":"Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at channel.queryByChaincode.then.catch (/home/hyperledger/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:754:34)"}$ 
2017-09-26T20:09:39.842Z ERROR HLFConnection   :ping()     {"message":"Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))","stack":"Error: Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity must be activated (ACTIVATION_REQUIRED))\n at _checkRuntimeVersions.then.catch (/home/hyperledger/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:668:34)"}$ 

我發現唯一信息本發佈Hyperledger Composer:: Error: The current identity must be activated (ACTIVATION_REQUIRED)但是,在我的情況,作曲家的版本和包都是相同

我不明白髮生了什麼,因爲我從0.11升級到0.13

有什麼想法?

回答

1

我發現問題來自哪裏。 這不是設計問題或ACL的錯誤。

在Composer 0.11中,如果您與資產有關係,則在您的代碼中,您可以直接訪問其字段 Composer 0.13中的行爲更改,與元素的關係僅爲參考,您不能直接訪問其字段

最糟的是,當你調用方法factory.newRelationship(),當你調用方法assetRegistry.add()

所以,要小心

+0

我有同樣的問題。實現了我有一個可選參數,並將一個空字符串作爲REST請求中的一個對象值傳遞。我完全刪除了鍵和值,而且它似乎工作。 – Ganga

0

這聽起來更像是模型的問題 - 您試圖創建一個名爲id的必填字段的資源,並且您沒有爲該字段提供值。

您是否有可以包含的堆棧跟蹤?

+0

唯一的錯誤,我可以看到它是惜售不惜售錯誤是: '2017-09-27 11:27:36.441 UTC [作曲家]錯誤 - > ERRO 3111 @JS:IdentityManager:getIdentity()錯誤:當前身份尚未註冊:admin' 但我沒有更改任何東西在兩個版本的作曲家之間。 ACL在0.13中更嚴格嗎? – PPCM

+0

請你可以發佈你的permissions.acl的內容 - 它可能是一個ACL問題。謝謝。 –

+0

這裏是ACL '規則默認{ 描述: 「允許所有參加者訪問所有資源」 參與者: 「ANY」 操作:ALL 資源: 「zzz.yyy.xxx **」 操作:允許 } 規則SystemACL { 描述: 「系統ACL允許所有訪問」 參與者: 「org.hyperledger.composer.system.Participant」 操作:ALL 資源: 「org.hyperledger.composer.system **」 行動:允許 }' 我測試了一個普通用戶(比默認的管理員),我有n o錯誤 – PPCM

0

如果默認規則 - 「所有資源:」「 zzz.yyy.xxx *」應設置爲

然後部署新更新的網絡,然後再試一次。

+0

同樣的錯誤 - **是在命名空間中的所有級別 – PPCM