Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPN Connection Issues and TURN Server Question #667

Open
chonigman-vt opened this issue May 11, 2020 · 2 comments
Open

VPN Connection Issues and TURN Server Question #667

chonigman-vt opened this issue May 11, 2020 · 2 comments
Labels
client related to peerjs client

Comments

@chonigman-vt
Copy link

Hi. Thanks for this great project.

I am having a couple issues with my webrtc setup and I am trying to discern if it is related to the peerjs side of things or how i've configured my TURN server. Currently, I have an app deployed that uses a peerjs server on heroku and I am using Twilio stun/turn servers as well. We are using webrtc as a sort of broadcast for an interactive experience, so the user receives audio/video but only sends data (to control experience).

I am encountering a couple issues that I am (mostly) unable to reproduce myself but have users experiencing somewhat regularly.

In one scenario, data connection is established and a call is made and answered but the 'on Stream' event is not firing so the video/audio tracks are not coming through.

In another, no connection is made. I thought this is where a TURN server should help make sure these connections are made more reliably. We get the stun/turn server info and credentials from twilio and set in the config of each connecting party. Chrome://webrtc-internals confirms that the twilio servers are set so i'm confused as to what is not working or if there is still some use cases where webrtc won't work for some people.

In some cases, a connection is made, the stream starts, and everything works for about 5 seconds, then the call closes unexpectedly. this seems to happen when a vpn is being used. Does webrtc still work when a vpn is being used?

For now, I've added the ability for the app to fail gracefully and boot users who can't establish a connection but ideally I'd like to reduce the number of connection issues as I can. If anyone has insight into this or better ways to debug/reproduce connection errors I would really appreciate it.

Thanks!

@alysonfreitas
Copy link

I have interest on this discussion, I'm working on a similar application which estabilish one to one call using peerjs, I'm using the service of xirsys, as turn servers, noticed that stun servers doens't seem to work for me.
few users can connect for 5 secs or less,
some estabilish connection, but counterpart data doesn't seem to be received,
some connect and work well

I would like to know if anyone found a way to keep connection estabilished, open, even with bad connections, as long as possible such as skype and many other sevices does?

@sirKel16
Copy link

@alysonfreitas & @chonigman-vt We are seeing a similar problem at our one to one video connection calls. TURN server has been setup at dedicated hosting server. Sometimes connection cannot be established or no video data is being send. These errors occur without any logic, independent from the load of the app.
Difference with the above examples is that once the connection is extablished video is being exchanged and it will continue to work.
As @chonigman-vt mentions I seldomly see the the issue while others are seeing it more frequently. Comparing the OS & browsers doesn't show any logic.
Refreshing the page and trying again (or again) usually works. Roughly I would say that 25% of the users/tries shows this problem.

@irgalamarr irgalamarr added the client related to peerjs client label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client related to peerjs client
Projects
None yet
Development

No branches or pull requests

4 participants