accounts icon indicating copy to clipboard operation
accounts copied to clipboard

CreateAccount flow error: Flow sessions were not provided for the following transaction participants

Open adelrustum opened this issue 5 years ago • 4 comments

Corda OS: 4.1 Accounts: 1.0-RC03

Steps to reproduce:

  1. Start node using java -jar corda.jar
  2. Run flow start CreateAccount name: test
  3. Error doesn't happen in a mock network (i.e. using flow tests), it only happens when running flow from inside the node console.

I attached my Intellij debugger to the node and it happens here:

  1. CreateAccount class:
val finalisedTransaction = subFlow(FinalityFlow(signedTransaction, emptyList()))
  1. Which is caused by this check inside FinalityFlow class:
require(missingRecipients.isEmpty()) {
                "Flow sessions were not provided for the following transaction participants: $missingRecipients"
            }

adelrustum avatar Sep 20 '19 17:09 adelrustum

If I run the flow from the node terminal:

  1. externalTxParticipants = The node that started the flow
  2. sessionParties is empty
  3. oldParticipants is empty as well

So missingRecipients is not empty (it has the node the started the flow), which throws that error.

If I run the flow using flow tests, externalTxParticipants is empty; so the list missingRecipients is empty and the check passes.

adelrustum avatar Sep 20 '19 19:09 adelrustum

Further investigation inside FinalityFlow.extractExternalParticipants() shows that the owningKey is different between ltx.outputStates.flatMap { it.participants } and serviceHub.myInfo.legalIdentities even though the CordaX500Name is identical; it's weird because my node that initiated the flow is used as the Issuer of the AccountInfo state and the Issuer is the sole participant so I would think that serviceHub.myInfo.legalIdentities and it.participants should be identical (CordaX500Name and owningKey wise).

adelrustum avatar Sep 20 '19 19:09 adelrustum

I deployed my cordapp to GCP VM with Postgress DB and everything works fine, I guess it only fails when running the node locally (built through deployNodes and ran with java -jar corda.jar).

adelrustum avatar Sep 20 '19 21:09 adelrustum

Thanks for flagging this - we'll look into it on Monday. cc: @willhr3 @roastario

roger-that-dev avatar Sep 21 '19 09:09 roger-that-dev