Closed farhoud closed 1 year ago
Can you please elaborate on the issue?
There is 2 major issue with Libp2p on android:
For this problem I am a bit unclear on what the issue is? We have a working DNS on react-native that resolves fx.land relay server to enable the app connect to any blox backend. Can you elaborate on the problem? Here is the current relay that RN can use without issue: /dns/relay.dev.fx.land/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit/p2p/[Blox perId]
we are not calling InterfaceAddrs anywhere Maybe a good idea to write the steps needed to break the app, so that we can see what is the exact breaking point
hi @farhoud how did you resolve this?
@farhoud This line here causes the issue you mentioned (and another line in flush) https://github.com/functionland/go-fula/blob/32cf82417a72ea382405d953da62f31f4e2f118d/mobile/client.go#L62
DESCRIPTION: The error is populated on this line of go when we compiled it for Android and imported in JAVA: https://github.com/functionland/go-fula/blob/32cf82417a72ea382405d953da62f31f4e2f118d/mobile/client.go#L62
route ip+net: netlinkrib: permission denied seems that error: route ip+net: netlinkrib: permission denied is a real thing and not gone yet. It affects anything that requires discovery in the network like mdns. probabely in the features you added it is used as well since hte issue is not closed I suspect it is still a thing: https://github.com/golang/go/issues/40569#issuecomment-1050381441
seems they kinda solved it in ipfs shipyad, but could not fully understand how to implement in ours as well: https://github.com/search?q=repo%3Aipfs-shipyard%2Fgomobile-ipfs%20MDNSLockerDriver%20&type=code seems this part on Android is doing the action and htey passed it to go: WifiManager wifi = (WifiManager) this.reactContext.getSystemService(Context.WIFI_SERVICE); WifiManager.MulticastLock multicastLock = wifi.createMulticastLock("multicastLock"); multicastLock.setReferenceCounted(true); multicastLock.acquire();
also I am not sure if anywhere we need this one? https://github.com/golang/go/issues/40569#issuecomment-1191731266
@hhio618
First you should patch the underlining packages: https://github.com/w3-voice/go-multiaddr/commit/224cf7db3e8a57f7b884d647808935cee0312065
create a net driver interface the same as go network driver interface
https://github.com/w3-voice/app/blob/main/go/driver_net.go
And implement the interface in java then
https://github.com/w3-voice/app/blob/main/android/core/src/main/java/fx/android/core/NetDriver.java
And then override the java driver with go driver: https://github.com/w3-voice/app/blob/f6a901464797c98e31b66fd75292086240d39227/android/core/src/main/java/fx/android/core/CoreService.java#L131
Hi guy's I have fixed these issues on the react-native project hoodchat If you want i can create PR