twilio-video.js
twilio-video.js copied to clipboard
Unhandled exception: Client is unable to create or apply a local media description
- [x] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
- [x] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
- [x] I verified that the Quickstart application works in my environment.
- [x] I am not sharing any Personally Identifiable Information (PII) or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue: There are two issues I want to rise which are related to the same exception.
CASE 1
This exception happens quite often for us in the Production for different OS, browsers
ROOM SID
MAC OS, Chrome 96: RM3b31861c8b1c29e89d438666b175aaeb
Windows, Edge 100: RM308793f504183dbfa3ce731cf9125ede
CASE 2
const { localParticipant } = state.roomApi;
const publication = await localParticipant.publishTrack(track, {
priority,
});
Expected behavior: An exception should reject the promise
Actual behavior:
When an exception happens (Client is unable to create or apply a local media description
), the promise (await localParticipant.publishTrack
) is stuck in pending status and never goes to catch block
Software versions:
- [x] Browser(s): MAC OS, Chrome 96, Windows, Edge 100
- [x] Operating System: Windows, Mac OS
- [x] twilio-video.js: v2.21.1
- [x] Third-party libraries (e.g., Angular, React, etc.): vue.js v2 + typescript
Hey @vbabenko , thanks for reporting. Do you have reproduction steps to trigger the exception?
@charliesantos It's a quite tricky issue and time to time it happens for users who had working setup previously. I do not have exact steps, but I've discovered this problem for our e2e tests as well with this setup of the Chromium browser (Playwrite framework)
browserName: 'chromium',
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true,
permissions: ['clipboard-read'],
screenshot: 'only-on-failure',
launchOptions: {
args: ['--use-fake-device-for-media-stream', '--use-fake-ui-for-media-stream'],
},
@vbabenko thanks for the additional information. I'll submit an internal ticket and see what we can do. But it would be great to have a good repro rate to speed up the process of addressing it.
Any updates here?
same issue, mac OS Big Sur, chrome 103.0.5060.114 (Official Build) (x86_64). twilio 2.22.1, React 16.14
I disconnected, then tried to re-enter the room
TEVyQFKQMleytyg80Ng0…vw8Pp6bmY+HbV7MA=:1 Uncaught (in promise) TwilioError: Client is unable to create or apply a local media description
at MediaClientLocalDescFailedError.TwilioError [as constructor] (twilioerror.js?6b3f:56:1)
at new MediaClientLocalDescFailedError (twilio-video-errors.js?25ab:871:1)
at eval (peerconnection.js?7b1f:679:1)
at async Promise.all (index 0)
at async Promise.all (index 0)
Hey @cindyloo , are you able to reproduce this consistently?
fairly consistently, yes. as a "host" I start a session. In incongito mode, I join as an 'invitee'. all is well until the invitee disconnects and then tries to rejoin. Running locally.
@cindyloo Unfortunately, I'm not able to reproduce this consistently in our reference app. Can you please enable debug and provide the whole browser log?
Hello @cindyloo, We recently fixed a bug (VIDEO-9511) that caused this error. The fix went in 2.21.2, can you please update to this version and let us know if you continue to see this issue. If you do continue to see the issue, please provide debug logs as @charliesantos mentioned.
BTW Is your app setting insights:false
as one of the connect options? I am unable to see logs from the rooms you mentioned in our logging system, and insights:false
can cause that.
Thanks, Makarand
hey @charliesantos - targeting 2.21.2 (instead of 2.22.1) works!
hm and now it doesn't
@makarandp0 I have enabled the insights so you should be apble to review our logs please advise, thank you
Hello @cindyloo, Can you share few Room Sids that encountered this problem (and the ones that had logs enabled)
Hello @cindyloo, Can you share few Room Sids that encountered this problem (and the ones that had logs enabled)
Hi @makarandp0 , I am another member of @cindyloo's team.
Here are a few examples of the rooms that encountered this issue.
Instance 1 Room SID- RMc3c790a5a8788904c4ca09ada9501606 Track SID- MTcdcf07f7b5360b26cf78ff883ba88bfb Participant SID- PA80fb605b06793ec943f43d02e4b049ec
Instance 2 Room SID-RMecc264aa86a8b16463ac880731be1c24 Track SID- MT80dc4fc6d80ca87a76bd8adae5a0d0f4 Participant SID-PAc7764741eb4d528feffb61f149cb5e86
Hi @makarandp0,
Any updates on this issue?
Thanks
still occurring with 2.22.0
Unhandled Runtime Error
TwilioError: Client is unable to create or apply a local media description
Call Stack
MediaClientLocalDescFailedError.TwilioError [as constructor]
node_modules/twilio-video/es5/util/twilioerror.js (56:0)
new MediaClientLocalDescFailedError
node_modules/twilio-video/es5/util/twilio-video-errors.js (871:0)
eval
node_modules/twilio-video/es5/signaling/v2/peerconnection.js (679:0)
@makarandp0 @charliesantos any updates? this is really impacting us... Primarily on windows to windows, chrome
Consistently hitting this error on Windows 10 Chrome version Version 104.0.5112.81 when doing end to end testing between windows machines.
we had to stop publishing the canvas track on Windows 10 Chrome to avoid this error in this way:
const aCanvasTrack = getLocalVideoTrackFromCanvas(
participant.sid,
canvasOverlayBuff
).then((track: LocalVideoTrack) => {
if (supportsCPublishing) { // return false if Windows 10 or less
(participant as LocalParticipant)
.publishTrack(track)
.then(localTrackPublication => {
console.log(
`Track overlay was published with SID ${localTrackPublication.trackSid} for ${participant.sid}`
);
});
}
});