REOPENED 188309
NotReadableError when calling getUserMedia
https://bugs.webkit.org/show_bug.cgi?id=188309
Summary NotReadableError when calling getUserMedia
Ben
Reported 2018-08-03 09:17:16 PDT
Calling getUserMedia in Safari Technology Preview gives an error: NotReadableError: The I/O read operation failed. Safari 11.1.2 works fine. Tested with Safari Technology Preview Release 62 https://webrtc.github.io/samples/src/content/getusermedia/gum/
Attachments
Patch (3.47 KB, patch)
2018-08-06 13:24 PDT, Eric Carlson
no flags
Archive of layout-test-results from ews206 for win-future (12.90 MB, application/zip)
2018-08-07 10:22 PDT, EWS Watchlist
no flags
Patch (6.79 KB, patch)
2018-08-07 10:28 PDT, Eric Carlson
no flags
Radar WebKit Bug Importer
Comment 1 2018-08-03 15:32:21 PDT
stephen_cobb
Comment 2 2018-08-03 16:03:15 PDT
I am unable to reproduce on Mojave running STP Release 62 (Safari 12.1, WebKit 14607.1.1) I am also unable to reproduce on High Sierra Release 62 STP (Safari 12.1, WebKit 13607.1.1) Could you please capture a sysdiagnose after reproducing this issue? Thank you.
Ben
Comment 3 2018-08-04 10:35:17 PDT
I'm using: MacBook Pro (13-inch Late 2011) macOS High Sierra Version 10.13.6 Safari Technology Preview Release 62 (Safari 12.1, WebKit 13607.1.1 I tested again and now I'm not getting the error so feel free to close the issue.
Eric Carlson
Comment 4 2018-08-04 11:19:42 PDT
It sounds like the camera and/or microphone wasn't available when you tested before. Thanks for reporting the bug and for updating it so quickly Ben!
Ben
Comment 5 2018-08-04 17:29:37 PDT
I have a test case that cause the NotReadableError every time both on Safari Technology Preview 12.1 (WebKit 13607.1.1) and Safari on iOS 12 Beta 4: https://benbro.github.io/samples/src/content/peerconnection/pc1/ Click on the Start and Call buttons. It'll call getUserMedia with just audio, add it to the peer connection and negotiate. Click on the GUM button. This time it call getUserMedia with both audio and video and you should see the NotReadableError.
Eric Carlson
Comment 6 2018-08-06 13:24:46 PDT
Brent Fulgham
Comment 7 2018-08-06 13:31:33 PDT
Comment on attachment 346648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346648&action=review Looks good r=me > Source/WebKit/UIProcess/UserMediaProcessManager.cpp:151 > + if (withAudio && !(currentExtensions & ProcessState::SandboxExtensionsGranted::Audio)) { All of this might be slightly easier to follow if we used a helper function to check for extension types (e.g., "bool hasAudioExtension(unsigned currentExtensions) { return currentExtensions & ProcessState::SandboxExtensionsGranted::Audio; }" and so forth). But not needed for this bug fix.
EWS Watchlist
Comment 8 2018-08-07 10:22:24 PDT
Comment on attachment 346648 [details] Patch Attachment 346648 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8788544 New failing tests: imported/blink/transitions/unprefixed-transform.html
EWS Watchlist
Comment 9 2018-08-07 10:22:36 PDT
Created attachment 346712 [details] Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Eric Carlson
Comment 10 2018-08-07 10:26:23 PDT
(In reply to Build Bot from comment #9) > Created attachment 346712 [details] > Archive of layout-test-results from ews206 for win-future > > The attached test failures were seen while running run-webkit-tests on the > win-ews. > Bot: ews206 Port: win-future Platform: > CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit These are unrelated.
Eric Carlson
Comment 11 2018-08-07 10:27:14 PDT
Comment on attachment 346648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346648&action=review >> Source/WebKit/UIProcess/UserMediaProcessManager.cpp:151 >> + if (withAudio && !(currentExtensions & ProcessState::SandboxExtensionsGranted::Audio)) { > > All of this might be slightly easier to follow if we used a helper function to check for extension types (e.g., "bool hasAudioExtension(unsigned currentExtensions) { return currentExtensions & ProcessState::SandboxExtensionsGranted::Audio; }" and so forth). > > But not needed for this bug fix. Good idea, I will upload a new patch that does this.
Eric Carlson
Comment 12 2018-08-07 10:28:30 PDT
Brent Fulgham
Comment 13 2018-08-07 11:05:18 PDT
Comment on attachment 346713 [details] Patch Wow -- this is a lot easier to understand. r=me
WebKit Commit Bot
Comment 14 2018-08-07 11:33:31 PDT
Comment on attachment 346713 [details] Patch Clearing flags on attachment: 346713 Committed r234662: <https://trac.webkit.org/changeset/234662>
WebKit Commit Bot
Comment 15 2018-08-07 11:33:33 PDT
All reviewed patches have been landed. Closing bug.
Ben
Comment 16 2018-09-04 09:15:55 PDT
I'm still getting NotReadableError on iOS 12 Beta 10 with the test https://benbro.github.io/samples/src/content/peerconnection/pc1/ Tested with: iOS 12.0 Beta 10 (605.1.15)
Ben
Comment 17 2018-09-04 23:13:18 PDT
Still broken on Safari 12 (AppleWebkit/605.1.15) iOS beta 10.
Ben
Comment 18 2018-09-17 15:23:30 PDT
Still broken on Safari 12 (AppleWebkit/605.1.15) iOS 12.
youenn fablet
Comment 19 2018-09-17 15:47:47 PDT
(In reply to Ben from comment #18) > Still broken on Safari 12 (AppleWebkit/605.1.15) iOS 12. Thanks Ben, I also was able to repro the issue. Will need to investigate further to find the root cause.
Ben
Comment 20 2018-11-16 08:51:08 PST
Still broken on iOS 12.1
Ben
Comment 21 2019-01-31 11:49:02 PST
If you first call GUM with just video and than again with audio+video you won't get an error but the audio packets with have zero volume.
Ben
Comment 22 2019-02-06 00:07:21 PST
youenn: any update on this bug?
youenn fablet
Comment 23 2019-02-06 07:49:14 PST
(In reply to Ben from comment #22) > youenn: any update on this bug? Trying on STP and iOS12.2 beta, I cannot repro it anymore. I will try on another device though. I saw some crashes but https://bugs.webkit.org/show_bug.cgi?id=194181 should solve this.
Ben
Comment 24 2019-02-06 09:56:10 PST
Thank you for the fix and validation. This bug is about first calling GUM with audio and than with audio+video. Did you also check the reverse? Calling GUM with only video and than with audio+video? In my test there is no error but the audio packets has zero volume.
youenn fablet
Comment 25 2019-02-06 12:40:34 PST
(In reply to Ben from comment #24) > Thank you for the fix and validation. If you have time for iOS 12.2 validation, that would be great. > This bug is about first calling GUM with audio and than with audio+video. > Did you also check the reverse? Calling GUM with only video and than with > audio+video? In my test there is no error but the audio packets has zero > volume. Tried https://youennf.github.io/webrtc-tests/src/content/getusermedia/volume-after-video/. This seems to work fine on iOS. On MacOS, I hit that issue a few times but am unable to repro it right now. Reloading the page fixes the issue.
Ben
Comment 26 2019-02-12 10:19:58 PST
I can reproduce both issues (error and volume zero) in iOS 12.1.4 so if you don't see them on iOS 12.2 beta that's great. The fact that you hit the volume issue on MacOS few times is not reassuring.
Note You need to log in before you can comment on or make changes to this bug.