Botframework-composer: Custom Runtime Error

Created on 19 Oct 2020  路  11Comments  路  Source: microsoft/BotFramework-Composer

Describe the bug

I followed the steps outlined in:
https://docs.microsoft.com/en-us/composer/how-to-add-custom-action

There are many warnings after this step:
Parsing component .schema files

Warning C:\Users\kdubi.nuget\packages\Microsoft.Bot.Builder.AI.Luis\4.10.2\content\Schemas\Microsoft.LuisRecognizer.schema: Component schema https://schemas.botframework.com/schemas/component/v1.0/component.schema does not match https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/component.schema

When I re-open Composer, I get this error:
"Definition not found for Microsoft.Ask/properties/activity/oneOf/1/properties/membersAdded/items"

Version

v 1.1.1

Browser

  • [x] Electron distribution
  • [ ] Chrome
  • [ ] Safari
  • [ ] Firefox
  • [ ] Edge

OS

  • [ ] macOS
  • [x] Windows
  • [ ] Ubuntu

Screenshots

image

Bot Services Bug customer-replied-to customer-reported

All 11 comments

The custom action does work, though.

@dmvtech can you investigate and report back? Thanks!

@kdubious , could you check the your bf cli version, is it pointing to the latest?

I am getting the same issue, and 2 of my customers writing bots in Composer found this as well. The custom action does work once you click through the error.

I can confirm this experience. I tried with both versions:
@microsoft/botframework-cli/4.10.1 win32-x64 node-v12.18.3 and
@microsoft/botframework-cli/4.10.0-dev.20200730.3786d10 win32-x64 node-v12.18.3

Just a lot of warnings, it does work. I think this is a BF cli issue as it's definitely coming from bf dialog:merge and not the .ps1 script.

Sorry maybe not a BF cli issue, but it is the one reporting it. There definitely is a schema mis-match, due to the ID:

https://schemas.botframework.com/schemas/component/v1.0/component.schema:
"$id": "https://schemas.botframework.com/schemas/component/v1.0/component.schema"

https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/component.schema
"$id": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/component.schema"

@Kaiqb the issue is in the documentation at: custom action. The $schema should be https://schemas.botframework.com/schemas/component/v1.0/component.schema.

@kdubious you can fix this by changing the $schema in your custom action .schema file.

FYI. The doc actually references from the schema in the sample here.

I did a fresh test using Composer v1.1.1.

image

  • I fixed the error by Googling and running the following script:
    Get-ExecutionPolicy -List | Format-Table -AutoSize; Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

  • Then run ./update-schema.ps1 -runtime azurewebapp in powershell again.

  • Re-open the bot from Composer and it worked as expected:

    image

  • Tested in Emulator:

    image

@zxyanliu

Then run ./update-schema.ps1 -runtime azurewebapp in powershell again.

But when running this (after remedying your execution policy), did you no longer get any Warnings output in the shell/cmdline? They should have looked like:
Warning C:\Users\kdubi.nuget\packages\Microsoft.Bot.Builder.AI.Luis\4.10.2\content\Schemas\Microsoft.LuisRecognizer.schema: Component schema https://schemas.botframework.com/schemas/component/v1.0/component.schema does not match https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/component.schema

The issue is not that it _fails_, it's that it is outputting a bunch of warnings (even though in the end it runs).

@dmvtech
Yes, I did get a lot of warnings about mismatched schema:

image

The warnings went away after I updated the $schema in the sample to be https://schemas.botframework.com/schemas/component/v1.0/component.schema

See:
image

We should update the following in the sample schema:

The $schema should be https://schemas.botframework.com/schemas/component/v1.0/component.schema

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KoradaRajesh picture KoradaRajesh  路  25Comments

DS2019 picture DS2019  路  21Comments

cxbuilders picture cxbuilders  路  15Comments

pedro-ramirez-suarez picture pedro-ramirez-suarez  路  15Comments

cxbuilders picture cxbuilders  路  16Comments