Hyperledger Fabric getPrivateData() returns "GET_STATE failed" #privatedata #chaincode #fabric


Strohhut
 

So I created the same asset as an user of `Org1` in both implicit PDCs of `Org1` and `Org2`.  
I verified that the data exists in both PDCs via CouchDB-Fauxton.
 
Now I want to read that Asset as an user of `Org2`.  
 
From my understanding, both should be able to query their own implicit PDC.  
 
Doing so with `getPrivateDataByPartialCompositeKey()` on another asset works fine.
 
But with `getPrivateData()` I get the following error:
 
> GET_STATE failed: transaction ID: 6e35148f51e33cb5c7dc5af5e591e2af81cd0e458ee5ece2191c9488549bed6c: private data matching public hash version is not available. Public hash version = {BlockNum: 7, TxNum: 1}, Private data version = <nil>
 
What can be the reason?
 
Am I not authorized to read an asset created by an other Org from my own implicit PDC?
 
Everything is executed on the fabric test-network with comandline.
 
Code:
 
    // Try to read the asset with the given offerID from the PDC
    offerJSON, err := ctx.GetStub().GetPrivateData(implicitPDCPrefix+org.OrgMSPID, privatePriceID)
    if err != nil {
    return fmt.Errorf("ReplyToPrivatePrice: failed to read asset private properties from client org's collection. %v", err)
    }