Hi there,
I was trying to use JSON API to create a user on the participant. But got the following error? Anyone can help here?
participant1 {
storage = ${_shared.storage}
storage.config.properties.databaseName = "participant1"
init.parameters.unique-contract-keys = ${?_.shared.unique-contract-keys}
admin-api {
port = 10012
// if defined, this include will override the address we bind to. default is 127.0.0.1
address = ${?_shared.admin-api.address}
}
ledger-api {
port = 10011
address = ${?_shared.ledger-api.address}
auth-services = [{
type = jwt-rs-256-crt
certificate = ./cert.pem
}]
}
}
The request is like this
{
“userId” : “STtFWbaujUwqIkUBFT0naevxndj3Ac5q@clients”,
“primaryParty” : “Alice:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93”,
“rights”:[
{
“type” : “CanActAs”,
“party”: “David:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93”
},
{
“type” : “CanReadAs”,
“party”: “Smith:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93”
}
]
}
I’ve checked that both parties are allocated on that participant. Did I miss anything here?
It looks like you didn’t actually share your error message?
ops, sorry. the error message is
{
“errors”: [
“INVALID_ARGUMENT: INVALID_ARGUMENT(8,0): The submitted command has invalid arguments: Provided parties have not been found in identity_provider_id=: [David:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93,Smith:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93]." ], "ledgerApiError": { "code": 3, "details": [ { "errorCodeId": "INVALID_ARGUMENT", "metadata": { "participant": "'participant1'", "category": "8", "definite_answer": "false" }, "type": "ErrorInfoDetail" } ], "message": "INVALID_ARGUMENT(8,0): The submitted command has invalid arguments: Provided parties have not been found in identity_provider_id=
: [David:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93,Smith:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93].”
},
“status”: 400
}
How did you check that the parties are allocated on the participant? Could you share the output of those commands?
Here is the command and output. David and Smith are the allocated party on participant1.
dilbert@dilbert-Inspiron-15-5510:~/development/canton-participant$ daml ledger list-parties --host localhost --port 10011 --access-token-file ./opensslToken.txt
Listing parties at localhost:10011
PartyDetails {party = 'Alice::122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93', displayName = "", isLocal = True}
PartyDetails {party = 'Bank::122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93', displayName = "Bank", isLocal = True}
PartyDetails {party = 'Bob::122014a43f334ae314b54913dff96e43ba9e2256ffe9a9b8507f9e19fb52f162659e', displayName = "", isLocal = False}
PartyDetails {party = 'Charlie::12205cc5d84b07473fcad12daec503093c4257b4d9f9bf3a8ff5d82ca17d7aee363b', displayName = "", isLocal = False}
PartyDetails {party = 'David::122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93', displayName = "David", isLocal = True}
PartyDetails {party = 'participant1::122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93', displayName = "", isLocal = True}
PartyDetails {party = 'participant2::122014a43f334ae314b54913dff96e43ba9e2256ffe9a9b8507f9e19fb52f162659e', displayName = "", isLocal = False}
PartyDetails {party = 'participant3::12205cc5d84b07473fcad12daec503093c4257b4d9f9bf3a8ff5d82ca17d7aee363b', displayName = "", isLocal = False}
PartyDetails {party = 'Smith::122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93', displayName = "Smith", isLocal = True}
The issue is found. The party id inside the request missed a column…
“David:122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93” should be “David::
122013276fc51248214c9bfbafd83c183a6e24b965f879ccb603b93168147abe1c93”
1 Like