Local discovery problem on Android 11

Hello all,

I am using the syncthing-fork for android and local discovery is not working (see also here: 735#) I have these logs when I activated beacon logs:

2020-12-29 11:44:31 Enabled debug data for "beacon"
2020-12-29 11:44:33 route ip+net: netlinkrib: permission denied
2020-12-29 11:44:33 Stopped broadcastBeacon writer: route ip+net: netlinkrib: permission denied
2020-12-29 11:44:33 broadcastBeacon: Failed service 'Service@0x40000d66c0 created by broadcastBeacon@0x4000138230/writer' (1.999843 failures of 2.000000), restarting: true, error: "{Service@0x40000d66c0 created by broadcastBeacon@0x4000138230/writer Service@0x40000d66c0 created by broadcastBeacon@0x4000138230/writer} returned unexpectedly", stacktrace: [unknown stack trace]
2020-12-29 11:44:33 Starting broadcastBeacon writer
2020-12-29 11:45:03 route ip+net: netlinkrib: permission denied
2020-12-29 11:45:03 Stopped broadcastBeacon writer: route ip+net: netlinkrib: permission denied
2020-12-29 11:45:03 broadcastBeacon: Failed service 'Service@0x40000d66c0 created by broadcastBeacon@0x4000138230/writer' (1.999810 failures of 2.000000), restarting: true, error: "{Service@0x40000d66c0 created by broadcastBeacon@0x4000138230/writer Service@0x40000d66c0 created by broadcastBeacon@0x4000138230/writer} returned unexpectedly", stacktrace: [unknown stack trace]
2020-12-29 11:45:03 Starting broadcastBeacon writer
2020-12-29 11:45:31 Exiting backoff state.
2020-12-29 11:45:31 Starting multicastBeacon writer
2020-12-29 11:45:31 Starting multicastBeacon reader
2020-12-29 11:45:31 route ip+net: netlinkrib: permission denied
2020-12-29 11:45:31 Stopped multicastBeacon writer: route ip+net: netlinkrib: permission denied
2020-12-29 11:45:31 multicastBeacon: Failed service 'Service@0x40000d6d80 created by multicastBeacon@0x40001382d0/writer' (1.000000 failures of 2.000000), restarting: true, error: "{Service@0x40000d6d80 created by

When you need more information, please let me know.

Hi, does any “Android freak” know if there have been changes to broadcast restrictions in Android 11? I’m still on 10 using a Xiaomi phone and local discovery works as expected. I can’t test this with 11 on the emulator as it does NAT the virtual phone “to” my physical computers running Syncthing. Could this also be a bug in Synching or does the error point to the OS as cause?

I know of generic restrictions in Android, but they were never a dealbreaker for Syncthing Android in the past, e.g. https://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock . Btw we do not aquire special multicast permissions in the app despite other big players like for example BubbleUPNP doing so to be able to use broadcasts.

It seems to be working for me on Android 11.

2020-12-29 20:54:42 sent 515 bytes to 192.168.0.255:21027 2020-12-29 20:54:42 write udp [::]:43262->[ff12::8384]:21027: sendmsg: network is unreachable on write to [ff12::8384]:21027 bond0 2020-12-29 20:54:42 sent 515 bytes to [ff12::8384]:21027 on wlan0 2020-12-29 20:54:42 write udp [::]:43262->[ff12::8384]:21027: sendmsg: network is unreachable on write to [ff12::8384]:21027 wlan1 2020-12-29 20:54:42 write udp [::]:43262->[ff12::8384]:21027: sendmsg: network is unreachable on write to [ff12::8384]:21027 p2p0 2020-12-29 20:54:42 recv 515 bytes from [fe80::b479:c9ff:fe98:1b28%wlan0]:43262 2020-12-29 20:54:58 recv 452 bytes from 192.168.0.102:35263 2020-12-29 20:54:58 recv 452 bytes from [fe80::c069:fd7f:5856:50e9%wlan0]:44536

1 Like