microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
208 stars 231 forks source link

Bot never joins Team Meeting: Server Internal Error. DiagCode: 500#1203003.@ #775

Open aliasmac opened 6 days ago

aliasmac commented 6 days ago

Describe the issue

When inviting the bot to a Teams call we receive a HTTP 500 error and the bot never joins the call.

Code Snippet

var statefulCall = await this.Client.Calls().AddAsync(joinParams).ConfigureAwait(false);

This runs successfully, but we never receive the established callback.

Expected behavior

We expect to receive a series of callbacks from Microsoft. We expect to receive the established callback that eventually resolves to the Bot joining a Teams call.

Graph SDK (please complete the following information):

Microsoft.Graph.Communications.Calls" Version="1.2.0.850"
Microsoft.Graph.Communications.Client" Version="1.2.0.850"
Microsoft.Graph.Communications.Common" Version="1.2.0.850"
Microsoft.Graph.Communications.Core" Version="1.2.0.850"
Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.850"
Microsoft.Skype.Bots.Media" Version="1.27.0.2-alpha"

Call ID

Time: 2024-10-14 16:13:09.754 | time="2024-10-14T15:13:09.7547304Z callChainId: ceb776d1-051b-4257-b170-4f53376418e7

Logs

Initial POST api/calling request where state is establishing

{
  "@odata.type": "#microsoft.graph.commsNotifications",
  "value": [
    {
      "@odata.type": "#microsoft.graph.commsNotification",
      "changeType": "updated",
      "resource": "/app/calls/00003680-2f08-421e-8420-b8684632e4c5",
      "resourceUrl": "/communications/calls/00003680-2f08-421e-8420-b8684632e4c5",
      "resourceData": {
        "@odata.type": "#microsoft.graph.call",
        "state": "establishing",
        "chatInfo": {
          "@odata.type": "#microsoft.graph.chatInfo",
          "threadId": "19:meeting_MzdhZDk5YTctMTNlMi00ZGYzLWE3NjAtMmQ4MzlhY2RmZmYy@thread.v2",
          "messageId": "0"
        },
        "meetingInfo": {
          "@odata.type": "#microsoft.graph.organizerMeetingInfo",
          "organizer": {
            "@odata.type": "#microsoft.graph.identitySet",
            "user": {
              "@odata.type": "#microsoft.graph.identity",
              "id": "f353f265-2c71-41c1-9537-9df59b7f2965",
              "tenantId": "<ommitted>"
            }
          },
          "callChainId": "d8bcb98a-6906-4124-baf2-f952d158a8d5"
        }
      }
    }
  ]
}

After a further 4 establishing requests we receive this as the 6th request that updates state to terminated:

{
  "@odata.type": "#microsoft.graph.commsNotifications",
  "value": [
    {
      "@odata.type": "#microsoft.graph.commsNotification",
      "changeType": "deleted",
      "resource": "/app/calls/0a003680-3adb-42a1-ac37-8cd856289569",
      "resourceUrl": "/communications/calls/0a003680-3adb-42a1-ac37-8cd856289569",
      "resourceData": {
        "@odata.type": "#microsoft.graph.call",
        "state": "terminated",
        "resultInfo": {
          "@odata.type": "#microsoft.graph.resultInfo",
          "code": 500,
          "subcode": 1203003,
          "message": "Server Internal Error. DiagCode: 500#1203003.@"
        },
        "chatInfo": {
          "@odata.type": "#microsoft.graph.chatInfo",
          "threadId": "19:meeting_MzdhZDk5YTctMTNlMi00ZGYzLWE3NjAtMmQ4MzlhY2RmZmYy@thread.v2",
          "messageId": "0"
        },
        "meetingInfo": {
          "@odata.type": "#microsoft.graph.organizerMeetingInfo",
          "organizer": {
            "@odata.type": "#microsoft.graph.identitySet",
            "user": {
              "@odata.type": "#microsoft.graph.identity",
              "id": "f353f265-2c71-41c1-9537-9df59b7f2965",
              "tenantId": "<ommitted>"
            }
          },
          "callChainId": "ceb776d1-051b-4257-b170-4f53376418e7"
        }
      }
    }
  ]
}

Additional context

csk-bsi commented 6 days ago

I encounter the same issue in a different environment: https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/772

InDieTasten commented 5 days ago

Can you confirm that the media platform part of your bot was able to initialize successfully? I think it would help if you could provide the GraphLogger output of the SDK initialization and logs during the join attempt, ideally in a spoiler

Like this ```text Long list of GraphLogger output ```
aliasmac commented 3 days ago

Hey @InDieTasten thanks for the tip, adding the logging revealed the root cause which we were able to fix, wasn't aware we could add the logger to the media platform, thanks!

csk-bsi commented 3 days ago

Hey, could you describe your root cause? I may face the same issue: https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/772

Thanks!

aliasmac commented 3 days ago

@csk-bsi it was the most innocuous error, we were passing env variables via the k8s manifest for the different port mappings and since we're using .NET it expects a specific formatting which we got wrong for the public port, so instead of using the port we were exposing on our LB it was using a hardcoded port on our appsetting.json!

tedlatte commented 3 days ago

Hey @aliasmac, if you're dealing with issues where a bot never joins a Teams meeting due to server errors, you might want to check out the Recall.ai API.

It’s a simple 3rd party API that lets you use meeting bots to join meetings and capture raw audio/video/metadata without needing to build, scale, and maintain these bots yourself.

Here are the API docs: https://docs.recall.ai