Open suoc opened 5 years ago
coturn can connect success, node-turn can't.
what is this test? could you give your code and translate all in english ?
You can try it by yourself in firefox browser, Because go-turn(golang turnserver) had fixed a bug about the firefox.
You can test in this link: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
so, this is working on google chrome but not on firefox?
Yes, In firefox can't get relay address.
go-turn(golang turnserver) had fixed a bug about the firefox
could you give the PR link ?
so https://github.com/pions/turn/compare/1.0.2...1.0.3 i'll have a look at it
firefox use fingerprint that was not implemented in 0.0.3. could you try 0.0.4 with last firefox version ?
Yes!!! 0.0.4 is ok! great. But i find that firefox will get tow relay address:
ime | Component | Type | Foundation | Protocol | Address | Port | Priority |
---|---|---|---|---|---|---|---|
0.010 | 1 | host | 0 | UDP | 192.168.0.19 | 53090 | 126 | 32512 | 255 |
0.011 | 1 | host | 4 | UDP | 2001:0:9d38:6ab8:3468:efb4:480f:3b8e | 53089 | 126 | 32256 | 255 |
0.012 | 1 | host | 5 | TCP | 192.168.0.19 | 9 | 125 | 32704 | 255 |
0.016 | 1 | host | 6 | TCP | 2001:0:9d38:6ab8:3468:efb4:480f:3b8e | 9 | 125 | 32448 | 255 |
0.016 | 2 | host | 0 | UDP | 192.168.0.19 | 53091 | 126 | 32512 | 254 |
0.017 | 2 | host | 5 | TCP | 192.168.0.19 | 9 | 125 | 32704 | 254 |
0.017 | 2 | host | 6 | TCP | 2001:0:9d38:6ab8:3468:efb4:480f:3b8e | 9 | 125 | 32448 | 254 |
0.017 | 1 | srflx | 1 | UDP | 124.202.206.114 | 53090 | 100 | 32543 | 255 |
0.045 | 1 | relay | 3 | UDP | 123.56.177.185 | 60281 | 5 | 32542 | 255 |
0.083 | 2 | srflx | 2 | UDP | 124.202.206.114 | 53091 | 100 | 32542 | 254 |
0.085 | 2 | relay | 3 | UDP | 123.56.177.185 | 59004 | 5 | 32542 | 254 |
0.158 | 2 | srflx | 1 | UDP | 124.202.206.114 | 53091 | 100 | 32543 | 254 |
0.158 | Done |
I think, If tow peers use different(session address), Maybe will failed;
And i find few time later , ICE will failed, video will disconnect;
need a way to reproduce it. could you write a test?
I have an issue with firefox as well, I think it might be the same issue.
Here is a minimal example: webrtctest.html.zip
To reproduce the issue, do npm i node-turn
and npm run start
inside the node-turn folder.
Then open webrtctest.html in a browser. If you click 'connect' everything works fine.
But if you click 'connect (force turn)' it fails on firefox.
In the console it shows:
WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details
Interestingly enough, on Chromium and Safari with 'force turn' it disconnects every n seconds (this number seems to change every time you refresh the page, but is usually around 42 seconds). I'm not sure if this is a related issue or not, but it only seems to occur with force turn.
I just tried deploying node-turn on my server and it seems to work fine on firefox. It also doesn't disconnect every 42 seconds. On chrome and safari it still disconnects though, both on the local and the remote turn server.
I have an issue with firefox as well, I think it might be the same issue. Here is a minimal example: webrtctest.html.zip To reproduce the issue, do
npm i node-turn
andnpm run start
inside the node-turn folder. Then open webrtctest.html in a browser. If you click 'connect' everything works fine. But if you click 'connect (force turn)' it fails on firefox.In the console it shows:
WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details
Interestingly enough, on Chromium and Safari with 'force turn' it disconnects every n seconds (this number seems to change every time you refresh the page, but is usually around 42 seconds). I'm not sure if this is a related issue or not, but it only seems to occur with force turn.
I met the same problem. How did you deal with it now? 📚
@zeijibashuai I switched to coturn
I also faced the same disconnection issue using webrtc for android/ios, where the call will be disconnected at around 40-42 seconds. Just switched to coturn and the issue is now solved.
any way for solution?
I can't get enough browser debug to understand problem, some help would be appreciated
I can't get enough browser debug to understand problem, some help would be appreciated
Comparing Firefox (which the issue does not occur) and Chrome at first, I can see that Chrome complains about STUN server being incompatible even though only TURN is specified in iceServers property of the RTCPeerConnection. Going a step further and testing the STUN server of node-turn using https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ then we can see similar behavior. Chrome complains with 701 "STUN server address is incompatible" while in Firefox there are no errors. I am not sure if this is related to the disconnect issue but may be worth mentioning. If I have some time later I will get a coturn server running and try to compare the behavior against node-turn since people here say coturn does not have this issue.
@ntanis-dev can you please solve this bug faster?
https://github.com/Atlantis-Software/node-turn/blob/fc1951cce419ae7e7ba33c2e0deb70a8c073453c/lib/methods/allocate.js#L89-L90 liftetime
está correto ou era pra ser lifetime
?
Descobri na RFC 5389 # seção 7.2.1 que aparentemente esse problema está relacionado à algo com retransmissão. O cliente da expira a conexão após 39,5 segundos.
Retransmissions continue until a response is received, or until a total of Rc requests have been sent. Rc SHOULD be configurable and SHOULD have a default of 7. If, after the last request, a duration equal to Rm times the RTO has passed without a response (providing ample time to get a response if only this final request actually succeeds), the client SHOULD consider the transaction to have failed. Rm SHOULD be configurable and SHOULD have a default of 16. A STUN transaction over UDP is also considered failed if there has been a hard ICMP error [RFC1122]. For example, assuming an RTO of 500 ms, requests would be sent at times 0 ms, 500 ms, 1500 ms, 3500 ms, 7500 ms, 15500 ms, and 31500 ms. If the client has not received a response after 39500 ms, the client will consider the transaction to have timed out.
same error, but I remember it seemed like there was success on the first time.
Hope it will be helpful for solving the problem. :)
This is node server's-123.56.177.185:3478 ips:
This is coturn(a open source turn server)-59.110.15.178:3478 ips: