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

[Bug] Suggested Actions not working in Skype

Open auanish opened this issue 9 years ago • 19 comments

System Information (Required)

•SDK Language: Node •SDK Version: BotFramework 3.8.3 •Development Environment: AZURE_APP_SERVICE

Issue Description

I'm unable to see suggested actions in my Skype bot. I can see them in my emulator and even webchat but not in Skype.

Under the Skype Health section in the dashboard, it says "Unknown activity type"

Code Example

Just reusing the code from here

auanish avatar Jul 03 '17 11:07 auanish

I believe that is a known issue. I read before that SuggestedActions are not supported. Not sure what's the current status of this issue.

xjose97x avatar Jul 03 '17 16:07 xjose97x

If you look at the Skype developers website, it says Suggested Actions are supported.

2017-07-03 18_27_42-skype for developers

My bot is currently in preview though and not published. Could it be a preview limitation?

auanish avatar Jul 03 '17 17:07 auanish

Can confirm, suggested actions are not working on Skype channel. Reproduced via this example: https://github.com/Microsoft/BotBuilder/blob/master/Node/examples/feature-suggestedActions/app.js

nwhitmont avatar Jul 07 '17 22:07 nwhitmont

@Stevenic

nwhitmont avatar Jul 07 '17 22:07 nwhitmont

Suggested actions are supported only in the lastest version of the Android's app. Windows Store version doesn't show the buttons, instead if I use my S8+ I can use them.

Magic73 avatar Jul 25 '17 12:07 Magic73

Suggested actions does not work with SKYPE latest Android's app downloaded from playstore.

SKYPE : VERSION 8.2.0.49163 SKYPE PREVIEW : VERSION 8.3.76.50301

khs3141 avatar Jul 27 '17 08:07 khs3141

It works. I have a S8+ with Skype 8.2.0.49163. you are doing something wrong...

Magic73 avatar Jul 27 '17 09:07 Magic73

Through remote debugging, found the cause of the error. ex.Message : "Activity must include non empty 'text' field or at least 1 attachment"

In emulator and webchat, this exception did not occured, but occured in skype. After setting the value of message.text, it is normally expressed.

Thank you for your help.

khs3141 avatar Jul 28 '17 02:07 khs3141

@khs3141 can you please elaborate what you mean by setting the value of message.text? What piece of code should I add to this example to make Suggested Actions work in Skype?

auanish avatar Jul 28 '17 12:07 auanish

var reply = activity.CreateReply();
reply.Type = ActivityTypes.Message;
reply.Text = ""; // This cannot be null, or skype won't work.
reply.TextFormat = TextFormatTypes.Plain;
reply.SuggestedActions = new SuggestedActions()
{
	Actions = new List<CardAction>()
	{
		new CardAction(){ Title = "Blue", Type=ActionTypes.ImBack, Value="Blue" },
		new CardAction(){ Title = "Red", Type=ActionTypes.ImBack, Value="Red" },
		new CardAction(){ Title = "Green", Type=ActionTypes.ImBack, Value="Green" },
	}
};
await context.PostAsync(reply);

Magic73 avatar Jul 28 '17 14:07 Magic73

BTW, you can have suggested actions on the skype windows store version... but with a bug :

on my previous code, just before PostAsync(reply), add this:

reply.Attachments = new List<Attachment>
    {
        new KeyboardCard(text: "Options:", buttons: reply.SuggestedActions.Actions).ToAttachment()
     };

and like a magic... you'll see the suggested actions buttons! but... you'll see the keyboardcard also :)

so, there's something that has been forget in the suggestedactions implementations for skype, that is present when keyboardcard is used.

Magic73 avatar Jul 28 '17 14:07 Magic73

I'm facing similar issuer. My suggestion is only shown in mobile (IOS, android, Emulator)

sangmai avatar Aug 20 '17 11:08 sangmai

@Magic73 - You are correct. Wonder if the Skype team will fix this... Since it works in the web version of skype I bet it's a simple if-statement that would take 1 hour to write a test or two, fix the issue and make it deployable to the next skype version.

I guess it's a bool displaySuggestedActions = if attachments != null and attachments[0].text != null and attachments[].buttons != null instead of bool displaySuggestedActions = if suggestionActions != null check. (looking at the wrong object) or something like that (null check against the wrong object)

antpant89 avatar Sep 18 '17 09:09 antpant89

The issue has been fixed in the latest versions of skype. I've tried on Skype for desktop and failed, but the SuggestionActions are showing on both skype android app and skype for windows 10

Daddymarto01 avatar May 17 '18 09:05 Daddymarto01

It is not working for me, on any devices tested (Skype for Android (v8.25.0.5), Skype for Ubuntu (v8.13.0.2) and even Skype Web).

Any informations about this issue ?

Kaijiro avatar Jul 16 '18 14:07 Kaijiro

@Kaijiro try Skype for Windows 10 PC. They should work... Also on Android 6.0 that am using the suggested actions are ok. If still can not show then please share code.

Daddymarto01 avatar Jul 16 '18 14:07 Daddymarto01

Tried on W10 with client version 12.1815.209.0 : still not working.

Kaijiro avatar Jul 19 '18 15:07 Kaijiro

Kindly share code I see if I can assist

Daddymarto01 avatar Jul 19 '18 16:07 Daddymarto01

Thank you for opening an issue against the Bot Framework SDK v3. As part of the Bot Framework v4 release, we’ve moved all v3 work to a new repo located at https://github.com/microsoft/botbuilder-v3. We will continue to support and offer maintenance updates to v3 via this new repo.

From now on, https://github.com/microsoft/botbuilder repo will be used as hub, with pointers to all the different SDK languages, tools and samples repos.

As part of this restructuring, we are closing all tickets in this repo.

For defects or feature requests, please create a new issue in the new Bot Framework v3 repo found here: https://github.com/microsoft/botbuilder-v3/issues

For Azure Bot Service Channel specific defects or feature requests (e.g. Facebook, Twilio, Teams, Slack, etc.), please create a new issue in the new Bot Framework Channel repo found here: https://github.com/microsoft/botframework-services/issues

For product behavior, how-to, or general understanding questions, please use Stackoverflow. https://stackoverflow.com/search?q=bot+framework

Thank you.

The Bot Framework Team

benbrown avatar Oct 01 '18 16:10 benbrown