microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.44k forks source link

[Skype] Channel not working for Bot Channel Registration #5447

Closed joaodotneto closed 5 years ago

joaodotneto commented 5 years ago

Bot Info

Issue Description

The skype request arrives in my local server (exposed using Ngrok) but when the service tries to reply, the error below occurs:

Operation returned an invalid status code 'Forbidden'

My Stacktrace:

at Microsoft.Bot.Connector.Conversations.ReplyToActivityWithHttpMessagesAsync(String conversationId, String activityId, Activity activity, Dictionary2 customHeaders, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Connector\Conversations.cs:line 1121 at Microsoft.Bot.Connector.ConversationsExtensions.ReplyToActivityAsync(IConversations operations, String conversationId, String activityId, Activity activity, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Connector\ConversationsExtensions.cs:line 241 at Microsoft.Bot.Builder.BotFrameworkAdapter.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 327 at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass22_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext() in d:\a\1\s\libraries\Microsoft.Bot.Builder\TurnContext.cs:line 267 End of stack trace from previous location where exception was thrown --- at Microsoft.Bot.Builder.TurnContext.SendActivityAsync(IActivity activity, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\TurnContext.cs:line 196 at mcBotFrameworkTemplate.Bots.EchoBot.OnMessageActivityAsync(ITurnContext1 turnContext, CancellationToken cancellationToken) in G:\0 - Projetos\BotFramework-PoC\mcBotFrameworkTemplate\mcBotFrameworkTemplate\Bots\EchoBot.cs:line 29 at Microsoft.Bot.Builder.BotFrameworkAdapter.TenantIdWorkaroundForTeamsMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 964 at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\MiddlewareSet.cs:line 55 at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotAdapter.cs:line 167 at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotAdapter.cs:line 177 at Microsoft.Bot.Builder.BotFrameworkAdapter.ProcessActivityAsync(ClaimsIdentity identity, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 244 at Microsoft.Bot.Builder.BotFrameworkAdapter.ProcessActivityAsync(String authHeader, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 215 at Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter.ProcessAsync(HttpRequest httpRequest, HttpResponse httpResponse, IBot bot, CancellationToken cancellationToken) in d:\a\1\s\libraries\integration\Microsoft.Bot.Builder.Integration.AspNet.Core\BotFrameworkHttpAdapter.cs:line 56 at mcBotFrameworkTemplate.Controllers.BotController.PostAsync() in G:\0 - Projetos\BotFramework-PoC\mcBotFrameworkTemplate\mcBotFrameworkTemplate\Controllers\BotController.cs:line 36

Reproduction Steps

jwiley84 commented 5 years ago

Hi @joaodotneto! I saw you posted this question here, so I'm going to close this one, as the Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repos are the preferred platform for submitting bug fixes and feature requests.

As a side note, 500 errors tend to happen because some sort of AppID/AppPassword mismatch. Check that your bot code has the proper values.

joaodotneto commented 5 years ago

Hi @joaodotneto! I saw you posted this question here, so I'm going to close this one, as the Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repos are the preferred platform for submitting bug fixes and feature requests.

As a side note, 500 errors tend to happen because some sort of AppID/AppPassword mismatch. Check that your bot code has the proper values.

About your note: I tried more than 20 times before posting here, drop and recreate settings on Azure, drop and recreate .Net solution, set the AppID/AppPassword exactly, in code or config, and in all cases the error is the same.

But thanks, i'll wait for a good soul to help me in Stack Overflow.

jwiley84 commented 5 years ago

No worries, that good soul will be a member of the support team (unless a community member beats us to it!)

joaodotneto commented 5 years ago

Same error using the CoreBot from samples. Skype have any type of restriction when using Ngrok?

oh my... I create a Web App Bot in Azure, change NOTHING just add Skype as Channel and... VOILA! same error... FknError

I create another azure account, and make a Web App Bot, Skype is working. Something in azure can shit the things. Thanks in advance.