Bug 278915 - REGRESSION (macOS 15 Beta, Safari V18): User is not able to share screen for ~1 minute after Cancelling the action in a call and most of the options do not work while screen share recovers
Summary: REGRESSION (macOS 15 Beta, Safari V18): User is not able to share screen for ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 18
Hardware: Mac (Apple Silicon) macOS 15
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-08-30 05:36 PDT by Madara Freimane
Modified: 2024-10-29 08:41 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Madara Freimane 2024-08-30 05:36:23 PDT
MacOS 15 Beta: User is not able to share screen for ~1 minute after Cancelling the action in a call and most of the options do not work while screen share recovers

Tested devices and browsers:
Bug is reproducible on:
- MacBook Pro (M1, 2020, macOS 15.0 Beta (24A5331b)) and Safari (V18.0 (20619.1.22.11.3))
- MacBook Pro (M1, 2020, macOS 15.0 Beta (24A5331b)) and Safari Technology Preview (Release 202 (Safari 18.0, WebKit 20620.1.4.8))

Use cases:
Preconditions:
Safari browser opened and User is in an active WebRTC call

Steps:
Use case1:
1. User clicks "Start screen sharing" button
2. User allows to Screen share / Window
3. User clicks on "Cancel" button on the screensharing overlay
4. User tries to start screen sharing again (and tries to use different options in a call for the next 1 min, for example, turn On/Off video, hold/resume a call and so on)
5. Wait ~1min and see if can share again the screen

Use case2:
1. User clicks "Start screen sharing" button
2. User allows to Screen share / Window
3. User presses "ESC" button on keyboard
4. User tries to start screen sharing again
5. Wait ~1min and see if can share again the screen

Actual result:
- User is not able to start sharing screen for ~1 minute after cancelling the previous screensharing attempt
- User is not able to use several options properly in a call for this ~1 min, for example, when turns On/Off camera, the video does not work; if User holds the call, User is not able to resume it anymore and so on.
- After ~1 minute User is able to start to share the screen again

Expected result:
User should be able to attempt sharing screen immediately after cancelling previous screenshare attempt

Reproducibility:
100%


Additional information:
- No "Cancel" option with macOS 14, and Use case2 tested OK.


Sysdiagnostics file added (recorded on macOS 15 Beta at 14:41 EET, 30.08.24. | Screen share was attempted to start it and cancelled at 14:40, call and the screen share recovered at 14:41):
https://drive.google.com/drive/folders/1HZvzLRHuwwN5yRfGaYP9EzdGlM3_19Hk?usp=sharing
Comment 1 Radar WebKit Bug Importer 2024-08-30 18:19:31 PDT
<rdar://problem/135052248>
Comment 2 Alexey Proskuryakov 2024-09-12 16:17:28 PDT
I do not have access to the sysdiagnose on Google Drive.

But also, could you please add more detailed steps to reproduce, which website can this be seen on? For example, I don't get any option to start screen sharing when using https://webrtc.github.io/samples/src/content/peerconnection/pc1/.
Comment 3 youenn fablet 2024-09-13 00:40:58 PDT
I am uploading the sysdiagnose to the internal bug tracker.
I tried to reproduce with https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/ but was unable to reproduce the freeze/lag.
Comment 4 youenn fablet 2024-09-13 00:48:40 PDT
From the sysdiagnose, I can see the following:
2024-08-30 14:40:32.536043+0300 0x386E2    Default   0x0                  19699  0 com.apple.WebKit.GPU: (WebCore) [com.apple.WebKit:WebRTC] ScreenCaptureKitSharingSessionManager::promptForGetDisplayMedia - Screen

2024-08-30 14:40:32.553043+0300 0x21AD     Default   0x0                  1267   0 ControlCenter: (ControlCenter) [com.apple.controlcenter:SharedContentPicking] Beginning picker session
2024-08-30 14:40:33.990092+0300 0x21AD     Default   0x0                  1267   0 ControlCenter: (ControlCenter) [com.apple.controlcenter:SharedContentPicking] Cancelling picker session

2024-08-30 14:41:32.542738+0300 0x386E2    Error     0x0                  19699  0 com.apple.WebKit.GPU: (WebCore) [com.apple.WebKit:WebRTC] ScreenCaptureKitSharingSessionManager::promptForGetDisplayMedia nothing picked after 60.000000 seconds, cancelling.

We do not seem to have WebKit logging for the cancel prompt path.
It seems either WebKit is not being notified of picker being cancelled or it somehow is not processing well the cancel notification.
Comment 5 PhungDuong 2024-09-22 20:09:29 PDT
Bug is still reproducible on macOS Sequoia 15.0 - Safari 18.0 (MacBook Air M1 2020) 
After the user cancels the Share Screen action, the Share Screen cannot be continued, and the camera also cannot be turned on for about 1 minute.
Comment 6 Madara Freimane 2024-09-24 06:13:54 PDT
Described behavior is still reproducible.
Steps how to reproduce - 
1. Open or/and join web.skype.com or Google Meets call using Safari browser
2. Start a screen share
3. Click on the "Cancel" button located near the "Share Entire Screen" button at the top right of the screen
4. Try to re-share the screen as the screen share was canceled (and other actions - turn On/Off "Camera", etc.)

I see also with https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/, if we "Cancel" screen share, only after 1 minute we can try again, but not immediately.

Tested device and browser:
- MacBook Pro (M1, 2020, macOS 15.0 (24A335)) and Safari (Version 18.0 (20619.1.26.31.6))

Added a new sysdiagnostics file:
https://drive.google.com/file/d/1e-z5gc1eYqZeTyUcNfcWU5fWtOyJO2ww/view?usp=sharing
Comment 7 PhungDuong 2024-10-07 00:36:56 PDT
Bug is still reproducible on macOS Sequoia 15.0.1 - Safari 18.0.1 (MacBook Air M1 2020)
Comment 8 Madara Freimane 2024-10-29 08:41:26 PDT
Bug is fixed with Safari v18.1.

Tested devices and browsers:
- Macbook Pro (M1, 2020, macOS 15.1 (24B83)) and Safari (Version 18.1 (20619.2.8.11.10))
- Macbook Pro (M1, 2020, macOS 15.1 (24B83)) and Safari Technology Preview (Release 206 (Safari 18.0, WebKit 20621.1.3.21.1))


Thank you!