Azure / Communication

Azure Communication Services - SDKs and Release Notes
MIT License
318 stars 98 forks source link

[WEB Azure.Communication.Common] Calling - Safari endless redirect loop to same groupId #409

Closed Discodir closed 2 years ago

Discodir commented 2 years ago

Describe the bug I have deployed a WEB Azure Communication Group Calling Hero (React - Azure.Communication.Common (1.0.1)) as Web Core 3.1 app. This Web Core app is called:

  1. from a Win Forms app in WebView2,
  2. from a Xamarin Android app in WebView
  3. from a Xamarin iOS app in SFSafariViewController.

Everything working properly, except in Xamarin iOS app where:

  1. when in active videocall and camera is turned off, videocall is working, viewing only remote stream.
  2. when in active videocall and camera is turned on, then for a few seconds both local and remote streams are visible and then SFSafariViewController starts an endless redirect loop to same groupId, adding new user to participants. Same loop situation when entering groupId directly to Safari new page.

To Reproduce Steps to reproduce the behavior:

  1. Start video call from Win10 or Android - Permissions granted, camera and mic open
  2. Join video call from iPhone - Permissions granted, mic open - camera off
  3. Everything working properly. On iPhone you can see remote video stream from Android or Win10 and blank local video stream. On Android or Win10 you can see local video stream and blank remote video stream from iPhone. Sound Ok!
  4. On iPhone turn camera on and ... loop process => For a second, local video stream is visible and then SFSafariViewController or Safari page reopen, asking for permissions again <=. If permissions granted again and button 'start video call' is clicked, new user is added in participants and loop process restarts.

Expected behavior While in video call, when iPhone camera is turned on, SFSafariViewController or Safari page should not reopen and add new user in participants.

Smartphone (please complete the following information):

fizampou commented 2 years ago

You can read more information here for the supported browsers. Web views are not officially supported.

Can you repro the same issue on iOS Safari browser? If yes, is it related to this one?

Discodir commented 2 years ago

Hi @fizampou.

I know about supported browsers. Web view is working perfectly with Win Forms app and Xamarin Android app. The problem is with iOS 15.1 and video on! My issue is exactly the same as yours (the one you pinned 16 days ago) as I have already commented! Yes, the same issue is happening when I open my Web Core 3.1 app directly from a page of iOS Safari browser. I will try tomorrow version 1.3.1-beta.1 and let you know.

Thank you for your help.

Χαιρετισμούς από Αθήνα, πατριώτη! Σπύρος.

fizampou commented 2 years ago

Yes, this is known issue. It's a regression Apple introduced on iOS 15.1 Safari, affects web views too. It's fixed on iOS 15.2 beta - pending release.

Χαιρετισμούς!

Discodir commented 2 years ago

Installed version 1.3.1-beta.1 as you mentioned, but unfortunately problem still exists. Can not join group meeting from iPhone with video ON while using iOS 15.1.

I guess I will have to wait for iOS 15.2.

Χαιρετισμούς!

Discodir commented 2 years ago

@fizampou, have a look on npm list.

+-- @azure/communication-calling@1.3.1-beta.1 | +-- @azure/communication-common@1.1.0 | | +-- @azure/abort-controller@1.0.4 | | | -- tslib@2.3.1 deduped | | +-- @azure/core-auth@1.3.2 | | | +-- @azure/abort-controller@1.0.4 deduped | | |-- tslib@2.3.1 deduped | | +-- @azure/core-http@2.2.2 | | | +-- @azure/abort-controller@1.0.4 deduped | | | +-- @azure/core-asynciterator-polyfill@1.0.0 | | | +-- @azure/core-auth@1.3.2 deduped | | | +-- @azure/core-tracing@1.0.0-preview.13 deduped | | | +-- @azure/logger@1.0.3 deduped | | | +-- @types/node-fetch@2.5.12 | | | | +-- @types/node@16.11.9 | | | | -- form-data@3.0.1 extraneous | | | +-- @types/tunnel@0.0.3 | | | |-- @types/node@16.11.9 deduped | | | +-- form-data@4.0.0 | | | | +-- asynckit@0.4.0 | | | | +-- combined-stream@1.0.8 | | | | | -- delayed-stream@1.0.0 | | | |-- mime-types@2.1.34 | | | | -- mime-db@1.51.0 | | | +-- node-fetch@2.6.6 | | | |-- whatwg-url@5.0.0 | | | | +-- tr46@0.0.3 | | | | -- webidl-conversions@3.0.1 | | | +-- process@0.11.10 | | | +-- tough-cookie@4.0.0 | | | | +-- psl@1.8.0 | | | | +-- punycode@2.1.1 | | | |-- universalify@0.1.2 | | | +-- tslib@2.3.1 deduped | | | +-- tunnel@0.0.6 | | | +-- uuid@8.3.2 | | | -- xml2js@0.4.23 | | | +-- sax@1.2.4 | | |-- xmlbuilder@11.0.1 | | +-- @azure/core-tracing@1.0.0-preview.13 | | | +-- @opentelemetry/api@1.0.3 | | | -- tslib@2.3.1 deduped | | +-- events@3.3.0 | | +-- jwt-decode@2.2.0 | |-- tslib@2.3.1 | -- @azure/logger@1.0.3 |-- tslib@2.3.1 deduped -- env-cmd@10.1.0 +-- commander@4.1.1 -- cross-spawn@7.0.3 +-- path-key@3.1.1 +-- shebang-command@2.0.0 | -- shebang-regex@3.0.0 -- which@2.0.2 `-- isexe@2.0.0

fizampou commented 2 years ago

Can you try on Safari? Can you share a code snippet on how are you joining the call?

What is the exact behavior? Are there other participants on the call? Can you try on iOS 15.2 beta also?

Discodir commented 2 years ago

Hi @fizampou.

Sorry for the delay but I have a serious problem with this bug on a medical app I have developed.

  1. Can you try on Safari? I start a video call from my (Win10 or Xamarin Android) app with camera on. Copy-paste 'groupId' address to Safari url address of an iPhone. Join is committed, everything is working fine with iPhone(Safari) camera off. When iPhone(Safari) camera is turned on, for a second local video stream is visible on iPhone. but at the moment that remote video stream (from iPhone) starts rendering on (Win10 or Xamarin Android) app, then Safari crashes and creates a new groupId asking for permissions again.

  2. Can you share a code snippet on how are you joining the call? I have migrated 'web-calling-hero' (React) as a web app (Net Core 3.1) on Azure with no code changes. I call the web app from:

All combinations (with two participants) working fine, with cameras on and mics on for (Win10 or Xamarin Android) apps and Xamarin iOS 15.1 app camera off. At the moment that camera is turned on, on Xamarin iOS 15.1 app then SFSafariViewController crashes and restarts a new groupId.

  1. What is the exact behavior? I have already described it above. I believe that problem is spotted at the point where remote (from iOS 15.1) video stream starts rendering on local devices.

  2. Are there other participants on the call? In all cases there are two participants. That's the scenario I am interested for.

  3. Can you try on iOS 15.2 beta also? I have not tried yet.

Thank you in advance. Σπύρος

fizampou commented 2 years ago

Yes that seems like the regression i mentioned above on webkit. Preparing a new release that will bypass that issue untill iOS 15.2 is released.

That should help with the issue you are facing.

Discodir commented 2 years ago

Thank you very much. Is there a timeline for this new release?

fizampou commented 2 years ago

Just released.

More info here

Either 1.3.2 beta or stable

Discodir commented 2 years ago

I confirm that iOS 15.2 fixed the bug.