botbuilder-community-dotnet icon indicating copy to clipboard operation
botbuilder-community-dotnet copied to clipboard

Infobip WhatsApp - An error occurred while sending the request.

Open DainHeart opened this issue 4 years ago • 3 comments

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.

DainHeart avatar Aug 17 '21 07:08 DainHeart

@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

csmuthukuda avatar Sep 01 '21 04:09 csmuthukuda

@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.

DainHeart avatar Sep 01 '21 09:09 DainHeart

@DainHeart Did you solve the error?

Jiandro avatar Aug 09 '23 21:08 Jiandro