[Skype] SMBA Trafficmanager dependency failure
Hi there,
Can someone have a look at the following conversation(s): https://smba.trafficmanager.net/apis/v3/conversations/29%3A14Ixw55O1q5njECz3yboUMbNAvVKPk0ES0fiOsIwEZhE/activities/1493801763568
https://smba.trafficmanager.net/apis/v3/conversations/29%3A14Ixw55O1q5njECz3yboUMbNAvVKPk0ES0fiOsIwEZhE/activities/1493795528208
Only through Skype i get in a particular conversation: Sorry, my bot code is having an issue, although this perfectly works in the Bot Emulator and it works in the Webchat interface,
Any idea what's wrong? Can someone figure this out? Couldn't find anything on stackoverflow, hence the issue report here
@KayeeNL are you using C# or Node SDK?
@nwhitmont C#
@KayeeNL smba.trafficmanager.net is the Skype endpoint, so if it is down, that means Skype conversations are the only channel affected.
@nwhitmont it happens all the time when doing one request with a PromptDialog.Choice and when the use selects an option, but only in the Skype channel...that means it would always be down when a particular requests comes...
@nwhitmont When I look at the dev.botframework.com page, next to the Skype channel is see the number increasing when the bot returns 'Sorry, my bot code is having an issue.', when I click the issues I see a list of the following messages:
'Card contains invalid attachment count'
Any idea? This problem does not happen when on the webchat channel or in the emulator
I've not specified the application/vnd.microsoft.card.hero specifically....might have something to do with it...
Will have a look tonight
@nwhitmont When I create a new HeroCard(), and turn that herocard into an attachment: var attachment = card.ToAttachment();
then already the contentType of the attachment has been set to 'application/vnd.microsoft.card.hero', I don't know what's happening....still
@nwhitmont I Found the problem. the problem lies in the fact that i''m returning the message as a carousel: message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
It appears that when I have more attachments in the list Skype throws the 'Sorry, my bot code is having an issue message'. When I switch the code to message.AttachmentLayout = AttachmentLayoutTypes.List; it outputs all the attachments correctly stacked under each other. Is this a bug in the Skype channel with the Carousel Layout? Now only thing what remains is now to test which channel we're at....and then switch how the layout should be displayed.
for now fixed it with a
// Skype doesn't seem to handle the carousel attachmentlayout correctly when having multiple attachments
message.AttachmentLayout = message.ChannelId == "skype" ? AttachmentLayoutTypes.List : AttachmentLayoutTypes.Carousel;
@nwhitmont you one of the people involved in this piece of the code (Skype integration)? Or maybe you can have the productteam have a look at it?
Thanks for the help
--Robbert
Hi.
This is happening to me as well. Just changing:
message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
to
message.AttachmentLayout = AttachmentLayoutTypes.List;
And publishing the code fixes the problem:
Bot replies: Sorry, my bot code is having an issue.
Issue in dev.botframework.com: Card contains invalid attachment count
Glad I found this issue, since it was working perfectly in the Bot Framework Channel Emulator with the Carousel approach (which is the one I want to use...)
Will this get a fix soon?
Is it possible to implement custom AttachmentLayouts ? I guess they wouldn't be correctly interpreted in the Skype channel? Having 1 ThumbnailCard per line on a full skype window wastes too much space...
As I can't comment on your answer in SO, I need to reply here.
The attachment fails when using the Carosel type with only 1 attachment.
This is not true, at least for me. My message had around 30 attachments.
I want to use Carousel and not List. Are you sure it works? It was not working for me with ThumbnailCards.
You're right I was mistaken. I have taken the question/answer down for inaccuracy.
@AndreMantas currently there is a limit of 10 attachments per one carousel. Can you please try if it works for you with less attachments?
Can confirm. Works with 10, fails with 11. I probably won't be showing more than 10 items, but are there any alternatives? Maybe I could show in two carousels in a row.