Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specter app not reachable after Update of Bitcoin Core #1712

Open
Funman2 opened this issue Oct 30, 2024 · 13 comments
Open

Specter app not reachable after Update of Bitcoin Core #1712

Funman2 opened this issue Oct 30, 2024 · 13 comments

Comments

@Funman2
Copy link

Funman2 commented Oct 30, 2024

Hi, I have Umbrel Home, after the latest update of Bitcoin core today 28.0 my beloved and often used Specter app on Umbrel does not funktion anymore ;-( the app is not reachable.

@Funman2
Copy link
Author

Funman2 commented Oct 30, 2024

Here are the logs:
umbrel_specter-desktop_2024-10-30_08-35.log

@Funman2
Copy link
Author

Funman2 commented Oct 30, 2024

image

Server error
Exception
'error'
Back to the main page
Details
version: v2.0.2
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1521, in full_dispatch_request
rv = self.preprocess_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1861, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/server_endpoints/controller.py", line 207, in selfcheck
if app.specter.rpc is not None:
File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/specter.py", line 262, in rpc
return self.node.rpc
File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/node.py", line 756, in rpc
self._rpc = self._get_rpc()
File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/node.py", line 395, in _get_rpc
rpc_conf_arr = autodetect_rpc_confs(
File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/rpc.py", line 219, in autodetect_rpc_confs
rpc.getmininginfo()
File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/rpc.py", line 508, in fn
if r["error"] is not None:
KeyError: 'error'

Please let us know! Create an issue or ping us on Telegram to fix it.

@Funman2
Copy link
Author

Funman2 commented Oct 30, 2024

@Funman2
Copy link
Author

Funman2 commented Nov 1, 2024

Of course I tried to restart umbrel;-)

I haven't tried to reinstall Specter though.
Wouldn't I loose my database for Specter then? Because now I can't back it up anymore...

@Funman2
Copy link
Author

Funman2 commented Nov 1, 2024

It seems to be an issue with the new Bitcoin core app ( v 28)
Also external Specter app can not connect to RPC anymore, no matter which address I tried ( umbrel.local, Tailscale, Ip, etc) , also tried to increase the max threads for RPC to 500. Did not help.

@Funman2
Copy link
Author

Funman2 commented Nov 1, 2024

Bildschirmfoto vom 2024-11-01 08-38-27

@Funman2
Copy link
Author

Funman2 commented Nov 1, 2024

with sparrow i get this error:
grafik

@Funman2
Copy link
Author

Funman2 commented Nov 1, 2024

also found these error messages a lot in bitcoin app protocols, although I tried in Advanced Properties to increase RPC call limit up to 1000:
bitcoin_bitcoind_1 | 2024-11-01T05:32:10Z New block-relay-only v2 peer connected: version: 70016, blocks=868360, peer=160
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting
bitcoin_bitcoind_1 | 2024-11-01T05:35:58Z WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting

@nmfretz
Copy link
Contributor

nmfretz commented Nov 4, 2024

Hey @Funman2, thanks for this report and for including your logs 👌.

I've looked into this and what I think has happened is that Specter Desktop is incorrectly parsing responses from Bitcoin Core and erroring out even though completely valid responses are sent back.

The relevant error is:

File "/usr/local/lib/python3.10/site-packages/cryptoadvance/specter/rpc.py", line 508, in fn
if r["error"] is not None:
KeyError: 'error'

Line 508 in Specter's code is assuming that an error field is always returned when that is not the case for JSON-RPC 2.0 responses (either a result OR error is returned). Core v28 only just started sending JSON-RPC 2.0 responses (Specter already makes 2.0 requests), so the Specter devs probably never realized that they were always parsing 2.0 responses incorrectly.

I'll open an issue on their Github explaining what I think is happening. Hopefully they can turn around a quick fix, since this impacts all Specter Desktop users who run Bitcoin Core v28, not just umbrelOS users. Thanks again for the report.


Sparrow Desktop

The Sparrow issue you're facing is not related. What you're seeing here is that Bitcoin Core is not accepting an RPC request from your computers IP Address (or whatever you're running Sparrow Desktop on).

You can get around this by adding rpcallowip=your-ip-address-for-specter-device to your bitcoin.conf file, but I would strongly recommend not connecting Sparrow Desktop to Bitcoin Core this way.

Say you have successfully connected Sparrow Desktop to Bitcoin Core running on your umbrel over your local network. But now you go somewhere with your laptop that's running Sparrow and connect to a public wifi network (for example at a coffee shop)... Sparrow will now be broadcasting your Bitcoin Core credentials in plain text over the public WiFi!

Instead, the recommended way to connect Sparrow Desktop is to run the Electrs app on your Umbrel and connect Sparrow to that. You can safely do this without any risk of exposing your Bitcoin Core credentials. You can also connect to Electrs over Tor or else use Tailscale to securely connect remotely.

@nmfretz
Copy link
Contributor

nmfretz commented Nov 4, 2024

Looks like someone else has found the same thing and opened an Issue already, so I've added to it here: cryptoadvance/specter-desktop#2473

Would be fantastic if you could drop by the issue @Funman2 and add a reaction to OP's comment so Specter Devs see activity.

@Funman2
Copy link
Author

Funman2 commented Nov 4, 2024

Hey thanks for the in depht response!
Glad it's not my umbrel home server that's the problem , like ssd or something.
..
I have read the temp solution but can't find the rpc.py code in umbrel app when ssh - ing into umbrel...
Also on Desktop PCsI use the downloadable Specter desktop binaries for Linux and Windows not the python code version, so won't know how to fix myself.

For Sparrow of course I am using Electrs always to connect. ;-)
It was just a way of testing rpc availability for me.
Thanks a lot for the detailed explanations!

@nmfretz
Copy link
Contributor

nmfretz commented Nov 4, 2024

I have read the temp solution but can't find the rpc.py code in umbrel app when ssh - ing into umbrel...
Also on Desktop PCsI use the downloadable Specter desktop binaries for Linux and Windows not the python code version, so won't know how to fix myself.

Ah ya, unfortunately we'll need to wait for Specter devs to make the fix and release a new Docker image that we can use to update the app on Umbrel. If they don't respond soon we also have the option of forking the code, making the fix, and building an image ourselves to temporarily get relief for umbrel users, but it would be really nice to keep using the official images.

FYI, I have also posted in the Specter Desktop telegram and DM'd some devs separately.

For Sparrow of course I am using Electrs always to connect. ;-)
It was just a way of testing rpc availability for me.

Ha, excellent. I was mostly just trying to cover my bases after I posted something that people could screw themselves over with!

@Funman2
Copy link
Author

Funman2 commented Nov 5, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@nmfretz @Funman2 and others