Cardano-wallet-js debugging

Hello,
I am running a docker image of the Cardano node V1.35 on testnet. I am trying to connect to testnet and view my balance from a address.

I have previously sent some tADA into the wallet. The balance is shown in the block explorer, however when I run the below JS code it just shows the balance as 0.

const getwalletaddress = async() => {

    try{

        let wallets = await walletServer.wallets();
        let id = wallets[0].id;
        let wallet = await walletServer.getShelleyWallet(id);
        let unusedAddresses = await wallet.getUnusedAddresses();
        let usedAddresses = await wallet.getUsedAddresses();
        let address = await wallet.getNextAddress();    
        let availableBalance = wallet.getAvailableBalance();

        
        console.log(unusedAddresses);
        console.log(usedAddresses);
        console.log(wallet);
        console.log(address)
        console.log(availableBalance)
    } catch(e){
        console.log(e);
    }
  }

getwalletaddress()

This is the code and below is the output :

On the blockchain explorer it shows the address contains 10 tADA but it does not reflect in the code output run through js. I think I am missing something important.

Kindly advise as I am new to this domain.

Is the node already fully synced? This will take a couple of hours, even on testnet, more like days on mainnet. Before that, cardano-wallet cannot know the current balance on addresses.

Yes it is fully synced, the testnet blockchain explorer shows the last block’s slot to be 62502977

As you can see in the picture the last slot synced is 62503015, so I think the node is synced.

Yep, and the transaction that filled your address is also long before 62503015.

Next, I’d look if the wallet is really connected to the node and if its own database is filled.

Does the log of cardano-wallet tell you something?

So my docker is running cardano-node-1 and cardano-wallet.

The logs of both above are perfectly fine, but when i run my code mentioned in the previous post, the log of cardano-wallet shows the below, which is some kind of error

[cardano-wallet.api-server:Info:198] [2022-07-03 18:59:01.58 UTC] [RequestId 0] [GET] /v2/wallets
[cardano-wallet.wallet-db:Info:198] [2022-07-03 18:59:01.58 UTC] Found existing wallet: fe46af51367e02a57043d5d82feae6e886d8c96e
[cardano-wallet.wallet-db:Info:198] [2022-07-03 18:59:01.59 UTC] Found existing wallet: 05313baba12b71a6199fc07f9082475fd4de89f2
[cardano-wallet.wallet-db:Info:198] [2022-07-03 18:59:01.59 UTC] Found existing wallet: 5f3d658878de868553882342dfdd8701510a9dc3
[cardano-wallet.api-server:Info:198] [2022-07-03 18:59:01.61 UTC] [RequestId 0] GET /v2/wallets 200 OK in 0.0328648s
[cardano-wallet.api-server:Info:200] [2022-07-03 18:59:01.64 UTC] [RequestId 1] [GET] /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e
[cardano-wallet.api-server:Info:200] [2022-07-03 18:59:01.64 UTC] [RequestId 1] GET /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e 200 OK in 0.0027049s
[cardano-wallet.api-server:Info:201] [2022-07-03 18:59:01.66 UTC] [RequestId 2] [GET] /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/addresses?state=unused
[cardano-wallet.api-server:Info:201] [2022-07-03 18:59:01.67 UTC] [RequestId 2] GET /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/addresses 200 OK in 0.0097893s
[cardano-wallet.api-server:Info:203] [2022-07-03 18:59:01.68 UTC] [RequestId 3] [GET] /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/addresses?state=used
[cardano-wallet.api-server:Info:203] [2022-07-03 18:59:01.68 UTC] [RequestId 3] GET /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/addresses 200 OK in 0.0011905s
[cardano-wallet.api-server:Info:204] [2022-07-03 18:59:01.69 UTC] [RequestId 4] [GET] /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/addresses
[cardano-wallet.api-server:Info:204] [2022-07-03 18:59:01.70 UTC] [RequestId 4] GET /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/addresses 200 OK in 0.0034635s
[cardano-wallet.api-server:Info:206] [2022-07-03 18:59:01.71 UTC] [RequestId 5] [GET] /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/keys/utxo_external/20
[cardano-wallet.api-server:Info:206] [2022-07-03 18:59:01.72 UTC] [RequestId 5] GET /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/keys/utxo_external/20 200 OK in 0.0076159s
[cardano-wallet.api-server:Info:208] [2022-07-03 18:59:01.73 UTC] [RequestId 6] [GET] /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/keys/mutable_account/0
[cardano-wallet.api-server:Info:208] [2022-07-03 18:59:01.73 UTC] [RequestId 6] GET /v2/wallets/fe46af51367e02a57043d5d82feae6e886d8c96e/keys/mutable_account/0 200 OK in 0.0008941s
[cardano-wallet.api-server:Info:209] [2022-07-03 18:59:01.74 UTC] [RequestId 7] [POST] /v2/addresses
[cardano-wallet.api-server:Info:209] [2022-07-03 18:59:01.74 UTC] [RequestId 7] POST /v2/addresses 202 Accepted in 0.0018177s
[cardano-wallet.api-server:Info:211] [2022-07-03 18:59:20.48 UTC] [RequestId 8] [GET] /
[cardano-wallet.api-server:Info:211] [2022-07-03 18:59:20.49 UTC] [RequestId 8] GET / 404 Not Found in 0.0046383s
[cardano-wallet.api-server:Info:211] [2022-07-03 18:59:22.72 UTC] [RequestId 9] [GET] /favicon.ico
[cardano-wallet.api-server:Info:211] [2022-07-03 18:59:22.72 UTC] [RequestId 9] GET /favicon.ico 404 Not Found in 0.0005582s
[cardano-wallet.ntp-client:Notice:217] [2022-07-03 19:00:14.53 UTC] ntp client experienced timeout using IPv4 protocol
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:41.31 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:41.31 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:41.31 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:41.34 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:41.51 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:41.66 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:41.82 UTC] Couldn't connect to node (x50). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:43.31 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:43.31 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:43.31 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:43.34 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:43.51 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:43.66 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:43.83 UTC] Couldn't connect to node (x51). Retrying in a bit...
[cardano-wallet.pools-engine:Warning:28] [2022-07-03 18:56:45.29 UTC] Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0007778s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:45.31 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:45.31 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:45.31 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:45.34 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.wallet-engine:Warning:39] [2022-07-03 18:56:45.46 UTC] fe46af51: Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0004949s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:45.51 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.wallet-engine:Warning:50] [2022-07-03 18:56:45.61 UTC] 05313bab: Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0003124s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:45.66 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.wallet-engine:Warning:58] [2022-07-03 18:56:45.78 UTC] 5f3d6588: Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0003123s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:45.83 UTC] Couldn't connect to node (x52). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:47.31 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:47.31 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:47.31 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:47.34 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:47.51 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:47.66 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:47.83 UTC] Couldn't connect to node (x53). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:49.31 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:49.31 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:49.31 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:49.34 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:49.51 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:49.66 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:49.83 UTC] Couldn't connect to node (x54). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:51.31 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:51.31 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:51.31 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:51.34 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:51.51 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:51.66 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:51.83 UTC] Couldn't connect to node (x55). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:53.31 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:53.31 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:53.31 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:53.34 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:53.51 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:53.66 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:53.83 UTC] Couldn't connect to node (x56). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:55.32 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:55.32 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:55.32 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:55.34 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:55.52 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:55.66 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:55.83 UTC] Couldn't connect to node (x57). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:57.32 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:57.32 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:57.32 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:57.34 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:57.52 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:57.66 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:57.83 UTC] Couldn't connect to node (x58). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:56:59.32 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:56:59.32 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:56:59.32 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:56:59.35 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:56:59.52 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:56:59.67 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:56:59.83 UTC] Couldn't connect to node (x59). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:01.32 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:01.32 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:01.32 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:01.35 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:01.52 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:01.67 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:01.83 UTC] Couldn't connect to node (x60). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:03.32 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:03.32 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:03.33 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:03.35 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:03.52 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:03.67 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:03.83 UTC] Couldn't connect to node (x61). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:05.33 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:05.33 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:05.33 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:05.35 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:05.52 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:05.67 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:05.84 UTC] Couldn't connect to node (x62). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:07.33 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:07.33 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:07.33 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:07.35 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:07.52 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:07.68 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:07.84 UTC] Couldn't connect to node (x63). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:09.33 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:09.33 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:09.33 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:09.35 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:09.52 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:09.68 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:09.84 UTC] Couldn't connect to node (x64). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:11.33 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:11.33 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:11.33 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:11.35 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:11.52 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:11.68 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:11.84 UTC] Couldn't connect to node (x65). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:13.33 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:13.33 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:13.33 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:13.35 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:13.52 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:13.68 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:13.84 UTC] Couldn't connect to node (x66). Retrying in a bit...
[cardano-wallet.pools-engine:Warning:28] [2022-07-03 18:57:15.29 UTC] Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0011283s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:15.33 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:15.33 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:15.33 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:15.36 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.wallet-engine:Warning:39] [2022-07-03 18:57:15.46 UTC] fe46af51: Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0010742s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:15.52 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.wallet-engine:Warning:50] [2022-07-03 18:57:15.61 UTC] 05313bab: Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0011999s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:15.68 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.wallet-engine:Warning:58] [2022-07-03 18:57:15.78 UTC] 5f3d6588: Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.0011549s. Current tip is [point genesis]. (not applying blocks)
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:15.84 UTC] Couldn't connect to node (x67). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:17.33 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:17.33 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:17.33 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:17.36 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:17.53 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:17.68 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:17.84 UTC] Couldn't connect to node (x68). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:19.34 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:19.34 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:19.34 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:19.36 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:19.53 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:19.68 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:19.84 UTC] Couldn't connect to node (x69). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:21.34 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:21.34 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:21.34 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:21.36 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:21.53 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:21.68 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:21.84 UTC] Couldn't connect to node (x70). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:23.34 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:23.34 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:23.34 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:23.36 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:23.53 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:23.68 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:23.85 UTC] Couldn't connect to node (x71). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:25.34 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:25.34 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:25.34 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:25.36 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:25.53 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:25.69 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:25.85 UTC] Couldn't connect to node (x72). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:27.34 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:27.34 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:27.34 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:27.36 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:27.53 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:27.69 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:27.85 UTC] Couldn't connect to node (x73). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:29.34 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:29.34 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:29.34 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:29.36 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:29.53 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:29.69 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:29.85 UTC] Couldn't connect to node (x74). Retrying in a bit...
[cardano-wallet.network:Warning:19] [2022-07-03 18:57:31.34 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.network:Warning:17] [2022-07-03 18:57:31.35 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.network:Warning:15] [2022-07-03 18:57:31.34 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.network:Warning:27] [2022-07-03 18:57:31.38 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.network:Warning:38] [2022-07-03 18:57:31.56 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.network:Warning:49] [2022-07-03 18:57:31.71 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.network:Warning:57] [2022-07-03 18:57:31.85 UTC] Couldn't connect to node (x75). Retrying in a bit...
[cardano-wallet.ntp-client:Warning:61] [2022-07-03 19:00:14.54 UTC] local clock is drifting by 1055528μs[cardano-wallet.ntp-client:Warning:61] [2022-07-03 19:00:14.54 UTC] local clock is drifting by 1055528μs
[cardano-wallet.ntp-client:Notice:251] [2022-07-03 19:05:16.22 UTC] ntp client experienced timeout using IPv4 protocol
[cardano-wallet.ntp-client:Warning:61] [2022-07-03 19:05:16.22 UTC] local clock is drifting by 1047689μs```

After few minutes of leaving the node not running any commands the log prints out

[cardano-wallet.network:Info:13] [2022-07-03 18:57:31.78 UTC] Protocol parameters for tip are:
 Decentralization level: 100.00%
 Transaction parameters: [Fee policy: 155381.0 + 44.0x, Tx max size: 16384, max exec units: max steps: 10000000000, max memory: 16000000]
 Desired number of pools: 500
 Minimum UTxO value: 0.034482 per word
 Eras:
   - byron from -0
   - shelley from 74
   - allegra from 102
   - mary from 112
   - alonzo from 154
   - babbage from 215
 Execution unit prices: 721 % 10000000 per step, 577 % 10000 per memory unit

Slotting parameters for tip are:
 Slot length:        1s
 Epoch length:       432000
 Active slot coeff:  5.0e-2
 Security parameter: 2160 block
[cardano-wallet.pools-engine:Notice:28] [2022-07-03 18:57:45.29 UTC] In sync. Applied 3 blocks, 1 rollbacks in the last 30.0021144s. Current tip is [point 6e149939 at slot 62505360].
[cardano-wallet.wallet-engine:Notice:39] [2022-07-03 18:57:45.46 UTC] fe46af51: In sync. Applied 3 blocks, 1 rollbacks in the last 30.0012518s. Current tip is [point 6e149939 at slot 62505360].
[cardano-wallet.wallet-engine:Notice:50] [2022-07-03 18:57:45.61 UTC] 05313bab: In sync. Applied 3 blocks, 1 rollbacks in the last 30.0013963s. Current tip is [point 6e149939 at slot 62505360].
[cardano-wallet.wallet-engine:Notice:58] [2022-07-03 18:57:45.78 UTC] 5f3d6588: In sync. Applied 3 blocks, 1 rollbacks in the last 30.0015796s. Current tip is [point 6e149939 at slot 62505360].

I will share the entire code I am running here


const { Seed, WalletServer } = require('cardano-wallet-js');
let walletServer = WalletServer.init('http://localhost:8090/v2');
    
const genwallet = async () => {
    try {
       
        let recoveryPhrase = Seed.generateRecoveryPhrase();
        let mnemonic_sentence = Seed.toMnemonicList(recoveryPhrase);
        let passphrase = 'password';
        let name = 'tangocrypto-wallet';
            
        let wallet = await walletServer.createOrRestoreShelleyWallet(name, mnemonic_sentence, passphrase);
        console.log(recoveryPhrase);
        console.log(wallet);
  
    } catch (e) {
      console.log(e);
    }
  }
  //genwallet()

  

 const getwalletaddress = async() => {

    try{

        let wallets = await walletServer.wallets();
        let id = wallets[0].id;
        let wallet = await walletServer.getShelleyWallet(id);
        let unusedAddresses = await wallet.getUnusedAddresses();
        let usedAddresses = await wallet.getUsedAddresses();
        let address = await wallet.getNextAddress();    
        let availableBalance = wallet.getAvailableBalance();

        
        //console.log(unusedAddresses);
        //console.log(usedAddresses);
        //console.log(wallet);
        console.log(address)
        console.log(availableBalance)
    } catch(e){
        console.log(e);
    }
  }

getwalletaddress()

The genwallet() function is called once, which generates a recoveryphrase, I then comment out the function and run the getwalletaddress() function which then gives me one unused address and it’s balance. I then send some tADA and rerun the program hoping to see the 0 tADA increased to the amount I had sent (in my case 10 tADA). However, it still shows 0 despite the node being fully sync.

That in your log doesn’t look right and somehow contradicts the

just a few seconds later. :thinking:

This is the full log, apologies if it is long, but you can scroll to the bottom and check, that is where the log from the previous post was taken. Also I am taking the log from docker application, If there is any other way, please let me know. Currently I have stopped the node.

Since the log is too big to be uploaded here, please have a look at the below uploaded pdf to see the complete log. You can use the reference time 18:57 UTC in the log file for easier navigation.

log.pdf (570.1 KB)

I can only see that cardano-wallet lost the connection to cardano-node a few minutes before you were trying your program (which looks good to me). It then reports that it is not synced anymore at all, which would explain, why you got a 0 balance.

A few minutes later it recovers.

Why the connection to the node is lost is not visible in the log. Wild guess: Since it also reports that it cannot reach the time servers (which have nothing to do with Cardano at all), maybe your Internet connection went down and that somehow killed the node?

You could look at the complete log on cardano-node also.

How is docker configured?

Often you need to port forward to be able to talk to the internal ports of the container from other applications. However exit status 137 is a good hint here as that usually means the process ran out of memory so you may need to increase RAM available to docker in the settings as well.

Can try finding error specifics with: docker stack ps --no-trunc | less