aws / amazon-chime-sdk-ios

An iOS client library for integrating multi-party communications powered by the Amazon Chime service.
https://aws.amazon.com/chime/chime-sdk/
Apache License 2.0
139 stars 64 forks source link

I got a phone call and now the audio is gone and I get audioOutputDeviceNotResponding #657

Closed hvsw closed 1 month ago

hvsw commented 4 months ago

Describe the bug I got a phone call during a Chime session and now the audio is gone. I need to re-create the meeting session to fix it.

What's the course of action for this? Should clients re-create the session in this case? Can we get more information on what happened?

Similar issues:

  1. 220

  2. 526

  3. 633

To Reproduce Steps to reproduce the behavior:

  1. Join a call in a replica (only listening) without CallKit integration.
  2. Answer a phone call.
  3. Drop off the phone call.
  4. You'll get an audioOutputDeviceNotResponding after some seconds.

Expected behavior Audio should recover normally.

Logs

[ERROR] DefaultMeetingSession - spk: signal buf too full for 1500 consecutive frames, spk stream failed
[ERROR] DefaultMeetingSession - media stream: spk tick failed; err=4 res=2
[INFO] DefaultMeetingSession - AudioClient State: fail Status: audioOutputDeviceNotResponding
[ERROR] DefaultMeetingSession - xal_apple: timed out waiting for spk shutdown

Test environment Info (please complete the following information):

linsang21 commented 2 months ago

Hi @hvsw, can you reproduce the issue with our demo app? This is interesting because I think the SDK session would be able to handle phone call interruption even without callkit, and from the error log, the session ends because no responding from the audio output (speaker, headphone...), which I don't usually see that with the normal phone call, did the app got killed by the system? Also what's the reason you want to do this without callkit?

hvsw commented 2 months ago

@linsang21 thanks for the reply, here's the follow up:

can you reproduce the issue with our demo app?

I haven't tried.

This is interesting because I think the SDK session would be able to handle phone call interruption even without callkit, and from the error log, the session ends because no responding from the audio output (speaker, headphone...), which I don't usually see that with the normal phone call

Indeed it's interesting, I'd expect it to recover normally like any other "music player"(especially since I'm connected as a viewer only so AudioDeviceCapabilities.outputOnly. I wonder if audio is dying because of some rerouting (similar to https://github.com/aws/amazon-chime-sdk-ios/issues/465#issuecomment-1981742520) happening to handle the phone call and then the Chime audio session explodes and doesn't recover afterwards.

did the app got killed by the system?

No, it keeps running just fine, I can even see the video, just the audio gets busted.

what's the reason you want to do this without callkit?

That's just the way our app is right now.

linsang21 commented 2 months ago

@hvsw could you test these on your app?

dinmin-amzn commented 1 month ago

Fix for this issue has been released in AmazonChimeSDKMedia 0.20.1.