"A MediaStreamTrack ended due to a capture failure" error occurs on Safari in around 30 seconds after peer connection establishes. This error can be observed most likely in Safari on BigSur 11.1 and 11.0.1, especially when multiple callers in a call. When this error occurs, safari caller will see self video tile as black, but remote callers can still see and hear safari caller well. But it does not on every device. If on 1 device it happens, it's likely to happen every time, and if on another device it does not happen, it's not likely to happen on that device. Seems it's same issue with more details has been reported in this thread: https://github.com/twilio/twilio-video.js/issues/1281
Hi Vicky, Can you reproduce with STP? If you can reproduce it, would you be able to take a sysdiagnose and send it to me (youenn@apple.com)? (In reply to Vicky Cen from comment #0) > "A MediaStreamTrack ended due to a capture failure" error occurs on Safari > in around 30 seconds after peer connection establishes. This error can be > observed most likely in Safari on BigSur 11.1 and 11.0.1, especially when > multiple callers in a call. When this error occurs, safari caller will see > self video tile as black, but remote callers can still see and hear safari > caller well. If a local capture track gets ended, it seems strange that remote callers could still see the corresponding remote track. > Seems it's same issue with more details has been reported in this thread: > https://github.com/twilio/twilio-video.js/issues/1281 According the thread, this seems fixed in iOS 14.2
Hi Youenn, I can reproduce with STP and sent you the sysdiagnose. However, it seems on STP when the error shows, safari caller will get black self video tile and remote caller can't see the track, but still can hear. (sysdiagnose attached and send to your email) On Safari 14.0.2, I did see when the error shows, safari caller will get black self video tile but remote caller can both see and hear the safari user.
Looking at sysdiagnose, some H264 encoding failures happen before capture starts failing.
<rdar://problem/73920852>
*** Bug 220998 has been marked as a duplicate of this bug. ***
Vicky, can you still reproduce this issue on recent Safaris?
Hi youenn, my colleagues and I have very limited number of testing on the latest Safari (Safari 15). We haven't seen this issue on Safari 15 so far.
Seeing it on Safari 15.(In reply to Vicky Cen from comment #7) > Hi youenn, my colleagues and I have very limited number of testing on the > latest Safari (Safari 15). We haven't seen this issue on Safari 15 so far.
Hi Youenn, We are seeing this on iPhone 14/iOS 16. Same reproduction steps. Do you have any updates on this? Thank you.
Ya, we are seeing the same issue on iPhone 14/iOS 16.0 and 16.0.1, simply create a video & audio streams and attach to MediaRecorder, record a video then destroy the stream tracks, repeating create streams and destroy tracks few times trigger the error function stopStream(stream) { if (stream) { stream.getTracks().forEach((track) => { track.stop(); stream.removeTrack(track); }); } }
Is it safe to assume this issue can be closed by this commit? https://github.com/WebKit/WebKit/commit/b818b253da1d92e9e5f802dea4a735b8adeb1994
(In reply to daginge from comment #11) > Is it safe to assume this issue can be closed by this commit? > https://github.com/WebKit/WebKit/commit/ > b818b253da1d92e9e5f802dea4a735b8adeb1994 Not really, this issue is related to camera video tracks.
(In reply to Charlie from comment #9) > Hi Youenn, > We are seeing this on iPhone 14/iOS 16. Same reproduction steps. Do you have > any updates on this? > > Thank you. @Charlie, can you give more precise repro steps? Is it the same as https://bugs.webkit.org/show_bug.cgi?id=247967?
We have the same issue. The system version is: Intel Mac OS X 10_15_7, Safari 15.4 After about 30s of successful webrtc peerConnection connected, MediaStream audioTrack gives this error: "A MediaStreamTrack ended due to a capture failure". We try to recapture the audioTrack with getUserMedia and use rtpSender.replaceTrack to try to resume the call, but once we call replaceTrack, the recaptured audioTrack comes back with the same error: "A MediaStreamTrack ended due to a capture failure". It only occurs in some devices and looks like it might be related to the system version.
(In reply to rychouwei from comment #14) > We have the same issue. > > The system version is: Intel Mac OS X 10_15_7, Safari 15.4 > > After about 30s of successful webrtc peerConnection connected, MediaStream > audioTrack gives this error: "A MediaStreamTrack ended due to a capture > failure". > > We try to recapture the audioTrack with getUserMedia and use > rtpSender.replaceTrack to try to resume the call, but once we call > replaceTrack, the recaptured audioTrack comes back with the same error: "A > MediaStreamTrack ended due to a capture failure". > > It only occurs in some devices and looks like it might be related to the > system version. @rychouwei, can you send me a sysdiagnose (youenn@apple.com)? Are you able to reproduce the issue reliably with some steps or specific setups?
@youenn Is the guide in this link to get sysdiagnose? http://adcdownload.apple.com/OS_X/OS_X_Logs/sysdiagnose_Logging_Instructions.pdf I'll try.
Created attachment 464772 [details] sysdiagnose 1. At 11:08:28:203, MediaStream audioTrack is ended. 2. At 11:08:29:009, try getUserMedia to capture a new audioTrack. 3. At 11:08:30:505, try rtpSender.replaceTrack to replace the recaptured audioTrack. 4. At 11:08:30:511, the recaptured audioTrack is ended again.
@youenn The sysdiagnose is provided. please check! "Are you able to reproduce the issue reliably with some steps or specific setups?" One of our customer's Intel Mac OS X 10_15_7, Safari 15.4 can reproduce the issue reliably, from the process is the most basic webrtc communication process, no specific steps found for now.