peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

Dropping calls immediately

Open cuuupid opened this issue 7 years ago • 11 comments

I'm using the latest stable JS from the website.

The issue occurs on certain public networks. In this case, the connection is going through the TURN server presumably (I'm 100% sure the TURN server is in use because I'm able to call w/ my Android smartphone which is on LTE), but the call is IMMEDIATELY disconnected. The stream is delivered and an answer is made on both ends, but the call drops almost instantly.

image

I'm behind a normal NAT and the peer is also behind normal NAT.

This issue occurs with that peer specifically with every other configuration, so I at first thought it was a wireless issue. However, it is able to communicate with other WebRTC solutions, even my raw/simple webrtc trial with a turn server. It's just when using PeerJS that the connection is immediately dropped.

I tried implementing the changes discussed in #347 regarding sdpMid but this made no improvement.

I'm a bit lost and there doesn't seem to be any other logs other than the ones pictured above, can someone point me in the right direction?

cuuupid avatar Mar 07 '19 21:03 cuuupid

I'm now experiencing different behaviour. Now, the peers stay connected, and a MediaStream is delivered. However, the stream contains no real video or audio. It's just a black screen with no sound.

It works with nearly every other wireless network. Also, other WebRTC clients still work.

cuuupid avatar Mar 07 '19 22:03 cuuupid

Could you post here whatever you find on chrome://webrtc-internals/ when that happens?

kidandcat avatar Mar 11 '19 08:03 kidandcat

Yup, happened again today. The call is long so the dump will probably begin from when the connection was fine, near the end the peer switched wireless networks and refreshed and the call dropped immediately.

webrtc_internals_dump.txt

On some networks, if I wait ~ 10 seconds, the call closes, and if I try to remake the call to the same peer with the same stream, everything works perfectly but the old stream restarts itself (the stream that was being delivered by the closed call restarts with the new stream).

cuuupid avatar Mar 12 '19 21:03 cuuupid

Here's another dump of the same thing, this time with some console errors as well:

image

Reds in WebRTC Internals:

image

Full dump attached

webrtc_internals_dump (1).txt

cuuupid avatar Mar 12 '19 21:03 cuuupid

@pshah123 Could use please try a version from master branch?

afrokick avatar Apr 03 '19 13:04 afrokick

Can you please release the latest version? @afrokick

RamyaAshika avatar Apr 05 '19 07:04 RamyaAshika

We will be releasing it very soon, but we want to do things the right way. This will be a breaking release, so we need to go slowly and test everything.

Anyway, you can easily use github as a source with npm. You should target a commit to have stability, for example, to install using latest master branch:

npm install peers/peerjs#09d556f

kidandcat avatar Apr 05 '19 07:04 kidandcat

Ya that's good to hear but so far I'm using your cdn version until that can I use your peer.min.js from your master branch? Whether it will work? @kidandcat

RamyaAshika avatar Apr 05 '19 07:04 RamyaAshika

@RamyaAshika Yeap, you can use raw link https://raw.githubusercontent.com/peers/peerjs/master/dist/peerjs.min.js

But please, keep in mind, that it isn't a release version, so, it maybe unstable

afrokick avatar Apr 05 '19 07:04 afrokick

Sure Thank you @afrokick

RamyaAshika avatar Apr 05 '19 10:04 RamyaAshika

I'm having the same issue now when going through turn server.

0crypto0 avatar Mar 31 '20 06:03 0crypto0