Forum Discussion
Skills: Simple Bot to Bot and Skills Dialog
- Jun 19, 2020Looks like it had something to do with the bot-xxx NPM packages that I was using. After I updated to ~4.9.0, I no longer have any issues.
Here is some more information. I am running the simple-root-bot locally and opening it with the Bot Framework Emulator at port 3978. I am running the echo-skill-bot locally at port 39783.
In the Emulator, when I type in "skill", the simple-root-bot responds with "Got it, connecting you to the skill…". I updated my rootBot.js so that before the "await this.sendToSkill(context, this.targetSkill);" in the "onMessage" is called, I print out the context and the the target skill.
The context shows the following conversation Id
conversation: { id: 'fc9260e0-966b-11ea-9510-8344e3862407|livechat' },
The targetSkill object has the following values
{ id: 'EchoSkillBot',
appId: 'aaebe6ed-b0ee-4487-92b7-xxxxxxxxxxxx',
skillEndpoint: 'http://localhost:39783/api/messages' }
On the console running the echo-skill-bot, I can see the activity from the simple-root-bot got passed but it's throwing the following errors
[onTurnError] unhandled error: Error: /api/messages/api/skills/v3/conversations/eb2e388f-58f1-4182-b04e-ad1d35244622-aaebe6ed-b0ee-4487-92b7-798c7ea17325-fc9260e0-966b-11ea-9510-8344e3862407%7Clivechat-emulator-skillconvo/activities/00751950-966c-11ea-9f88-838c9883d7bc does not exist
[onTurnError] Exception caught in sendErrorMessage: Error: /api/messages/api/skills/v3/conversations/eb2e388f-58f1-4182-b04e-ad1d35244622-aaebe6ed-b0ee-4487-92b7-798c7ea17325-fc9260e0-966b-11ea-9510-8344e3862407%7Clivechat-emulator-skillconvo/activities/00751950-966c-11ea-9f88-838c9883d7bc does not exist
[onTurnError] Exception caught in sendEoCToParent: Error: /api/messages/api/skills/v3/conversations/eb2e388f-58f1-4182-b04e-ad1d35244622-aaebe6ed-b0ee-4487-92b7-798c7ea17325-fc9260e0-966b-11ea-9510-8344e3862407%7Clivechat-emulator-skillconvo/activities/00751950-966c-11ea-9f88-838c9883d7bc does not exist
If the echo-skill-bot is trying to post a response to the simple-root-bot, then the conversation Id in the url should have been
fc9260e0-966b-11ea-9510-8344e3862407|livechat
instead of
eb2e388f-58f1-4182-b04e-ad1d35244622-aaebe6ed-b0ee-4487-92b7-798c7ea17325-fc9260e0-966b-11ea-9510-8344e3862407%7Clivechat-emulator-skillconvo?
Where is the echo-skill-bot getting the conversation Id?
There are different tech versions for the Skills Simple Bot to Bot samples. Since I am having issues with the NodeJS version, I wanted to try out the DotNet version.
Lo and behold, the CSharp version of the Simple Bot to Bot sample actually works! The root bot can send activities to the skill bot and the skill bot responds beautifully.
Now that we know the CSharp version of the sample works, I wanted to know if the NodeJS version is breaking on the skill bot end or the root bot end. I replaced the Skill Bot App Id in the root bot with the NodeJS version and redeployed the root bot. It turns out that this scenario is also working correctly!
This implies that the NodeJS version of the root bot is breaking. I went and updated the root bot NodeJS version's skill end point to the CSharp version of the skill bot. The NodeJS root bot never got a response from the CSharp version of the skill bot.
It feels like the NodeJS version of the SkillClient might be buggy. Has someone else come across this? Maybe I should open an issue in GitHub?
- voonsionglumJun 19, 2020Brass ContributorLooks like it had something to do with the bot-xxx NPM packages that I was using. After I updated to ~4.9.0, I no longer have any issues.