botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Unexpected behaviour with bot in Skype App

Open annevah opened this issue 8 years ago • 4 comments

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3.14.0.0
  • Active Channels: Skype, Web Chat
  • Deployment Environment: ngrok
  • App Id: 5f0fd1ce-2a4e-49be-b981-e38b25008437

Issue Description

I am developing a chatbot for skype call. My bot works fine with test in web chat (Messaging part) and in web.skype (Both message & call) but in the skype app it is not working as expected. The issues that come up are:

  1. Sometimes I have to send a message multiple times for the message to hit the controller.
  2. I have different dialogs. SetupDialog confirms if the skype id is registered in our database. For that I ask the user for his skype id. Once it is confirmed it should hit another ConfirmedDialog. But in skype app only the SetupDialog is being hit.

Earlier I used to send my conversation to the SetupDialog directly later I changed like sending the dialog to a root dialog and from there forwarding the dialog to appropriate dialog based on the flow.

NOTE: When I debug while using the skype app the root dialog never gets hit. But when I chat with the bot from web.skype or webchat root dialog gets hit. Is skype app executing my old code?

Code Example

//Controller
 if (activity.Type == ActivityTypes.Message)
 {
           await Conversation.SendAsync(activity, () => new Dialogs.RootDialog());
 }

//Root Dialog
if (CallStatus.IsInterviewCompleted() == true)
{
          await context.Forward(new InterviewCompletedDialog(), ResumeAfterMessage,activity);
}
else if (CallStatus.IsInterviewOngoing() == true)
{
        await context.Forward(new InterviewOngoingDialog(), ResumeAfterMessage,activity);
}
else if (CallStatus.IsInterviewConfirmed() == true)
{
         await context.Forward(new InterviewConfirmedDialog(), ResumeAfterMessage,activity);
}
else
{
          await context.Forward(new SetupInterviewDialog(), ResumeAfterMessage, activity);
}
            

Expected Behavior

Once the skype user is confirmed, if they send any message it should go to ConfirmedDialog and the bot should reply like this.

Web chat image Skype web image

Actual Results

But in the skype app it goes to the Setup Dialog and asks the user to his skype Id again.

image

Am I doing something wrong? @EricDahlvang

annevah avatar Mar 02 '18 05:03 annevah

Hi @annevah

There is sometimes latency between publishing a new version of your application, and propagation to Skype. Have you tried waiting 20 minutes, and seeing if they changes eventually showup in the skype app?

EricDahlvang avatar Mar 02 '18 21:03 EricDahlvang

Did you mean that if I chat with the bot before 20mins the new version won't be published?

My ngrok session lasts for 7 hours. And I have been testing the bot for 2 days and I didn't find any change.

annevah avatar Mar 03 '18 15:03 annevah

I haven't seen this particular issue before. Please try changing the Messaging Endpoint in the Azure portal, then change it back. (If this is a propagation issue, hopefully this will force a code refresh)

EricDahlvang avatar Mar 05 '18 18:03 EricDahlvang

@EricDahlvang Deleting the bot app and creating a new one solved my issue. Thanks.

annevah avatar Mar 06 '18 12:03 annevah