ipfs-shipyard / js-libp2p-react-native

A demo app running js-libp2p in a React Native app
7 stars 3 forks source link

WebRTC support. #7

Open sleep9 opened 3 months ago

sleep9 commented 3 months ago

https://github.com/libp2p/js-libp2p/discussions/2445

Please see this discussion for details of the problem. The react-native app I am using is a clone of this repo with react-native-webrtc installed. Not sure if this problem is a native library issue or not.

This may be relevent output from libp2p debug

libp2p:webrtc:error initiator error parsing ICE candidate +0ms [TypeError: `sdpMLineIndex` and `sdpMid` must not null]

....

 DEBUG  libp2p:connection-manager:dial-queue dial to /ip4/${ip_address}/tcp/${port}/ws/p2p/12D3KooWSFr7xJnyREpieyX5sGw2mCzc4k6LEa2KEBkXNhYXoVhB/p2p-circuit/webrtc/p2p/12D3KooWDYhZLWM7XagHSf9HSZT338UN9LesS1ckQRhdnnQSSkk6 succeeded +5s
 DEBUG  libp2p:webrtc:stream:outbound:5 channel state is "connecting" and not "open", waiting for "open" event before sending data +8ms

relevent modules "react-native-webrtc": "^118.0.3" "@libp2p/webrtc": "^4.0.22" "react-native": "0.72.6"

relevent pods react-native-webrtc: 6fc32f3d556aa60aa2334eeaf6cadcdab2432809 JitsiWebRTC: 3a41671ef65a51d7204323814b055a2690b921c7

sleep9 commented 3 months ago

I will send 100 USDT/USDC or equivalent in ETH to anyone who solves this issue.