microsoft / botbuilder-js

Welcome to the Bot Framework SDK for JavaScript repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using JavaScript.
https://github.com/Microsoft/botframework
MIT License
680 stars 276 forks source link

ECONNRESET error (out of the blue) #4738

Closed jker-org closed 1 month ago

jker-org commented 1 month ago

Versions

Here are our packages:

"dependencies": {
        "adaptive-expressions": "^4.20.0",
        "adaptivecards": "^3.0.1",
        "adaptivecards-templating": "^2.3.1",
        "botbuilder": "^4.20.0",
        "crypto-js": "^4.2.0",
        "restify": "^11.1.0"
}

Describe the bug

Our bot runs in Microsoft Teams. When the user interacts with the bot (e.g. via Action.Execute), our out bot is called (via invokeAction). We then try to get the context of the user: const account: TeamsChannelAccount = await TeamsInfo.getMember(context, context.activity.from.id);

Since yesterday night, the ECONNRESET error from TeamsInfo spiked. Every 20 mins we receive an error from TeamsInfo like this one:

{
    "error": {
        "message": "request to https://smba.trafficmanager.net/kr/v3/conversations/xxxxxxxxxxxxxxxxxx4060909e5857e4973dde%40thread.v2/members/xxxxxxxxxxxxxxxxxxxxx-oKuTvKFv8xSnaTmXxPwiAk716rKqwBCCeopkrZWVX6AR9A failed, reason: read ECONNRESET",
        "type": "system",
        "errno": "ECONNRESET",
        "code": "ECONNRESET"
    }
}

The bot was running fine with no problems for weeks. The error suddenly popped up yesterday night.

To Reproduce

Happens randomly.

Expected behavior

No error.

Are there any known outages? Thanks for checking!

StevieBleeds commented 1 month ago

Yep, getting the same here too as of this morning. Noticed it with a couple DEV/TEST bots and is now affecting our PROD bots.

StevieBleeds commented 1 month ago

I've had a look at our application insights instance relating to one of the affected bots and it appears to be related to the https://smba.trafficmanager.net endpoint and the sporadic nature of execution timings (longest time has been 1 minute). Everything else appears to be working fine in the application layer other than this endpoint.

stevkan commented 1 month ago

The above endpoint is managed entirely by Teams and not BotFramework. For this reason, I will be closing this issue.

I would suggest either opening an Azure help ticket within the Azure portal or posting this on Microsoft Q&A and tagging it with 'Microsoft Teams'. The Q&A forum is an active community that is often monitored by Teams support staff.

jker-org commented 1 month ago

I have created a new ticket for this: https://github.com/MicrosoftDocs/msteams-docs/issues/11559