question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

On Android, fails to connect to peer over offline Wifi

See original GitHub issue

Setup

I’m currently running Dat v13.7.0 on two Macs (masOS 10.12.3 and 10.12.5) with node v8.1.3 on both and one Nexus 5x (Android 7.1.2) running Termux (v0.53) which I installed Node v6.11.1 into (see https://medium.freecodecamp.org/building-a-node-js-application-on-android-part-1-termux-vim-and-node-js-dfa90c28958f) and Dat v13.7.0 (the usual npm install -g dat). Lastly, I have a two routers set up, one with an Internet connection and one without.

Reproduce it

When the three devices are connected to the router that has an Internet connection, doing dat share, dat clone, dat sync back and forth between all the devices everything works as expected. When using the router without Internet and doing a dat share/dat clone between the two Macs, it takes a while to resolve but eventually everything works as expected. 👍

However while still on the offline router, when trying to dat share from the Android and then dat clone from one of the Macs or the other way around, the device trying to clone gets stuck on “Connecting to dat network…”. The funny thing is I see on the sharing device that “connections” count is increasing as expected, bet then it drops, and then comes back up, over and over without files being transferred.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
okdistributecommented, Jul 25, 2017

Yeah maybe itd be great to have an option on the cli for which connections to use:

Default would be something like –discovery=dns,local,dht also supporting –discovery=local

2reactions
joehandcommented, Jul 24, 2017

May be related to the native modules missing on Android. Mafintosh is getting those built, so we can try again once those are working.

We should also add an --offline or --local option to only use local connections. That will make it easier to debug this as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix internet connection problems on Android devices
Open your Settings app and tap Network & internet or Connections. Depending on your device, these options may be different. Turn Wi-Fi off...
Read more >
Create P2P connections with Wi-Fi Direct - Android Developers
Indicates the state of Wi-Fi Direct connectivity has changed. Starting with Android 10, this is not sticky. If your app has relied on...
Read more >
Wi-Fi Direct (peer-to-peer or P2P) overview
Using these APIs, you can discover and connect to other devices when each device supports Wi-Fi P2P, then communicate over a speedy connection...
Read more >
NetworkException | Android Developers
Error code indicating the IP address being contacted is unreachable, meaning there is no route to the specified host or network. int ...
Read more >
Wi-Fi Network Request API for peer-to-peer connectivity
On Android 10 (API level 29) and higher devices, you can use a new peer to peer API to bootstrap configuration for secondary...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found