-
Notifications
You must be signed in to change notification settings - Fork 727
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
Local participant disconnected error after using EndCallButton to disconnect #742
Comments
debug logs from Twilio if helpful:
|
Hi @cindyloo, Thank you for opening this issue with us. It seems like this is an issue with the twilio-video react app. I'll be transferring this over to our wonderful folks there! Best, |
Hi @cindyloo - thanks for the issue! I've been looking into this issue. The error that you are seeing is not very descriptive, but it is thrown only when you try to disconnect from a room while a local track is being published to the room. To demonstrate this, I found that the following code snippet can reproduce the issue:
In this snippet, the This makes me wonder - is a track in the process of being published when Some questions that I have - have you modified Also - in the debug logs - can you share some more of the logos that you see before the disconnect happens? The debug logs should show you which track is in the process of being published when the disconnect happens. For instance, when I run the snippet above to reproduce the error - I see this in the logs:
Do you see anything like this in the logs? |
hi @timmydoza! The changes I made to
a wrapper around the Video assignment and an extension to maxListeners: at EndRoomDisconnect, the only thing I'm trying to do is react to the remaining (local) track and to continue to draw a video mask over it (we anonymize our videos and create a canvas track to do so). here is the code in particular ( in what I am calling
I will look in the logs and get back to you also thank you for your help! |
hi again- I have made sure to clean up my tracks, both videoTracks and tracks published via the canvas stream. I do still get the "local participant disconnected error" and I see that the app is re-rendering, which would try to make it re-publish. Not sure how it is getting past the participant==null test though |
Our local fix of the twilio-react-app was the following: The first part of the fix was to separate track attach/detach logic from publish/unpublish logic in That got the "LocalParticipant disconnected" error to show up in the ErrorDialog component. The error itself is coming from useHandleTrackPublicationFailed In the VideoProvider, where I added a second error handler that just logs the error into the console for now. At least users won't see it, but I'm not sure where the underlying bug comes from yet (in Twilio). Also added a doDisconnect function to share the disconnect code between |
code from Twilio React sample app
Expected behavior:
I'd expect to disconnect and receive no error
TODO
Software versions:
React
The text was updated successfully, but these errors were encountered: