# Private key not found

**URL:** <https://community.fireblocks.com/t/private-key-not-found/1293>\
**Category:** Developer Discussion\
**Tags:** help-center\
**Created:** [August 8, 2024, 3:48pm UTC](https://community.fireblocks.com/t/private-key-not-found/1293 "2024-08-08T15:48:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tan](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@tan](https://community.fireblocks.com/u/tan)\
**Post date:** [August 8, 2024, 3:48pm UTC](https://community.fireblocks.com/t/private-key-not-found/1293/1 "2024-08-08T15:48:24Z")

</div>

```auto
 _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](https://us1.discourse-cdn.com/flex015/uploads/fireblocks/original/1X/d25e8d11b893edad6ffd55c8c7b8f7ce7486ba68.png)

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

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

```

---

<div class="post-metadata">

**Author:** ![tan](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@tan](https://community.fireblocks.com/u/tan)\
**Post date:** [August 8, 2024, 3:52pm UTC](https://community.fireblocks.com/t/private-key-not-found/1293/2 "2024-08-08T15:52:51Z")

</div>

Log

```auto
{
  "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"
},

```

---

<div class="post-metadata">

**Author:** ![tan](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@tan](https://community.fireblocks.com/u/tan)\
**Post date:** [August 8, 2024, 6:32pm UTC](https://community.fireblocks.com/t/private-key-not-found/1293/3 "2024-08-08T18:32:22Z")

</div>

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`
