Botframework-solutions: Botskill connect is not working properly whether local dev or public hosted

Created on 28 Jan 2020  路  22Comments  路  Source: microsoft/botframework-solutions

What project is affected?

Virtual assistant importing skills in calendar (CLI commands of botskills connect) remoteManifest

What language is this in?

C#

What happens?

Botskills connect didn't work as expected

What are the steps to reproduce this issue?

  • Create project virtual assistant VA
  • Create blank solution( i just copy your premade calendar skills and import in the blank solution)
  • Build and compile the two projects
  • find any tag in cognitve.json, manifest.json and the LU folder from en to en-us in the skills template
  • i go to the root directory of VA and open Powershell V6
  • i run this command 'botskills connect --remoteManifest "http://localhost:3980/api/skill/manifest" --cs '
    then an error occurs
there was an error while connecting the Skill to the Assistant:
Error: An error ocurred while updating the Dispatch model:
Error: Path to the Email.lu file leads to a nonexistent file.
Make sure your Skill's .lu file's name matches your Skill's manifest id

What were you expecting to happen?

It should add the skills to my VA, update the dispatch in VA, update skills.json, etc

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

Any screenshots or additional context?

This is the error occur in the bot connect
image

My local running skills
image

The manifest.json of the skills
image

so as you can see the id is the same in the .lu in calendar skills. here is the attached screenshot( i just replace the appid and tokens in this screenshot to xxx for security purpose :D )
image

this is my VA directory
image

i even tried to add folder name Skills in the VA but still not working

i checked blog and VLog, this is what i found in your msignite 2019
https://www.youtube.com/watch?v=u7Gql-ClcVA
i see there is a script using (she is not using botconnnect)

any advice will do

thanks a lot

Bot Services Bug customer-replied-to customer-reported

Most helpful comment

We are tracking an update to botskills which will move to the BF CLI which incorporates luisgen functionality but through a javascript module not a .net tool which should remove this issue moving forward.

All 22 comments

Hi @cocoytech, thanks for reporting the issue!

Error: Path to the Email.lu file leads to a nonexistent file.

Can you check if you have any utteranceSources with the Email source in your manifest.json?

The tool is trying to access to the Email.lu of the LU folder (where you have the Calendar.lu and General.lu) and it's failing because it doesn't exist.

The tool reads each utteranceSource which contains the <LU_FILENAME>#<INTENT> structure as source property from the manifest.

I recommend to always execute the tool with the --verbose argument so you can check the steps that is executing the tool.

Hope this helps to you 馃槉!

Yes i have UtteranceSources on my manifest.json

here is the entire

{
  "id": "calendar",
  "name": "Calendar Skill",
  "description": "The Calendar skill provides calendaring related capabilities and supports Office and Google calendars.",
  "iconUrl": "calendarSkill.png",
  "authenticationConnections": [
    {
      "id": "Outlook",
      "serviceProviderId": "Azure Active Directory v2",
      "scopes": "Calendars.ReadWrite, People.Read, Contacts.Read, User.Read.All"
    },
    {
      "id": "Google",
      "serviceProviderId": "Google",
      "scopes": "https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/contacts"
    }
  ],
  "actions": [
    {
      "id": "calendarskill_createEvent",
      "definition": {
        "description": "Create a new event",
        "slots": [
          {
            "name": "title",
            "types": [ "string" ]
          },
          {
            "name": "content",
            "types": [ "string" ]
          },
          {
            "name": "attendees",
            "types": [ "string" ]
          },
          {
            "name": "startdate",
            "types": [ "string" ]
          },
          {
            "name": "starttime",
            "types": [ "string" ]
          },
          {
            "name": "duration",
            "types": [ "string" ]
          },
                    {
                        "name": "location",
                        "types": [ "string" ]
                    },
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
        ],
        "triggers": {
          "utteranceSources": [
            {
              "locale": "en-us",
              "source": [
                "Calendar#CreateCalendarEntry",
                "Calendar#FindMeetingRoom"
              ]
            }
          ]
        }
      }
    },
    {
      "id": "calendar_changeEventStatus",
      "definition": {
        "description": "Change the status of an event (accept/decline).",
                "slots": [
                    {
                        "name": "startdate",
                        "types": [ "string" ]
                    },
                    {
                        "name": "starttime",
                        "types": [ "string" ]
                    },
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
                ],
        "triggers": {
          "utteranceSources": [
            {
              "locale": "en-us",
              "source": [
                "Calendar#AcceptEventEntry",
                "Calendar#DeleteCalendarEntry"
              ]
            }
          ]
        }
      }
    },
    {
      "id": "calendar_joinEvent",
      "definition": {
        "description": "Join the upcoming meeting",
                "slots": [
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
                ],
        "triggers": {
          "utteranceSources": [
            {
              "locale": "en-us",
              "source": [
                "Calendar#ConnectToMeeting"
              ]
            }
          ]
        }
      }
    },
    {
      "id": "calendar_summary",
      "definition": {
        "description": "Retrieve a summary of meetings through an event invocation.",
                "slots": [
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
                ],
        "triggers": {
          "events": [
            {
              "Name": "summaryEvent"
            }
          ]
        }
      }
    },
    {
      "id": "calendar_timeRemaining",
      "definition": {
        "description": "Find out how long until the next event",
                "slots": [
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
                ],
        "triggers": {
          "utteranceSources": [
            {
              "locale": "en-us",
              "source": [
                "Calendar#TimeRemaining"
              ]
            }
          ]
        }
      }
    },
    {
      "id": "calendar_summary",
      "definition": {
        "description": "Find an upcoming event",
                "slots": [
                    {
                        "name": "startdate",
                        "types": [ "string" ]
                    },
                    {
                        "name": "starttime",
                        "types": [ "string" ]
                    },
                    {
                        "name": "enddate",
                        "types": [ "string" ]
                    },
                    {
                        "name": "endtime",
                        "types": [ "string" ]
                    },
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
                ],
        "triggers": {
          "utteranceSources": [
            {
              "locale": "en-us",
              "source": [
                "Calendar#FindCalendarDetail",
                "Calendar#FindCalendarEntry",
                "Calendar#FindCalendarWhen",
                "Calendar#FindCalendarWhere",
                "Calendar#FindCalendarWho",
                "Calendar#FindDuration"
              ]
            }
          ]
        }
      }
    },
    {
      "id": "calendar_updateEvent",
      "definition": {
        "description": "Update an existing event.",
                "slots": [
                    {
                        "name": "startdate",
                        "types": [ "string" ]
                    },
                    {
                        "name": "starttime",
                        "types": [ "string" ]
                    },
                    {
                        "name": "enddate",
                        "types": [ "string" ]
                    },
                    {
                        "name": "endtime",
                        "types": [ "string" ]
                    },
                    {
                        "name": "newstartdate",
                        "types": [ "string" ]
                    },
                    {
                        "name": "newstarttime",
                        "types": [ "string" ]
                    },
                    {
                        "name": "timezone",
                        "types": [ "string" ]
                    }
                ],
        "triggers": {
          "utteranceSources": [
            {
              "locale": "en-us",
              "source": [
                "Calendar#ChangeCalendarEntry"
              ]
            }
          ]
        }
      }
    }
  ]
}

i added the --verbose in the script, still the same

image

Thanks @cocoytech. Comparing the screenshots you sent, we noticed that you have the Email Skill running but with the manifest of the Calendar Skill. Can you check if the manifest corresponds to the right skill?

I successfully replicated your scenario connecting a [C#] Virtual Assistant to a [C#] Calendar Skill.

Context

Connection Steps

  1. Open and run the Calendar Skills' solution (getting http://localhost:3980 endpoint)
  2. Connect the Calendar Skill to the Virtual Assistant being in the Virtual Assistant's root folder
    > botskills connect --remoteManifest "http://localhost:3980/api/skill/manifest" --luisFolder "" --cs --verbose --languages "en-us"
  3. Check that the connection finished successfully

For further information, please read the following documents:

Please, feel free to compare both contexts and follow the connection steps mentioned above 馃槉.

Additional Context

_Folder's structure of Calendar Skill and Virtual Assistant Sample_
image

_Calendar Skill running_
image

_Manifest of the Calendar Skill which contains the Calendar LUIS file (with CreateCalendarEntry and FindMeetingRoom intents) in the utteranceSources property_
image

_Connection of the Calendar Skill and the Virtual Assistant Sample_
image

As you can see, luis gen is already install
image

But this error display
image

when i try to install luisgen this error happen
image

it seems that i already install luisgen, but when i try luisgen -v it state an error
image

i try both localManifest and remoteManifest still no luck

@cocoytech, this appears to be an issue related to the luisgen installation as it's a dotnet tool following the README.

Can you confirm if you have the following Enviroments Variables? If don't, can you add them and try again to execute luisgen -v?

Also, you can check if you have the luisgen correctly installed in C:\Users\<YOUR_USER>\.dotnet\tools.

image

image

This is what happen on luisgen -v , it gives me error
image

upon checking the directory, i have already install
image

This is the environment variables, it is already installed too
image

i even retried to re install this npm npm i bot-cli -g and npm i -g chatdown msbot ludown luis-apis qnamaker botdispatch luisgen
image

I even tried npm install luisgen -global

image

it says that i have already install,
i try luisgen -v in powershell but having an error
image

But i notice something, when im inside in the folder of luisgen.exe, the luisgen -v works perfectly based on the suggestion upon running inside the luisgen folder
image
As you can see when i attempt to do luisgen -v it still gives me an error, but when i follow the suggestion by .luisgen -v it can clearly give the result version of the luisgen

so i made a stupid hack in the cli stuffs and dll. i copy all the folder name * tools* (the folder name store and luisgen.exe) and its corresponding files and documents insdie the root folder of VA and it works perfectly to any skills

image

i believe this issue is related to CLI or powershell, same story from this ticket https://github.com/microsoft/botframework-solutions/issues/2075
image
but on this case instead mac os, the issue is on windows 10 pro build 18362

@cocoytech With the move of luisgen into the bf-cli (and thus not a .net tool) this should get resolved. As per the known issue (albeit this time on Windows) can you try adding the path users/YOUR_USER_NAME/.dotnet/tools to your path (e.g. PATH=%PATH%;) and see if that helps? Best do that within a powershell instance.

Okay i repro on my end and follow the updates but still there are new errors arise

image

i already have manifest on the upload
image

just an update

still the error is still persistent, i need to do the hacking stuff even i already npm install npm install -g @microsoft/botframework-cli

image

please advise

Hi @cocoytech, what version of Botskills are you using? I think the error you are facing may be due to an update for using the new Skill Manifests, which requires the latest version of Botskills (v1.0.12)

Yes i am using the latest version of the bot skills, still the error occurs

image

Ahh - make sure you have a more recent clone of the repo. Then the manifest should be manifest-1.1.json not manifest.json which was removed to reduce confusion. Then as per the docs need to update manifest-1.1.json with endpoint and appid of your deployment.

As per advise, i tried using the manifest-1.1 but still no luck

without the hacky stuff in luisgen inside the root folder of Virtual Assistant, Botskills connect will not work as expected

This seems to be all back to the issue around dotnet tools on some machines, previously just macs. Ahead of running botskills does the following help at all? Assuming that this added path has luisgen in it of course (installing via npm install -g is needed)

PATH=%PATH%;c:usersYOUR_USER\.dotnettools

i already did npm install on global in , if you check the previous reply https://github.com/microsoft/botframework-solutions/issues/2927#issuecomment-580198453

its already install globally and the path is also correct https://github.com/microsoft/botframework-solutions/issues/2927#issuecomment-580063421

For alternate workaround, i just simply copy the luisgen.exe and .store file inside to my VA
image
just to let botskills work

@Batta32 - can we review how luisgen is invoked by botskills and see if there are any additional options, feels like the system path is being ignored in this situation?

We are tracking an update to botskills which will move to the BF CLI which incorporates luisgen functionality but through a javascript module not a .net tool which should remove this issue moving forward.

So also the documentation(website github docs) steps in installation of VA should be updated too? thanks

Yes @cocoytech! We will move to the BF CLI (as Darren mentioned) updating the documentation of Botskills 馃槉.

We'll work on the bf cli changes which should address this .net tool path problem on osx (sometimes) and now Windows it seems

Was this page helpful?
0 / 5 - 0 ratings