localsend icon indicating copy to clipboard operation
localsend copied to clipboard

Unable to connect by IP via Tailscale

Open KlfJoat opened this issue 1 year ago • 4 comments

Describe the bug

I cannot get devices to connect in LocalSend via their Tailscale IPv4 addresses. #1123 has user-submitted anecdotes that LocalSend works when entering the Tailscale IP addresses of other device either as a Favorite or for a targeted send. But that does not work for me.

A different sharing app (KDE Connect) that works much like LocalSend operates just fine with Tailscale IPs. Like LocalSend, by default it finds devices with the complementary app via multicast. Also like LocalSend, it allows for specifying devices by IP. But unlike LocalSend, it connects when a Tailscale IP address is entered. So I can guarantee that traffic passes properly between the devices via Tailscale IPs.

I have tried this between 3 devices. My phone as the primary, because it's easy to take off of local Wi-Fi, and my tablet and desktop connected to my home network. I have removed them as Favorites from each other. I did not have a problem connecting between my tablet and desktop (though there was some weirdness, mentioned in Context, below).

I also tried 2 versions of LocalSend on my Android devices. I started with the F-Droid version, then switched to the Play Store version in case there was a problem in how F-Droid compiled the app.

To reproduce

  1. Disconnect phone from Wi-Fi.
  2. Start Tailscale on phone, tablet, and desktop.
  3. Install & open LocalSend on all 3 devices.
  4. Click on the 'i' icon on a receiving device.
  5. On phone (sending device), tap on Send tab.
  6. On phone, tap on Text button, enter 'blah' as placeholder, tap Confirm.
  7. On phone, tap on Manual Sending (arrow & target icon).
  8. On phone, tap IP Address.
  9. Enter the Tailscale IPv4 address of an open LocalSend app.
  10. Tap Confirm.
  11. Receive message "Error" within 5 seconds.
  12. Tap the 'i' icon. Receive message "[RhttpTimeoutException] Request timed out. URL: https://100.1.2.3:53317/api/localsend/v1/info"
  13. Go to KDE Connect and make the same connection between the same devices, sending the same 'blah' placeholder text.
  14. Repeat steps 6 to 12 to verify that there wasn't some transient network issue that KDE Connect took advantage of or magically resolved.

Expected behavior

Two LocalSend instances to 'see' each other after I enter the IP address of the other.

Screenshots

No response

Desktop (please complete the following information)

  • OS: Ubuntu 24.10 (Oracular)
  • Version: 1.16.1 installed from snap

Smartphone (please complete the following information)

Phone

  • Device: Android - Google Pixel 7 Pro
  • OS: Android 15, build AP4A.250205.002 (meaning I have the February 2025 security update)
  • Version 1: 1.16.1 (563) installed from F-Droid
  • Version 2: 1.16.1 (56) installed from Google Play

Tablet

  • Device: Android - Google Pixel Tablet
  • OS: Android 15, build AP4A.250205.002 (meaning I have the February 2025 security update)
  • Version 1: 1.16.1 (563) installed from F-Droid
  • Version 2: 1.16.1 (56) installed from Google Play

Additional context

I understand that Tailscale may not be a supported use case. However, it seems to me like this should work no matter what. I don't have any Tailscale ACLs or any fancy configuration for this.

#1703 seems like it may fix auto-connections across networks. But even if it does, the fact that entering direct IP addresses doesn't work here would remain.

Desktop-Tablet weirdness

My tablet and desktop are on the same router, though on separate VLANs. My router is set to allow multicast traffic to pass between VLANs. However, the devices do not find each other. Other applications, like KDE Connect, Google Home/Nest, and others, do work across the networks. But that's not the weird part...

When I entered the Tailscale IP of my tablet from my desktop (and vice versa), that DID work! It was the only Tailscale IP connection between any of the 3 devices that worked. I cannot figure out why that might be.

KlfJoat avatar Feb 06 '25 18:02 KlfJoat

It works for me on Linux and Android though. When I click the info button on the top-right corner of the "Receive" page, I can find my device's Tailscale IP address in the "IP" section.

GZGavinZhao avatar Feb 20 '25 02:02 GZGavinZhao

I know that it works for some people. The second sentence I wrote acknowledges that. I linked to another issue where people said it worked for them.

KlfJoat avatar Feb 20 '25 15:02 KlfJoat

Does this issue still occur if you use the deb/appimage/tar.gz?

evanmohr avatar Feb 24 '25 16:02 evanmohr

Must start tailscale first, then start LocalSend (Not only restart server, must exit APP and enter again)

xz-dev avatar May 30 '25 12:05 xz-dev

It works for me on Linux and Android though. When I click the info button on the top-right corner of the "Receive" page, I can find my device's Tailscale IP address in the "IP" section.

It works for me too, but I wish we could save the device and add it to Favorites. As it is now we have designate the target manually everytime.

mptpro avatar Oct 02 '25 04:10 mptpro