Private key not found

 _startListeningToTxMessages Private key not found

TransactionsManager _handleMessage crashed 
{error: Error: Private key not found
    at vA.generateMPCMessage (http://localhost:3002/node_modules/.vite…}

Failed to send signing error message to the server 
{
    "txId": "451249eb-381f-47ef-a84d-33fe798f7887",
    "error": {}
}

1. error: Error: Private key not found at vA.generateMPCMessage (http://localhost:3002/node_modules/.vite/deps/@fireblocks_ncw-js-sdk.js?v=6f3e46d0:9931:102) at async VA._sendFailedSigningToTheServer (http://localhost:3002/node_modules/.vite/deps/@fireblocks_ncw-js-sdk.js?v=6f3e46d0:9352:20) at async VA._failSigning (http://localhost:3002/node_modules/.vite/deps/@fireblocks_ncw-js-sdk.js?v=6f3e46d0:9255:157)

  1. message: "Private key not found"
  2. stack: "Error: Private key not found\n at vA.generateMPCMessage (http://localhost:3002/node_modules

Getting this error when trying to sign a transaction , so after creating a tx its waiting in pending signature state.

image

So when i get a TransactionStatus of a tx as PENDING_SIGNATURE i sign that tx … but its giving the private key not found error

      if (TransactionStatus.PENDING_SIGNATURE) {
        await sdk?.signTransaction(txId);
      }

Log

{
  "level": "DEBUG",
  "message": "startSigning started",
  "isoTimestamp": "2024-08-08T15:42:42.087Z",
  "metadata": {
    "mpcMessageType": "MPC_START_SIGNING"
  }
},
{
  "level": "ERROR",
  "message": "_startListeningToTxMessages Private key not found",
  "isoTimestamp": "2024-08-08T15:42:42.470Z"
},
{
  "level": "ERROR",
  "message": "TransactionsManager _handleMessage crashed",
  "isoTimestamp": "2024-08-08T15:42:42.471Z",
  "metadata": {
    "error": {
      "stack": "Error: Private key not found\n    at vA.generateMPCMessage (http://localhost:3002/node_modules/.vite/deps/@fireblocks_ncw-js-sdk.js?v=6f3e46d0:9931:102)",
      "message": "Private key not found"
    }
  }
},
{
  "level": "DEBUG",
  "message": "TransactionsManager _stopTimeout reason: \"Signing failed for txId 451249eb-381f-47ef-a84d-33fe798f7887 with reason UNKNOWN_ERROR\"",
  "isoTimestamp": "2024-08-08T15:42:42.471Z"
},

Got the solution for it … so i was using
const secureStorageProvider = new InMemorySecureStorageProvider();

but it didnt work, instead this one worked
const secureStorageProvider = new PasswordEncryptedLocalStorage