BotBuilderCommunity / botbuilder-community-dotnet

Part of the Bot Builder Community Project. Repository for extensions for the Bot Builder .NET SDK, including middleware, dialogs, recognizers and more.
MIT License
278 stars 170 forks source link

Infobip WhatsApp - An error occurred while sending the request. #438

Open DainHeart opened 2 years ago

DainHeart commented 2 years ago

I have been running the Infobip WhatsApp adapter for over a year now, and consistently the bot throws the below error.

An error occurred while sending the request.

The bot throws this randomly depending on usage. The stack trance is always exactly the same as seen below.

at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task'1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Bot.Builder.Community.Adapters.Infobip.Core.InfobipHttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Bot.Builder.Community.Adapters.Infobip.Core.InfobipClientBase.SendMessageAsync(InfobipOmniFailoverMessageBase infobipMessage, CancellationToken cancellationToken) at Bot.Builder.Community.Adapters.Infobip.WhatsApp.InfobipWhatsAppAdapter.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken) at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass31_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext()

This error appears to have something to do with either the adapter itself or Infobips service. I would appreciate any feedback about what this issue is or who I should follow up with. The adapter itself works perfectly well 99% of the time with the exception of this error.

Would appreciate any feedback. Thanks.

csmuthukuda commented 2 years ago

@DainHeart do you know how to get App secret as mentioned here https://github.com/BotBuilderCommunity/botbuilder-community-dotnet/blob/develop/libraries/Bot.Builder.Community.Adapters.RingCentral/README.md thanks in advance

DainHeart commented 2 years ago

@csmuthukuda hi there. Yes we have created the secret key and had Infobip link it to the number. The WhatsApp adapter is working. Users message the bot and the bot replies on WhatsApp. This error occurs a few times a day though. We have deployed the bot onto different WhatsApp adapters such as Twilio and the same error does not occur. Seems to be an issue with the Infobip Adapter. Just trying to get some clarity on what the issue actually is.

Jiandro commented 11 months ago

@DainHeart Did you solve the error?