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

[BUG]: Stream freezes after 2-5 minutes - Bidirectional sample #973

Open
tsvetan-vr opened this issue Jan 18, 2024 · 1 comment
Open

[BUG]: Stream freezes after 2-5 minutes - Bidirectional sample #973

tsvetan-vr opened this issue Jan 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tsvetan-vr
Copy link

Package version

3.1.0-exp.7

Environment

* OS: iOS, Android, MacOS
* Unity version: Unity 2022.3, Unity 2023.1
* Graphics API:
* Browser: Safari, Chrome

The webserver is running on Linux (Debian 11)

Steps To Reproduce

  1. Download the sample Render Streaming WebApp
  2. Setup on Linux and start it with https (and private)
  3. Open Bidirectional sample - peer 1 (Windows PC Chrome), peer 2 (iPhone Safari)
  4. Enter the same connection id and make a connection
  5. Wait 2-5 minutes and the connection freezes

Current Behavior

After 2-5 minutes upon making a connection between the two peers, the stream freezes.

Expected Behavior

The connection should stay after 5 minutes as long as it needs to stay alive.

Anything else?

Additional information about the issue:

  • We tried using stun and turn with the same result. Usually it keeps happening more often when using a turn, but we also experienced it with stun only. But this issue seems very random and hard to make a pattern when exactly is happening.
  • We noticed that it happens for us every time on iPhone (Safari) while on Wifi. And if we use mobile data, the stream does not freeze. But that's for our network. It's not always the case for different network.
  • From the client logs we see in peer.js that pc.oniceconnectionstatechange event fires with pc.iceConnectionState = "disconnected" right when the freeze occurs, but I'm not sure if this helps us in any way.
  • Also we have the sample as a starting point and modified it for our product, but the issue appears in both versions of the webapp (ours and the original sample).

Thank you!

@tsvetan-vr tsvetan-vr added the bug Something isn't working label Jan 18, 2024
@tsvetan-vr
Copy link
Author

It turns out the websocket disconnects after timeout (the default is 300s) if it's not used. For our use case we fixed it by sending keep alive messages from the web client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants