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

404 error from Skill/ReplyToActivity [activityId/conversationId] endpoint while running VA solution

Open manish-95 opened this issue 6 years ago • 37 comments

What project is affected?

Virtual Assistant, Skills (version 0.8 Beta)

What language is this in?

C#

What happens?

I have a Virtual Assistant Bot connected to a Skill Bot. When I send messages from the VA to the Skill, I notice constant 404 failures in the Skill/ReplyToActivity [activityId/conversationId] endpoint. I have also noticed that the conversation id gets appended with '-directline-skillconvo' , something that was not happening before.

What are the steps to reproduce this issue?

  1. Connect VA and Skill Bot
  2. Access a Skill from the VA, through Webchat.
  3. Note error from logs.

What were you expecting to happen?

The 404 error should not occur.

Can you share any logs, error output, etc.?

Request name POST Skill/ReplyToActivity [activityId/conversationId]  
Response code 404  
Successful request false  
Response time 8.1 ms  
Request URL https://emcee-beta-fq33t5e.azurewebsites.net/api/skills/v3/conversations/HOjzX7xth2VBrkIgBw6OaP-c-directline-skillconvo/activities/HOjzX7xth2VBrkIgBw6OaP-c|0000003

manish-95 avatar Apr 22 '20 06:04 manish-95

Morning - Can you confirm the SkillHostEndpoint config setting in your VA Bot is set correctly? This should be pointing at your VA Bot which the Skill calls back to. This config setting is used by the Skill so good to check. Also if you are debugging a VA say locally, pointing to a remote Skill you'll need to ensure ngrok is configured correctly.

    "skillHostEndpoint": "https://yourVAAppService.azurewebsites.net/api/skills"

It looks from your log above that it likely is set correctly but just checking! If so - can you confirm the BF SDK versions used by your VA + Skill please?

darrenj avatar Apr 22 '20 09:04 darrenj

@darrenj Hi, just verified that the SkillHostEndpoint is set correctly. The version I am using in both the VA as well as the Skill is 4.7.2

manish-95 avatar Apr 22 '20 09:04 manish-95

@manish-95 is it possible to share us your source code so we can help you debug to see what's going on?

lzc850612 avatar Apr 22 '20 16:04 lzc850612

and what channel are you using? is it webchat with directline?

lzc850612 avatar Apr 22 '20 16:04 lzc850612

@lzc850612 That's right, I am using WebChat with directline. As for the source code, it is the same as the ones available as part of the VA and Skill templates in this repo. Would you still require the source code ?

manish-95 avatar Apr 23 '20 05:04 manish-95

@lzc850612 Forgot to mention, I have made a few changes to include proactive notifications following the instructions provided here

manish-95 avatar Apr 23 '20 05:04 manish-95

Can you pack up your source code and share with me so i can use the exact same code to debug? Please send it to my email address [email protected] so i can debug to see the exact issue. Thanks.

lzc850612 avatar Apr 23 '20 05:04 lzc850612

Would you require code for both the VA as well as the Skill?

manish-95 avatar Apr 23 '20 05:04 manish-95

Both VA and skill please

lzc850612 avatar Apr 23 '20 05:04 lzc850612

@lzc850612 I've sent an email to the address you gave me, containing a link to the source code.

manish-95 avatar Apr 23 '20 05:04 manish-95

Perfect. I'm able to access the code. I'll debug and get back to you.

lzc850612 avatar Apr 23 '20 05:04 lzc850612

Alright, Thanks a lot!

manish-95 avatar Apr 23 '20 05:04 manish-95

does this mean it's working fine? Capture

can you send me the utterances you used to reproduce your issue?

one thing i want to throw out there that i'm suspecting could be wrong is, when you debug VA<->skill locally, you need to change the SkillHostEndPoint to be the local VA endpoint (with localhost:port), instead of the one in azure, and i suspect your azure VA doesn't have the latest VA bits which is why the 404. When i'm debugging i'm using localhost for both skill and VA, and it seems to be working fine.

lzc850612 avatar Apr 23 '20 06:04 lzc850612

@lzc850612 I face the issue when trying to invoke the Skill with the deployed versions of both VA and skill. In some cases, it just shows up as a failed dependency in the logs, however, in other cases, it completely halts the rest of the flow. I tried with the same utterance you did, and was able to get the error.

manish-95 avatar Apr 23 '20 06:04 manish-95

I also see a cancelled request from the Skill logs, going back to the endpoint of the VA as per the config.

manish-95 avatar Apr 23 '20 06:04 manish-95

@lzc850612 Attaching a screenshot, showing the two different 404 requests. image

manish-95 avatar Apr 23 '20 06:04 manish-95

Ok let's try a few things:

  1. Please run VA and Skill locally, and update the SkillHostEndpoint and the skill's endpoint to be both local. See if you still run into this issue
  2. When you're running into the error with deployed VA and skill, are they both deployed? Are you seeing an error message when 404 happens? Are you able to reproduce this issue 100%?
  3. Have you tried using your VA against an pre-built skill such as Calendar or Email from our repo?

If VA and Skill can run locally without issue, then we can isolate the problem to something wrong with deployed VA and Skill.

lzc850612 avatar Apr 23 '20 21:04 lzc850612

This is exactly happening with the solution i have with VA <--> Skill.

It was working fine till few days back, then i upgraded all dependent nuget package to v4.8.0 (Microsoft.Bot.* packages.)

  • VA and Skill both running in localhost.

  • VA is able to identify right skill to invoke, and in appsetting.json skill is having localhost url.

Error : image

In AppInsight image

Not sure what is changed, both VA and Skill endpoint are on http and not https.

Please help me out, looks similar problem to this one.

shilsmarty avatar Apr 24 '20 03:04 shilsmarty

Thanks @darrenj and @lzc850612, my issue resolved after change in SkillHostEndpoint, based on your comment above.

Thanks

shilsmarty avatar Apr 24 '20 03:04 shilsmarty

So your SkillHostEndpoint was set incorrectly?

lzc850612 avatar Apr 24 '20 03:04 lzc850612