[Webkit-unassigned] [Bug 204106] New: Calling getUserMedia multiple times in same tab can cause NotReadableError

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 12 01:20:08 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=204106

            Bug ID: 204106
           Summary: Calling getUserMedia multiple times in same tab can
                    cause NotReadableError
           Product: WebKit
           Version: Safari 13
          Hardware: iPhone / iPad
                OS: iOS 13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: daginge at confrere.com
                CC: youennf at gmail.com

Created attachment 383343

  --> https://bugs.webkit.org/attachment.cgi?id=383343&action=review

Screenshot showing the issue on an iPhone X running iOS 13.2

Summary:
Calling getUserMedia multiple times on the same page (after stopping the tracks of the original getUserMedia stream) can cause getUserMedia to fail with NotReadableError. After this the tab is broken for further usages of getUserMedia and Safari must be restarted to fix the issue. This bug only impacts iOS.

Steps to reproduce:
1. Go to https://codepen.io/daginge/full/bGGxboP on an iPhone running iOS 13.2
2. Tap: "Click me to start testing"
3. Let the test run for about a minute or until it fails, whatever comes first.
4. Observe "NotReadableError"
5. Observe that subsequent clicks to "Click me to start testing" still fails with NotReadableError.
6. Restart Safari
7. Click "Click me to start testing".
8. Observe that getUserMedia now works again.

It can also be observed that once the call fails with NotReadableError and the user goes to the home screen, the "capturing" icon is visible. The webapp cannot stop capturing at this point, and the user believes the page is listening in on calls. ONly way to fix this is to close the tab or kill Safari.

I have been able to reproduce this with timeouts between calls of up to 20 seconds. However, testing this with timeout 0 it does not seem to trigger the issue.

I suspect this issue might have something to do with how Safari on iOS cleans up media access. See also attached image.

Impact:
All services requiring the use of subsequent getUserMedia calls. Keeping the getUserMedia stream around when you don't need it (for example in an application looking to do many subsequent calls without reloading the page) is bad UX, drains the battery, and makes the user believe you are listening when you aren't.

Workaround:
Don't kill the stream, keep it around forever. It's yours now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191112/fa5a4961/attachment.htm>


More information about the webkit-unassigned mailing list