Bug 220998 - Video MediaStreamTrack capture randomly fails and ends after a few minutes
Summary: Video MediaStreamTrack capture randomly fails and ends after a few minutes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 11
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-26 11:31 PST by btham
Modified: 2021-05-24 08:56 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description btham 2021-01-26 11:31:55 PST
Sometimes, when Safari is sending video via WebRTC, after a few minutes the following error occurs: "A MediaStreamTrack ended due to a capture failure."

This can be a problem for video conferencing web apps, since the camera device stops being captured in the middle of a meeting.

I was able to reproduce this a few times yesterday, but it seems to happen randomly. It looks like it's a common issue with Safari based on what I've read online: https://developer.apple.com/forums/thread/667453.

Here is info about my machine, for reference:
- MacBook Pro (13-inch, 2017)
- macOS Big Sur (11.0.1)

Let me know if you need additional information. Thanks.
Comment 1 btham 2021-01-26 11:36:09 PST
Sorry, forgot to include my Safari version: 14.0.1 (16610.2.11.51.8)
Comment 2 youenn fablet 2021-01-27 06:21:04 PST
Thanks for the report.
I think this is fixed in https://bugs.webkit.org/show_bug.cgi?id=218389.
Can you reproduce in Safari Tech Preview on the same machine?
Comment 3 youenn fablet 2021-01-27 06:22:29 PST
Marking as duplicate. Please reopen if you still see the issue with a more recent Safari, either STP except 118 or Safari in most recent MacOS 11.2 beta.

*** This bug has been marked as a duplicate of bug 218389 ***
Comment 4 btham 2021-02-02 15:08:08 PST
Hi, I just tested with Safari Technology Preview (Release 119). I am still encountering the same problem with the same error message: "A MediaStreamTrack ended due to a capture failure."

I'm a Webex developer, and I've found a way to reproduce this consistently. Let me know if there is anything I can do to help narrow down the root cause.
Comment 5 Radar WebKit Bug Importer 2021-02-02 15:09:15 PST
<rdar://problem/73901050>
Comment 6 youenn fablet 2021-02-08 00:55:12 PST

*** This bug has been marked as a duplicate of bug 221192 ***
Comment 7 youenn fablet 2021-02-08 11:13:16 PST
Reopening as logs do not seem to validate the dupe I made.
Comment 8 daginge 2021-02-10 04:22:30 PST
We think we're seeing this in Confrere as well. Could you share the exact reproduction steps btham?
Comment 9 youenn fablet 2021-02-10 04:48:17 PST
FWIW, we increased the timer to 30 seconds.
After 30 seconds without any frame, we end the track, which allows the application to take action on the ended event to call getUserMedia again for instance.
Comment 10 matías lópez 2021-04-22 09:57:16 PDT
This was fixed or not yet? We can't find a way good to patch this.
Comment 11 youenn fablet 2021-05-20 05:26:10 PDT
btham@cisco.com, if you still have repro steps, can you share them?
Comment 12 btham 2021-05-24 08:56:50 PDT
Hey Youenn, as we discussed 1:1 via email, my issue seems to have been fixed as of STP 120. Unfortunately, I do not have specific reproduction steps, since for me the issue seems to have been happening randomly. Not sure the issue other people are reporting here are the same as mine, however.