MS Teams' Bot crashing after adding the bot to call

Anand Shende 1 Reputation point
2022-03-16T11:36:14.48+00:00

Hi,

I am intermittently getting the following error while extending the recording bot (https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/AksSamples/teams-recording-bot).

Exception Caught
A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Skype.Bots.Media.VideoFramePlayer.<EnqueueBuffersAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Skype.Bots.Media.AudioVideoFramePlayer.<EnqueueBuffersAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at RecordingBot.Services.Bot.ExceptionExtensions.<ForgetAndLogExceptionAsync>d__0.MoveNext() in C:\Deployment\MS_Teams_VA\Samples\V1.0Samples\AksSamples\teams-recording-bot\src\RecordingBot.Services\Bot\ExceptionExtensions.cs:line 51

I am trying to respond after user input using the following code:

await this.audioVideoFramePlayer.EnqueueBuffersAsync(localAudioMediaBuffersList, localVideoMediaBuffers)
.ForgetAndLogExceptionAsync(_logger, "Exception while adding Audio Video Buffers")
.ConfigureAwait(false);

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
876 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,751 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,471 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Anand Shende 1 Reputation point
    2022-03-17T06:06:05.55+00:00

    @ChetanSharmamsft There are no fixed steps to reproduce this. But let explain what I am doing here.

    There are 2 files - one for Audio and another one for Video. I read those files and convert them to YUV(NV12) Buffers.

    In my application, I am continuously sending out Video frames, the Audio frames are sent when some events(irrelevant to this conv) are triggered.
    Intermittently while sending these Audio Frames I see the above issue in the application logs.

    So far, I haven't been able to spot a pattern, to establish the steps to reproduce.


  2. Anand Shende 1 Reputation point
    2022-03-17T15:51:35.183+00:00

    @Prasad-MSFT By Teams crashing do you mean the SDK crashing ?
    I will get back to you with the updates after reducing the data frames being sent.

    0 comments No comments

  3. Amanda 1 Reputation point
    2023-01-01T16:21:42.053+00:00

    @Anand Shende have you looked at Recall.ai? It fixed our bot crashing issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.