-
Notifications
You must be signed in to change notification settings - Fork 640
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
WebRTC Publish connection/reconnection bug possibility #4071
Comments
I investigated this issue deeply. It seems that it's related to the reconnection timeout parameter. It was |
Same here. |
Thank you for bring up this issue @rafabarros. I've created a new issue and let's follow up there. Btw, we have a fix in the JS SDK for this issue so closing this one. |
There's a way to recreate connection with react-sdk methods ? |
H @rafabarros, You can listen the callbacks about ice_connection_state and websocket's closed parameters. If it's ok for you, let's continue discussion here by creating a new discussion? -> https://github.com/orgs/ant-media/discussions |
There are still many problems in the JS SDK when switching from Wifi <-> Cellular... Problem 1
Problem 2
This might be related to the above error, as Problem 3When toggling network and having multiple streams open, it doesn't trigger @mustafaboleken Can you get someone to prioritize this problem, and test having multiple streams in a room, and then toggle phone wifi / cellular connection and ensure that there are not any broken states and that events fire correctly for all streams? :) This is a show-stopper for us putting ANT media server into usage in production, as being able to restore a spotty network connection is mandatory to work... |
Hi @MaZZly |
@mustafaboleken what is the status on this one? |
Hi @MaZZly I'm currently working on it and there is a small amount of work left before the pull request. I'm in a vacation for the rest of the week. I will create a pull request probably next week. |
@mustafaboleken please let me know when there is a version with fix released and I'll do more testing to see if the odd states can still be triggered :) |
@mustafaboleken I think I've found another bug where the Is there a testable version soon we could verify? |
@mustafaboleken, what is the status here? We've been waiting on this showstopper for 3 weeks now. 😬 |
Hi @MaZZly, I'm sorry to not finalize it earlier. I had internal meetings with the team to finalize the changes but it took some time. Let me talk with them to fix it in 2 days. |
@mustafaboleken, it has now been a couple of days. Are they progressing on getting this fixed? |
Short description
It seems that stream is stuck in
broadcasting
status.Steps to reproduce
Start a normal streaming procedure from android app to ant media server (getting "publish_started" is the final notification which means it's working)
On android device, turn WIFI off, wait ~15s, and then turn WIFI on
After WIFI is back, we've implemented the "stream refresh" mechanism which should make the reconnect faster (since it usually takes from 30s to 3min, depending on the network)
"stream refresh": if any disruptive ant media error (e.g. "streamIdInUse", "publishTimeoutError", "already_publishing" etc.) is received, OR if ICE connection state is changed to "DISCONNECTED"/"FAILED", we react programmatically by:
After "stream refresh", ant media server reacts differently in different network environments, however what is usually the case is that android app receives "streamIdInUse" several times, until finally reconnecting again and changing its ICE connection state to "CONNECTED"
Now, in 50% cases streaming is continued and everything works, but in other 50% of cases the "publish_started" event callback is never received, and the streaming is never again working (only solution is to start streaming on different stream id)
With the description of issue, I'm also sending the ant-media-server logs in the attachments. I was reproducing the issue today (18.03.2022.), the streaming started at 13:26 CET (stream id: "AfyLXKiZbp3m1647606389752"), and around 13:27:53 the stream stopped working, after I took the steps explained above.
Logs
ams-server-logs.zip
The text was updated successfully, but these errors were encountered: