clostra / newnode

NewNode decentralized Content Distribution Network
http://newnode.com
GNU General Public License v2.0
453 stars 39 forks source link

Couldn't get NearBy to work on Android #123

Open spring-reverb opened 2 years ago

spring-reverb commented 2 years ago

Hello! We are trying out the NearBy feature of newnode. It works fine on iOS. However, we couldn't get it to work on Android.

We tried an experiment on 4 different androids (at the same time): Xiaomi with Android 10, Huawei with Android 10, Google Pixel with Android 12, Xiaomi with Android 6.

Basically, we disabled wifi and cellular on one of the phones and tried to fetch some data several times (clicking the button in ui several times) on that phone. The same app were running on all of the devices and only on of the devices didn't have an internet connection at the time. We repeated that process on each phone.

We haven't received any data on any of the smartphones.

By the way, NewNode works fine if we enable wifi and "ban" the requested resource through firewall on network side. But in this scenario it does not use NearBy.

There are quite a lot of logs from newnode and it looks like something is happening with nearby. It discovers something. It registers something, etc…

Here are the sources for the test app: https://github.com/spring-reverb/nn_near_by_check

The test application sends GET request to https://dummy.restapiexample.com/api/v1/employee/2 and shows the result in a toast (or an exception message) when you click on the "mail" button.

spring-reverb commented 2 years ago

Log files from the devices during experiments: huawei_android_10.log

pixel_android_12.log

xiaomi_android_6.log

xiaomi_android_10.log

ghazel commented 2 years ago

Google Nearby does use Wifi, so disabling it will break the test. Instead, disassociate with the wireless router you have.

spring-reverb commented 2 years ago

@ghazel We tried to test the way you described ("forgetting" the wifi network), but it didn't work either.

Could you please try the same experiment with our test app? Maybe we are doing something else wrong?