Bug 233020

Summary: Safari freezes when receiving call on device with iOS 15.2 Beta
Product: WebKit Reporter: Virginia Farley <vfarley>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ap, arturk, jameshoward, shashaank.birava, webkit-bug-importer, youennf, zaabalonso.work
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: iOS 15   

Description Virginia Farley 2021-11-11 15:56:49 PST
If you receive a call on your iOS device while you have a local stream setup, then attempting to setup a peer connection while the notification banner is present results in the entire website freezing and becoming unresponsive.  The only way to stop this behavior is by reloading the page.

The steps to reproduce this bug are:
1. Open https://webrtc.github.io/samples/src/content/peerconnection/pc1/ 
2. Click the "Start" button, allowing microphone and camera access when prompted
3. Call the device 
4. When the call notification banner is visible on the top of your screen, press the "Call" button
5. Swipe away the notification
6. Observe that the webpage is frozen/unresponsive

Able to reproduce on iOS 15.2 Beta.  Unable to reproduce on iOS 15.1.

Expected behavior: After swiping away notification, video resumes.
Comment 1 Artur Kania 2021-11-11 17:21:24 PST
similar freeze occurs if one has an active webrtc call and 
1. invokes Siri
2. receives phone call

Reproes easily on Facetime, open link in Safari, join to a call, invoke Siri

Safari is unresponsive
Comment 2 fizampou 2021-11-11 17:27:28 PST
100% reproducible even on facetime links if user joins from safari browser. 

Repro steps:  

Create a facetime URL and share it on IOS device.
Launch the URL and pick browser instead of native app.
Join the call with audio/video.
Enable siri or receive incoming PSTN call.
Kill Siri or hang up PSTN call. 
Back to facetime call the tab hangs and the only action is force refresh. 

Affects all WebRTC sessions. ----

Other applications possibly affect it also like watching a youtube video and going back to the WebRTC call would break it again.
Comment 3 Shashank S 2021-11-12 01:45:29 PST
Even I am seeing this issue on iOS v15.2 Safari - on an incoming phone call the webpage freezes and is unresponsive. Reload/refreshing the page is the only way it resolves.
Comment 4 Radar WebKit Bug Importer 2021-11-12 16:19:35 PST
Comment 5 Alexey Proskuryakov 2021-11-12 17:55:55 PST
I can reproduce the video being all black in the right view after following these steps. Not sure if that's a bug or expected behavior.

I cannot reproduce the page being frozen. Could you please add more detail, such as exact OS build and device model (Settings->General->About).

If this does reproduce with the latest beta, please also report this via https://feedbackassistant.apple.com with a sysdiagnose, and post the feedback ID here for reference.
Comment 6 Alexey Proskuryakov 2021-11-12 22:00:50 PST
Never mind, someone else was able to reproduce, and got a sysdiagnose. This wasn’t anywhere near 100% reproducible for him, for whatever reason.
Comment 7 youenn fablet 2021-11-13 02:23:42 PST
Thanks for the report.
I think this is now fixed in latest iOS 15.2 beta
Comment 8 youenn fablet 2021-11-13 02:24:28 PST
Closing now, please reopen if you can repro on iOS 15.2 latest beta.
Comment 9 James Howard 2021-11-14 16:52:31 PST
Youenn, Alexey, check out the sysdiagnose in FB9747389.

There are also simple repro steps. The big difference between my steps and Virginia's are that installed a Home Screen web app as opposed to running in Safari. For some reason, using a Home Screen web app makes it much easier to reproduce.

These steps are near 100% repro for me on an iPad Air running 15.2 beta 2:

Steps to reproduce:
1. Navigate to https://james-howard.github.io/samples/src/content/peerconnection/pc1/
2. Tap share button to add to home screen (must do this step, won't repro in Safari alone)
3. Open the new home screen link (will be a PWA)
4. Tap start, then call and verify you see two videos from your front camera
5. Receive an incoming FaceTime call
6. Tap the banner to bring up the fullscreen FaceTime UI
7. Decline the call to return to the web app

Web App will be frozen (cannot interact with it in any way).
Comment 10 Virginia Farley 2021-11-15 08:31:48 PST
Youenn, reopening because can repro on iOS 15.2 latest beta (19C5036e).

And Alexy, this is with iPhone 13 mini (MLA33LL/A).
Comment 11 youenn fablet 2021-11-15 08:44:12 PST
@Virginia, would you be able to take a sysdiagnose when reproing the page freeze and send it to me (youenn@apple.com)?
Comment 12 Virginia Farley 2021-11-19 10:41:49 PST
Unable to repro in latest iOS 15.2 beta 3, closing.