SOLVED

Skills: Simple Bot to Bot and Skills Dialog

Brass Contributor

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
It feels like the root bot/root dialog was able to send a Skill request/activity to the skill bot/skill dialog but the skill bot/skill dialog was not able to reply back to the conversation because the conversation could not be found.  Has anyone come across this?  How did you resolve this? 
 
Thank You
5 Replies

@voonsionglum , Did you implemented the conversation for skill? You can take a look at Implement the skill in Teams Skills Bot

@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...

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(contextthis.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.

 

voonsionglum_2-1589772187183.png

 

 

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!

 

voonsionglum_1-1589772013715.png

 

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?

 

best response confirmed by voonsionglum (Brass Contributor)
Solution
Looks 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.
1 best response

Accepted Solutions
best response confirmed by voonsionglum (Brass Contributor)
Solution
Looks 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.

View solution in original post