# OPERATION\_TIMEOUT on await Stream.startAudio()

**URL:** <https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [May 30, 2023, 7:43am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252 "2023-05-30T07:43:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![redenfloyd.cayanan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/redenfloyd.cayanan/32/40517_2.png) [@redenfloyd.cayanan](https://devforum.zoom.us/u/redenfloyd.cayanan)\
**Post date:** [May 30, 2023, 7:43am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/1 "2023-05-30T07:43:39Z")

</div>

Hi,

Can I ask help on this matter please? I always got OPERATION\_TIMEOUT when calling Stream.startAudio(). By the way I am using Zoom Video SDK version 1.7.7 and Google Chrome Version 113.0.5672.127 (Official Build) (64-bit).

Here is how I do it:

Function to join zoom session meeting:  
Note: This joinSessionMeeting is triggerred when we click a button from the DOM.

```auto
async joinSessionMeeting(sessionMeetingID : string) { 
  await this.zoomClient.join(
    this.currentSession.topic,
    session_token,
    this.self.fullname,
    this.currentSession.password
  ).then(() => {

    /* SOME CODES HERE */

    this.zoomStream = this.zoomClient.getMediaStream();
    this.zoomCmd = this.zoomClient.getCommandClient();

    /* SOME CODES HERE */

  }).catch((error) => {
    console.log(error);
  });

  // Initializes Zoom Client Event Listenrs like on user-added
  await this.initClientEventListeners();

  // start audio and make sure to unmute it
  await this.startAudio();

  await this.switchMicSpeaker();
}

```

Function to start zoom stream Audio:

```auto
async startAudio() {
    
  await this.zoomStream.startAudio();

  try {
    if (this.zoomStream.isAudioMuted()) {
      this.zoomStream.unmuteAudio();
      console.log("====AUDIO UNMUTED====");
    }
  } catch (e) {
    console.log(e);
  }      
}

```

After about 3-6 seconds it wil throw error:

```auto
Uncaught (in promise) {type: 'OPERATION_TIMEOUT'}

```

I did some changes on my startAudio() funtion for testing and just to try recall startAudio when I got that first error. I was hoping during the first run of startAudio my computer audio is busy since the documentation ([SDK Reference](https://marketplacefront.zoom.us/sdk/custom/web/modules.html#ErrorTypes)) states that

> OPERATION\_TIMEOUT: The operation timed out, try again later.

```auto
async startAudio() {
    
  await this.zoomStream.startAudio().then(() => {
    try {
      if (this.zoomStream.isAudioMuted()) {
        this.zoomStream.unmuteAudio();
        console.log("====AUDIO UNMUTED====");
      }
    } catch (e) {
      console.log(e);
    }     
  }).catch(async (error) => {
    const AudioError = error as ExecutedFailure;
    if(AudioError.type === 'OPERATION_TIMEOUT'){
      console.error('=== FORCE to startAduio ===', AudioError);
      await this.startAudio();
    }

  });   
},

```

But it throws OPERATION\_TIMEOUT repeatedly,

---

<div class="post-metadata">

**Author:** ![redenfloyd.cayanan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/redenfloyd.cayanan/32/40517_2.png) [@redenfloyd.cayanan](https://devforum.zoom.us/u/redenfloyd.cayanan)\
**Post date:** [June 2, 2023, 2:38am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/3 "2023-06-02T02:38:00Z")

</div>

Do you have any idea on this please?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [June 2, 2023, 3:45am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/4 "2023-06-02T03:45:21Z")

</div>

Hey @redenfloyd.cayanan

Thanks for your feedback.

We do have `OPERATION_TIMEOUT` error if the user doesn’t allow the microphone permission within 40 seconds after the permission consent popup appears.

But for 3-6 seconds error, we tested the code you shared above but didn’t reproduce the issue.

Can you check whether the microphone is granted or blocked on the site?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![ellis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ellis/32/28485_2.png) [@ellis](https://devforum.zoom.us/u/ellis)\
**Post date:** [June 2, 2023, 6:43am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/5 "2023-06-02T06:43:34Z")

</div>

im sure its all related to this issue… with Chrome and permissions… even if its on the Meeting Web SDK…  
But im sure its all related… because… its a chrome permissions thing with the SDK… i can put my left nut on it…

> [@Mobile audio issues (safari & chrome)](https://devforum.zoom.us/t/mobile-audio-issues-safari-chrome/88761/32):
>
> @williamhsu88157976@vic.yang @alisson @tommy It feels like we the only 3 people in the world that is using the web sdk… hahaha… because we the only one’s picking this up… I have updated my software on my phone… i have the latest chrome. Its a samsung A21. But it still seems ver 2.12.2 clashes with the permissions with chrome somewhere. Just to be clear again. Don’t know if its just “Android” phones, as i don’t have apple. Works on Samsung Brower but not Chrome - This is for mobile br…

---

<div class="post-metadata">

**Author:** ![hicucu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hicucu/32/49094_2.png) [@hicucu](https://devforum.zoom.us/u/hicucu)\
**Post date:** [June 5, 2023, 12:56am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/6 "2023-06-05T00:56:59Z")

</div>

I am also experiencing the same problem.  
I encountered the same issue when running the Video SDK for web sample.  
There seems to be an issue with the @zoom1234/videosdk version 1.7.X, but it works fine with version 1.6.X.  
In the case of version 1.7.X, there are issues when using it with the latest Firefox and Chrome browsers.However, it works fine when attempting to use it on mobile devices with a mobile browser.  
The problem only occurs when using it on PC browsers.  
The error occurs consistently after a certain period of time without prompting for microphone permission.

---

<div class="post-metadata">

**Author:** ![redenfloyd.cayanan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/redenfloyd.cayanan/32/40517_2.png) [@redenfloyd.cayanan](https://devforum.zoom.us/u/redenfloyd.cayanan)\
**Post date:** [June 5, 2023, 2:42am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/7 "2023-06-05T02:42:36Z")

</div>

@vic.yang I’m sorry about the 3-6 seconds, I tested again an check console timestamps this was the result:  
First Log (1st Red Rectangle), was when event listeners where initialize/activated.  
Second Log (1st Red Rectangle) , this was when the startAudio returns and OPERATION TIMEOUT

```auto
 // Initializes Zoom Client Event Listenrs like on user-added
  await this.initClientEventListeners();![console-timestamp|537x354]

```

I agree that timeout its about 40 seconds, this was the really problem that I am experiencing.

![console-timestamp](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/7/c7ffafe44a50592644a148c03f8a5272e4647b08.png)

`Can you check whether the microphone is granted or blocked on the site?`  
There is a screenshot of my permissions.  
 ![microphone-camera-permissions](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/2/a2dd46dc27291418324848e3956fcc5592826768.png)

I agree with @ellis @hicucu as well. I also got those errors/issues they mentioned.

Hoping fo your quick response.

---

<div class="post-metadata">

**Author:** ![ellis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ellis/32/28485_2.png) [@ellis](https://devforum.zoom.us/u/ellis)\
**Post date:** [June 5, 2023, 7:12am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/8 "2023-06-05T07:12:59Z")

</div>

the problem that im getting is… even if you set the permissions in the “Browser” settings… it still not setting the permissions on the app settings itself…

If your app settings is set to Ask every time … the in theory it should take the “Browser” settings into consideration and make them work… BUT… i have found that its not the case… its as if the “Join by Audio” is only setting the Browsers permissions by not the App itselfs permissions…

I dont know if its a SDK thing or the App thing with Chrome…

But by default if this is selected in the App settings itself… it will not work… even if its says “ask every time”

 ![3](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/9/99d1419d5dea7abaaf33e1d1995157880c0dcd78.jpeg)

If you say in the APP settings “Allow only while using this app” then it works…

---

<div class="post-metadata">

**Author:** ![redenfloyd.cayanan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/redenfloyd.cayanan/32/40517_2.png) [@redenfloyd.cayanan](https://devforum.zoom.us/u/redenfloyd.cayanan)\
**Post date:** [June 27, 2023, 1:42am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/9 "2023-06-27T01:42:28Z")

</div>

@vic.yang do you have any update about the issue mentioned above? Hoping for your response.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [June 27, 2023, 2:15am UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/10 "2023-06-27T02:15:08Z")

</div>

Hey @redenfloyd.cayanan

I reviewed the codes you provided again and found that the audio connected right after the session is joined. It may be related to the audio autoplay policy.

Could you add an event listener for `auto-play-audio-failed` event?

```plaintext
client.on('auto-play-audio-failed', () => {
  console.log('auto play failed, waiting for a user interaction')
})

```

Once the user interacts with the page, the audio will be connected automatically.

> **[Video SDK - web - Audio](https://developers.zoom.us/docs/video-sdk/web/audio/#autoplay-audio)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 27, 2023, 12:15pm UTC](https://devforum.zoom.us/t/operation-timeout-on-await-stream-startaudio/89252/11 "2023-07-27T12:15:17Z")

</div>

Closed on July 27, 2023, 12:15pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
