0
votes

I executed the card-carousel sample in the node js BotBuilder-Sample https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/cards-CarouselCards but in the bot emulator the bot is not replying. In console window it is throwing a error.

ERROR: ChatConnector: receive - invalid token. Requested by unexpected app ID.

I've also put the app id and passed it to the bot emulator:

// Create chat bot and listen to messages
var connector = new builder.ChatConnector({
    appId: "ecdd3610-37d3-462b-b133-04b206108e44",
    appPassword: "umefqAXLO824?=coWBK20+["
});

Do you have any clue on how to solve the issue?

3
Can you please elaborate your problem ? Are you using .Net SDK?Anita George
Given its code extract, it's Node.jsNicolas R
You don't need to add the app id and password to test the sample just run the sample the way it is these two attributes are not required.Akhadra
You can see the lines of code throwing the error at line 172 here: github.com/Microsoft/BotBuilder/blob/master/Node/core/src/bots/…. Are you sure the appId is the same as what was registered in Bot Framework? And I assume the appId and appPassword were added to the emulator at the top? Also: not a great idea to post the appPassword on Stack Overflow, BTW. You should redact it.Bill Bliss - MSFT
@Leo, are you using the Bot Framework Emulator or the 'Test in Web Chat' feature found in your bot on Azure? I encountered this before and just tested again to be sure. When I use 'Test in Web Chat' and I hard code the AppId and AppPassword credentials I get that same ChatConnector error you list. You will want to use 'process.env.MicrosoftAppId' & 'process.env.MicrosoftAppPassword', respectively, to get your credentials and it should work just fine (barring any other issues).Steven Kanberg

3 Answers

1
votes

Which sample code you are using for creating bot and Carousel Card layout? Here is the sample code for creating Carousel card layout using node.js. Please use this sample code and try to create the bot.

0
votes

the bot emulator the bot is not replying. In console window it is throwing a error.

ERROR: ChatConnector: receive - invalid token. Requested by unexpected app ID.

Only I can reproduce your issue is when I set the different appId and appPassword pairs in nodejs script and bot emulator.

Please double check the appId and appPassword pairs are exactly the same your set in nodejs script and bot emulator.

enter image description here

Additionally, if you only need a test, you can empty the pairs both in script and emulator.

0
votes

I migrated the bot form https://dev.botframework.com/bots to azure bot service it is working fine.Thanks for everbody contribution to the problem.