May 12 2020 11:54 PM
Hi,
We came across the Bot Service's Skills concept at https://docs.microsoft.com/en-us/azure/bot-service/skill-implement-skill?view=azure-bot-service-4.0&.... We cloned the Bot Samples and tried running both the Simple Bot to Bot and SkillsDialog samples. Both are giving us the following errors
[onTurnError] Exception caught in sendErrorMessage: Error: /api/messages/v3/conversations/d24ed016-6872-4a57-bd99-c93aa061e32c-8b8cc16a-597d-4bae-a4e0-b992af4d9b38-a:11XpYDC7setK3n4POxpFnsvU_143zXeMzsTqFuspVzDeE5fmF02wN0tqvWdvSjd89cdG9f7RWm-Gr76RV8z-Ny3j4NM24noCOmWV7zUxqqBbyc6SILj8Fkz0iW2l2HYHN-msteams-skillconvo/activities/1589352227371 does not exist
[onTurnError] Exception caught in sendEoCToParent: Error: /api/messages/v3/conversations/d24ed016-6872-4a57-bd99-c93aa061e32c-8b8cc16a-597d-4bae-a4e0-b992af4d9b38-a:11XpYDC7setK3n4POxpFnsvU_143zXeMzsTqFuspVzDeE5fmF02wN0tqvWdvSjd89cdG9f7RWm-Gr76RV8z-Ny3j4NM24noCOmWV7zUxqqBbyc6SILj8Fkz0iW2l2HYHN-msteams-skillconvo/activities/1589352227371 does not exist
May 13 2020 11:52 PM
@voonsionglum , Did you implemented the conversation for skill? You can take a look at Implement the skill in Teams Skills Bot
May 14 2020 12:04 AM
@Trinetra-MSFT, thanks for responding. The conversation for skill was implemented for the echo-skill-bot.
When the root bot sends the skill activity to the echo-skill-bot, I can see that the latter did get the activity. When the echo-skill-bot tries to send the reply to the root bot, it errors out saying that the conversation it tries to reply to does not exist.
I tried printing out the context when that error happens. I can see that the conversation Id and the activity Id in the context match with the ones thrown by the error, but I don't know why the conversation does not exist. It feels like something is missing...
May 15 2020 12:02 AM - edited May 15 2020 12:03 AM
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?
May 17 2020 08:23 PM
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?
Jun 19 2020 01:59 AM
SolutionJun 19 2020 01:59 AM
Solution