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

Bug: Connection to Bitcoin node via Tor not possible (SW:Win, SD:Android) #1046

Open
1 task done
lasermind opened this issue Dec 6, 2024 · 0 comments
Open
1 task done

Comments

@lasermind
Copy link

lasermind commented Dec 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After enabling Tor in the apps settings, the user sets up his own Bitcoin node by providing the credentials for the Electrum server (*.onion, port 50001, Tor traffic). Testing the connection fails after roughly 30s and a red "server unreachable" note appears. No connection is established.

This happens with Stack Wallet 2.1.9 on Windows and Stack Duo 1.2.4 on Android.

stackwallet-win-tor-connection-error

Expected Behavior

When testing the connection or connecting to an already saved connection, the connection should be established, with no error.

Reproduce Steps

In Stack Wallet or Stack Duo:
· Enable Tor (in Tor Settings)
· Provide credentials to a Bitcoin node (Electrum) behind Tor (in Manage nodes)
· Tap "Test connection" button
· Test should be successful

Environment

Behaviour occurs in:
· Stack Wallet 2.1.9 on Windows 11
· Stack Duo 1.2.4 on Android 11
(… and most likely in all other permutations.)

It is not clear, whether Stack Wallet/Duo spins up its own Tor proxy or expects a Tor proxy to be present (Tor Browser, or daemon). There is no documentation on this. I assumed it spins up its own proxy, for user friendlyness. However, I tested all two scenarios; the outcome was the same: not working.

Also please note: I can connect without a problem to the Electrum server via Tor using Sparrow Wallet. So it is not a problem on the node side, with the network connection, or anything else. There must be something wrong with Stack Wallet/Duo.

Also: Stack Wallet/Duo can connect locally to the node (by providing the clearnet IP address from the local network) and not using a Tor connection. So all this suggests, that there is something wrong with the Tor implementation.

Logs and further Information

Here I post the logs from Stack Wallet 2.1.9 on Windows:

As text
[Info][2024-12-06 15:59:44.009Z]: TorSyncStatusChangedEvent fired with arg newStatus = TorConnectionStatus.connecting (TorService.start call in progress)
[Info][2024-12-06 15:59:44.556Z]: User does not want to use external calls
[Info][2024-12-06 15:59:44.678Z]: TorSyncStatusChangedEvent fired with arg newStatus = TorConnectionStatus.connected (TorService.start call success)
[Warning][2024-12-06 15:59:44.678Z]: TorStatusChangedEvent changed to "TorStatus.enabled" with message: useTor updated in prefs
[Info][2024-12-06 16:01:44.557Z]: User does not want to use external calls
[Info][2024-12-06 16:03:44.556Z]: User does not want to use external calls
[Info][2024-12-06 16:04:44.557Z]: User does not want to use external calls
[Info][2024-12-06 16:06:44.557Z]: User does not want to use external calls
[Info][2024-12-06 16:09:11.952Z]: User does not want to use external calls

stackwallet-win-tor-connection-error-log



And here the log from Stack Duo 1.2.4 on Android:

As text
[Info][2024-12-06 18:28:43.277Z]: TorSyncStatusChangedEvent fired with arg newStatus = TorConnectionStatus.connecting (TorService.start call in progress)
[Info][2024-12-06 18:28:44.118Z]: TorSyncStatusChangedEvent fired with arg newStatus = TorConnectionStatus.connected (TorService.start call success)
[Warning][2024-12-06 18:28:44.118Z]: TorStatusChangedEvent changed to "TorStatus.enabled" with message: useTor updated in prefs
[Info][2024-12-06 18:29:04.340Z]: User does not want to use external calls
[Info][2024-12-06 18:29:07.223Z]: Periodic notifications update check
[Info][2024-12-06 18:30:04.340Z]: User does not want to use external calls
[Info][2024-12-06 18:30:07.224Z]: Periodic notifications update check
[Info][2024-12-06 18:30:48.452Z]: This is the .swb content from intent: null
[Info][2024-12-06 18:31:00.037Z]: This is the .swb content from intent: null

stackwallet-android-tor-connection-error-log


Hope this helps, to get a clue, what this error is all about!

Thanks!
✌️ L

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

1 participant