AVAudioSession Proxy Session error on iOS 16

I am developing a WebRTC-based app that uses Twilio on a WKWebView. As part of the app, we have a diagnostics page that uses Twilio's diagnostics package.

Testing the microphone (in an actual device, with permissions granted) fails on iOS 16+ with error:

AVAudioSession_iOS.mm:1810  Creating proxy session failed, session ID = 4595731, error = Error Domain=NSOSStatusErrorDomain Code=-50 "Session lookup failed" UserInfo={NSLocalizedDescription=Session lookup failed}

However, this feature works with iOS 15 and below. And actual calls audio and video are unaffected. The error only appears when running diagnostics.

Any explanation as for why AVAudioSession fails, and possible solution to fix this issue would be greatly appreciated.

AVAudioSession Proxy Session error on iOS 16
 
 
Q