<p>tl;dr: Make sure to add a wallet in Sparrow when first connecting to Bitcoin Core.</p>
<p>The cause of this issue is due to BWT requiring the optional <code>keypoololdest</code> field from the RPC call <code>getwalletinfo</code>, which causes it to fail to start when loading a legacy Bitcoin Core wallet that has no keys added to it. I should add that in fact it is the rust-bitcoincore-rpc project that is at fault (out of date) here, which BWT depends on.</p>
<p>Interestingly Bitcoin Core does return the field when a wallet is first created, but does not if the wallet is unloaded and then reloaded (as would happen when restarting Sparrow/Bitcoin Core).</p>
<p>The current solution is to stop both Bitcoin Core and Sparrow, delete the Bitcoin Core wallet, restart both and then make sure to create a wallet in Sparrow before restarting either application (to ensure some keys are added to the Bitcoin Core wallet first).</p>

CC BY-SA 4.0
2022-12-12T11:24:38.983Z
2022-12-12T11:24:38.983Z
Craig Raw
<p>I am really loosing my mind on this. I am actually not a technical noob but also not the very best technican. But things like this should actually be very easy for me.
What I want to do: I just want to connect my freshly set up Sparrow Wallet to my freshly set up Bitcoin Core.</p>
<p>First of all, my setup:</p>
<ul>
<li>Bitcoin Core 23.0 on Windows 10, 64Bit (PC, local network)</li>
<li>Sparrow Wallet 1.7.1 on Linux (Laptop, same local network)</li>
</ul>
<p>I've set up Bitcoin Core on my Windows PC as usual and blocks are up to date.
These lines were added to the &quot;bitcoin.conf&quot;-file on my Bitcoin Core Windows node:</p>
<pre><code>rpcuser=user
rpcpassword=password

[main]
rpcbind=127.0.0.1
rpcbind=192.168.178.111
rpcallowip=127.0.0.1
rpcallowip=192.168.178.199/24
</code></pre>
<p>Where:</p>
<ul>
<li>&quot;rpcbind&quot; - is the local IP address of the Bitcoin Core node on Windows 10</li>
<li>&quot;rpcallowip&quot; - is the local IP address of the laptop where Sparrow Wallet is running on
The subnet mask is &quot;255.255.255.0&quot; so &quot;/24&quot; should be fine.</li>
</ul>
<p>I've set up a few things like firewall rules and so on. I've pressed on &quot;Test connection&quot; hundreds of times and it did not work at all. Somehow, it suddenly worked and I got successfully connected to Bitcoin Core! I was really happy, BUT: After closing the wallet and opening again, it again won't connect at all.
Again, I am getting the following error message:</p>
<pre><code>Could not connect:
Check if Bitcoin Core is running, and the authentication details are correct.
See https://sparrowwallet.com/docs/connect-node.html
</code></pre>
<p>I noticed something really strange as well:
When I click &quot;Test connection&quot; on the laptop in Sparrow Wallet, even when Sparrow Wallet shows the above error, the Bitcoin Core screen changes from &quot;You have no wallet loaded&quot; to a wallet that is named &quot;sparrow&quot; (in Bitcoin Core!) and shows &quot;0.00000000 BTC&quot; (I did not set up any wallet on Sparrow Wallet yet!).</p>
<p>I tried to do some research on this issue but it looks like I am alone with this and feel kinda stupid since I don't get what I am doing wrong ..
I also tried disabling the Windows firewall before connecting Sparrow Wallet to it without any success.</p>
<p>Then I've randomly found <a href="https://github.com/sparrowwallet/sparrow/issues/724" rel="nofollow noreferrer">this issue on Github.</a></p>
<p>I've tried the following workaround stated on the Github issue page:</p>
<ul>
<li>Shutting down Bitcoin Core on Windows</li>
<li>Shutting down Sparrow Wallet on Linux</li>
<li>Deleting a folder called &quot;sparrow&quot; in the Bitcoin Core directory</li>
<li>Starting up Bitcoin Core again</li>
<li>Starting up Sparrow Wallet again
And TADA: It works! It says &quot;Connected to &quot;192.168.178.111:8332&quot;. But only one time! When I close Bitcoin Core or Sparrow Wallet again, it won't connect afterwards. It gives me the above mentioned error again. BUT: When I follow the workaround that I've stated above again, it works again (until I close Bitcoin Core or Sparrow Wallet and open it again). So it only works for a while when I delete the &quot;sparrow&quot; folder in the Bitcoin Core directory.
But only until none of both applications get closed. If I do so, I have to re-apply the stated workaround.</li>
</ul>
<p>Other strange things I've noticed:</p>
<ul>
<li>When I do the workaround and are able to connect Sparrow Wallet to Bitcoin Core, it does NOT show any inbound connection (but Sparrow Wallet says &quot;Connected to..&quot;)</li>
<li>When I add &quot;disablewallet=1&quot; to bitcoin.conf, it does NOT even work with the mentioned workaround (even if it should as far as my understanding is correct)</li>
<li>When entering wrong authentication credentials on purpose, it takes some time until I get the error message &quot;Could not connect&quot; - when I enter them correctly, it shows this error message INSTANTLY! I got the feeling that it actually CAN connect (since the time until the error message shows up is less than a second, compared to when I enter credentials wrong which takes 10-15 seconds until the error message shows up)</li>
</ul>
<p>Can anyone tell me what the actual heck is happening here? That's one of the strangest thing I've ever seen in my 20 year computer carreer. Sure I could just to this workaround every time but I feel kinda uncomfortable to connect/create any wallet with this strange issue being present.</p>
<p>I should mention that a VPN software is running on both machines. Anyways, it works when applying the workaround even with VPNs on (I've enabled the &quot;Local Connections&quot; options within both VPN GUIs). But it also does not work without following the workaround when both VPN softwares are completely closed and shut down. So the VPN can't be the cause of this issue I think.</p>
<p>I really appreciate any kind of help!
Is there any possibility that this is a serious issue by Sparrow Wallet and not my fault at all?</p>
<p>Thanks for any help in advance!</p>

<bitcoin-core><bitcoin.conf><connection><sparrow-wallet><bwt>
Really strange issue when trying to connect Sparrow Wallet to Bitcoin Core
Exchange_REC
# Really strange issue when trying to connect Sparrow Wallet to Bitcoin Core

(Asked by: username_0 on 2022-12-08)

I am really loosing my mind on this. I am actually not a technical noob but also not the very best technican. But things like this should actually be very easy for me.
What I want to do: I just want to connect my freshly set up Sparrow Wallet to my freshly set up Bitcoin Core.

First of all, my setup:

* Bitcoin Core 23.0 on Windows 10, 64Bit (PC, local network)
* Sparrow Wallet 1.7.1 on Linux (Laptop, same local network)

I've set up Bitcoin Core on my Windows PC as usual and blocks are up to date.
These lines were added to the "bitcoin.conf"-file on my Bitcoin Core Windows node:

```
rpcuser=user
rpcpassword=password

[main]
rpcbind=127.0.0.1
rpcbind=192.168.178.111
rpcallowip=127.0.0.1
rpcallowip=192.168.178.199/24

```

Where:

* "rpcbind" - is the local IP address of the Bitcoin Core node on Windows 10
* "rpcallowip" - is the local IP address of the laptop where Sparrow Wallet is running on
  The subnet mask is "255.255.255.0" so "/24" should be fine.

I've set up a few things like firewall rules and so on. I've pressed on "Test connection" hundreds of times and it did not work at all. Somehow, it suddenly worked and I got successfully connected to Bitcoin Core! I was really happy, BUT: After closing the wallet and opening again, it again won't connect at all.
Again, I am getting the following error message:

```
Could not connect:
Check if Bitcoin Core is running, and the authentication details are correct.
See https://sparrowwallet.com/docs/connect-node.html

```

I noticed something really strange as well:
When I click "Test connection" on the laptop in Sparrow Wallet, even when Sparrow Wallet shows the above error, the Bitcoin Core screen changes from "You have no wallet loaded" to a wallet that is named "sparrow" (in Bitcoin Core!) and shows "0.00000000 BTC" (I did not set up any wallet on Sparrow Wallet yet!).

I tried to do some research on this issue but it looks like I am alone with this and feel kinda stupid since I don't get what I am doing wrong ..
I also tried disabling the Windows firewall before connecting Sparrow Wallet to it without any success.

Then I've randomly found [this issue on Github.](https://github.com/sparrowwallet/sparrow/issues/724)

I've tried the following workaround stated on the Github issue page:

* Shutting down Bitcoin Core on Windows
* Shutting down Sparrow Wallet on Linux
* Deleting a folder called "sparrow" in the Bitcoin Core directory
* Starting up Bitcoin Core again
* Starting up Sparrow Wallet again
  And TADA: It works! It says "Connected to "192.168.178.111:8332". But only one time! When I close Bitcoin Core or Sparrow Wallet again, it won't connect afterwards. It gives me the above mentioned error again. BUT: When I follow the workaround that I've stated above again, it works again (until I close Bitcoin Core or Sparrow Wallet and open it again). So it only works for a while when I delete the "sparrow" folder in the Bitcoin Core directory.
  But only until none of both applications get closed. If I do so, I have to re-apply the stated workaround.

Other strange things I've noticed:

* When I do the workaround and are able to connect Sparrow Wallet to Bitcoin Core, it does NOT show any inbound connection (but Sparrow Wallet says "Connected to..")
* When I add "disablewallet=1" to bitcoin.conf, it does NOT even work with the mentioned workaround (even if it should as far as my understanding is correct)
* When entering wrong authentication credentials on purpose, it takes some time until I get the error message "Could not connect" - when I enter them correctly, it shows this error message INSTANTLY! I got the feeling that it actually CAN connect (since the time until the error message shows up is less than a second, compared to when I enter credentials wrong which takes 10-15 seconds until the error message shows up)

Can anyone tell me what the actual heck is happening here? That's one of the strangest thing I've ever seen in my 20 year computer carreer. Sure I could just to this workaround every time but I feel kinda uncomfortable to connect/create any wallet with this strange issue being present.

I should mention that a VPN software is running on both machines. Anyways, it works when applying the workaround even with VPNs on (I've enabled the "Local Connections" options within both VPN GUIs). But it also does not work without following the workaround when both VPN softwares are completely closed and shut down. So the VPN can't be the cause of this issue I think.

I really appreciate any kind of help!
Is there any possibility that this is a serious issue by Sparrow Wallet and not my fault at all?

Thanks for any help in advance!

**Tags:** bitcoin-core, bitcoin.conf, connection, sparrow-wallet, bwt


---

## 1 answers

### Answer by username_1 on 2022-12-12. Score: 1

tl;dr: Make sure to add a wallet in Sparrow when first connecting to Bitcoin Core.

The cause of this issue is due to BWT requiring the optional `keypoololdest` field from the RPC call `getwalletinfo`, which causes it to fail to start when loading a legacy Bitcoin Core wallet that has no keys added to it. I should add that in fact it is the rust-bitcoincore-rpc project that is at fault (out of date) here, which BWT depends on.

Interestingly Bitcoin Core does return the field when a wallet is first created, but does not if the wallet is unloaded and then reloaded (as would happen when restarting Sparrow/Bitcoin Core).

The current solution is to stop both Bitcoin Core and Sparrow, delete the Bitcoin Core wallet, restart both and then make sure to create a wallet in Sparrow before restarting either application (to ensure some keys are added to the Bitcoin Core wallet first).


---

