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

Console emulator problems displaying cards + content (v3.0.6043.30574)

Open DirkSonguer opened this issue 10 years ago • 4 comments

It seems like the console emulator has trouble dealing with cards. As soon as I send a card with content, it neither displays the card nor any content I send to the session in the same dialog afterwards.

Example:

`

    session.send('1');

    var card = new builder.HeroCard(session)
        .text('hi')
        .subtitle('hello');
    var cardMessage = new builder.Message(session).attachments([card]);
    session.send(cardMessage);

    session.send('2');

`

Result: The console emulator shows '1', but nothing afterwards. Expected: The emulator shows '1', card content, '2'.

While it's clear that the console emulator is not able to display cards in a graphical way, it might make sense to show a representation of the data handed over (for example a JSON).

In any case, any text content after the card should be displayed, even if cards are filtered out.

Version: Microsoft Bot Framework Channel Emulator v3.0.6043.30574

DirkSonguer avatar Jul 19 '16 09:07 DirkSonguer

what happens if you type /dump command?

tomlm avatar Jul 20 '16 01:07 tomlm

Uhm, actually the emulator crashes. The bot is supposed to answer "hi" with a card and a text (see example above):

Send message to bot:
hi
User1 said:
 hi
/dump

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.Bot.Framework.Emulator.ConsoleApp.Program.Dump (Microsoft.Bot.Connector.Emulator.ConversationModel conversation, System.String input) <0x4b21ab8 + 0x00206> in <filename unknown>:0 
  at Microsoft.Bot.Framework.Emulator.ConsoleApp.Program.Main (System.String[] args) <0x505098 + 0x005d7> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.Bot.Framework.Emulator.ConsoleApp.Program.Dump (Microsoft.Bot.Connector.Emulator.ConversationModel conversation, System.String input) <0x4b21ab8 + 0x00206> in <filename unknown>:0 
  at Microsoft.Bot.Framework.Emulator.ConsoleApp.Program.Main (System.String[] args) <0x505098 + 0x005d7> in <filename unknown>:0 
DEFRARAD0021:BotFrameworkEmulator-Console dsonguer$ 

Note: The bot sends the data, the emulator receives it, but it does not display anything. If I continue the conversation (writing something else), bot and emulator continue as usual. If I /dump instead, the crash happens.

DirkSonguer avatar Jul 20 '16 20:07 DirkSonguer

Hi @DirkSonguer I can run your sample code and it appears to be working correctly now.

danmarshall avatar Aug 12 '16 22:08 danmarshall

Closing due to inactivity, please open a new issue or reply to this one asking us to reopen if needed. Thanks!

Andrea-Orimoto avatar Aug 24 '16 15:08 Andrea-Orimoto