Blockstream / green_android

Blockstream Green Wallet for Android
GNU General Public License v3.0
176 stars 74 forks source link

Wallet does not connect to electrum personal server #165

Open Tracachang opened 1 year ago

Tracachang commented 1 year ago

Description

Singlesig wallet.

In app settings, I enable tor and electrum personal server, I paste my electrs server address.onion:50001.

When I clicked in wallet it showed the correct block height while my electrs server was off, which it means that green wallet is connecting somewhere else.

Version

3.9.2 downloaded from github release

Steps to reproduce

I have deleted the app, reinstalled, in app settings enabled tor and electrum personal server, I have tried writing my address.onion:50001, myaddress.onion.50001, mylolznode.onion:50001, no matter what I write, I can see the correct block height when I click in wallet, looks like if the wallet just ignores what I write in EPS field.

Expected behavior

The expected behavior is that if my server is off or I've entered an invalid address, to not display the correct block height, or prompt an error like no server available

Actual behaviour

No matter what I write in the field, the wallet will display the correct block height, meaning that is connecting to another server instead of what I've set in the EPS field.

Device or machine

Android 13

Tracachang commented 1 year ago

Doing a few tests, I've realized that if instead of using tor built in app, I use orbot, I am able to connect to my node (I can confirm because I see it in electrs logs) and if turn off my electrs server, it just says connecting... and when I click in bitcoin wallet it shows block height 0 (as expected). I am also able to connect on lan and same behavior.

But as soon as "tor built in" is activated it seems to ignore the field "electrum personal server"

domegabri commented 1 year ago

Hello @Tracachang , thanks for your detailed report. We have identified the issue and working on a fix. The fix will be released first for our beta users, so if you want to check this as soon as its available on beta you should join our beta program. You can read more here.

Tracachang commented 1 year ago

Thank you @domegabri ! When I do connect to my electrs server with blockstream green, in logs I can see this warning which it may be worth showing you:

INFO electrs::electrum] your wallet uses less efficient method of querying electrs, consider contacting the developer of your wallet. Reason: blockchain.scripthash.get_history called for unsubscribed scripthash

I've tried it with 3.9.2 and also with the beta in another device, in both cases I get the same warning.

lebr0n23 commented 1 year ago

Doing a few tests, I've realized that if instead of using tor built in app, I use orbot, I am able to connect to my node (I can confirm because I see it in electrs logs) and if turn off my electrs server, it just says connecting... and when I click in bitcoin wallet it shows block height 0 (as expected). I am also able to connect on lan and same behavior.

But as soon as "tor built in" is activated it seems to ignore the field "electrum personal server"

I can confirm, it works fine connecting to my node with orbot. With in-app tor it keeps saying "connecting...".

GitKalle commented 6 months ago

I stuck at this as well. Does the green wallet use encrypted communication?

Error from Electrum server:

[2023-12-13T17:17:49.265Z WARN  electrs::server] InvalidData on first line may indicate client attempted to connect using SSL when server expects unencrypted communication.
[2023-12-13T17:17:49.265Z WARN  electrs::thread] recv_loop thread failed: 206: recv failed
[2023-12-13T17:17:49.265Z WARN  electrs::thread] because: stream did not contain valid UTF-8
DaveSpe commented 5 months ago

This is still an issue, in Jan of 2024. I have ran into so many issues with this wallet I might dump the hardware and move to a ColdCard, not worth the headache for advanced Bitcoining.

domegabri commented 5 months ago

@GitKalle are you using both tor and tls? what is your input in the custom electrum server field?

Tracachang commented 5 months ago

I stuck at this as well. Does the green wallet use encrypted communication?

Error from Electrum server:

client attempted to connect using SSL when server expects unencrypted communication.

Try to use the port 50001 instead.

This is still an issue, in Jan of 2024. I have ran into so many issues with this wallet I might dump the hardware and move to a ColdCard, not worth the headache for advanced Bitcoining.

After I opened the issue, it was fixed really fast.

GitKalle commented 5 months ago

@GitKalle are you using both tor and tls? what is your input in the custom electrum server field?

I don't use Tor or TLS. Just enter the local IP address and port (IP:Port) of my Network at "Bitcoin Electrum Server". The field "Liquid Electrum Server" is empty.

Try to use the port 50001 instead.

I use 50001.

My Electrum wallet works without problems. I can connect via Tor (no TLS) and via local network.

f321x commented 1 month ago

Maybe these issues are related: https://github.com/Blockstream/green_android/issues/203

sha-265 commented 2 weeks ago

Is insecure connection to Electrum server supported by green anyway?