Intermittent OPERATION_TIMEOUT with stream.startAudio on iPhone in Zoom Video SDK

  • To Submit a Ticket for Unexpected Video SDK Behavior:

I am developing a service using the Zoom Video SDK that involves video calls. When executing stream.startAudio from an iPhone, I occasionally encounter an OPERATION_TIMEOUT error. This operation is triggered by a user clicking a button, and I have confirmed that the microphone permissions are granted before this process.

Additionally, after the OPERATION_TIMEOUT occurs, there are rare cases where the “current-audio-change.{“action”:“join”,“type”:“computer”}” event is triggered about 2 to 3 minutes later, allowing audio to join. The “auto-play-audio-failed” event does not occur.

Could you please investigate the cause of this issue?

Below is a snippet of the code I am using.

const startAudio = useCallback(async () => {
    if (!stream) return
    if (isStartedRef.current) return

    setIsProcessing(true)
    return await stream
      .startAudio()
      .catch((e) => {
        handleError(e)
        throw e
      })
  }, [stream, handleError])

useEffect(() => {
    if (!client) return
    const handler = () => {
      console.error('failed auto-play')
    }
    client.on('auto-play-audio-failed', handler)
    return () => {
      client.off('auto-play-audio-failed', handler)
    }
  }, [client])

useEffect(() => {
    const handler = (payload: CurrentAudioChangePayloadType) => {
      console.log('current-audio-change.' + JSON.stringify(payload))
      const { action } = payload
      if (action === AudioChangeAction.Join) {
        setIsProcessing(false)
        setIsStared(true)
        isStartedRef.current = true
      } else if (action === AudioChangeAction.Leave) {
        setIsProcessing(false)
        setIsStared(false)
        isStartedRef.current = false
      } else if (action === AudioChangeAction.Muted) {
        setIsMute(true)
        localStorage.setItem(MIC_STATUS_KEY, 'true')
      } else if (action === AudioChangeAction.Unmuted) {
        setIsMute(false)
        localStorage.setItem(MIC_STATUS_KEY, 'false')
      }
    }
    client.on('current-audio-change', handler)
    return () => {
      client.off('current-audio-change', handler)
    }
  }, [client])

  useEffect(() => {
    const handler = (payload: any) => {
      console.log('device-permission-change' + JSON.stringify(payload))
    }
    client.on('device-permission-change', handler)
    return () => {
      client.off('device-permission-change', handler)
    }
  }, [client])

<button disabled={isAudioProcessing} onClick={startAudio}>
  start audio
 </button>

Format Your New Topic as Follows:

Video SDK Type and Version
@zoom/videosdk: 1.11.6

Error?
stream.startAudio()
=> OPERATION_TIMEOUT

Troubleshooting Routes
I am not sure if it is the same phenomenon, but after entering the session from the following site using the same device, I also received an OPERATION_TIMEOUT notification at the bottom right. About a minute later, a popup appeared asking to use the camera, and I was able to join after granting permission.

https://videosdk.dev/uitoolkit/

How To Reproduce

Hey @yusuke.yamashita

Thanks for your feedback.

Could you share some problematic Session IDs with us for troubleshooting purposes?

Thanks
Vic

It happened again just now.
WJUFVV8qQm+VCG9o9m4dMA==

User who encountered the error:
iPhone 13 mini iOS 17.5.1
Chrome

User who was also in the session:
Apple M2 Pro, 16GB RAM
Browser: Chrome 125.0.6422.78

Thank you for your assistance.

After the TIMEOUT occurred, about 2 minutes later, a prompt appeared asking for microphone permission. After granting permission, the audio was able to join.

Hey @yusuke.yamashita

Thanks for sharing the session ID with us.

After analyzing the logs, we found that one of the media servers was unavailable. We have resolved this issue. Could you please try again?

We will continue to monitor the production servers to prevent similar issues from occurring in the future. We apologize for any inconvenience this has caused.

Thanks
Vic

Thank you for looking into this.
I tried again, and it still seems to occur.
The session ID is as follows:
QiDUTh3EQce3svieIDb1Qw==

Does it take a long time to recover?

Hey @yusuke.yamashita

Thanks for your feedback.

We have monitored that some issues still persist.

We will let you know as soon as possible once everything is resolved.

Thanks
Vic

Hey @yusuke.yamashita

We fixed it now, could you try it again?

Thanks
Vic

I confirmed that the audio can join without any issues!
Thank you for your assistance!!

@vic.yang this issue still happening with me, using video sdk web sdk version 1.11.6: {"type": "OPERATION_TIMEOUT"} error on startAudio in iOS Safari

1 Like