microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
867 stars 370 forks source link

Bot with Microsoft.Bot.Components.HelpAndCancel package installed fails to start in local build #8541

Open stevkan opened 3 years ago

stevkan commented 3 years ago

Describe the bug

When running a local build of Composer via a browser, installing the Microsoft.Bot.Components.HelpAndCancel package causes Composer to endlessly display 'Starting bot...' after clicking button to start the bot.

Version

v2.0.0 & v2.1.0

Browser

OS

To Reproduce

Steps to reproduce the behavior:

  1. Clone, yarn install, and run Composer with yarn startall
  2. Open Composer in browser via http://localhost:3000
  3. Open a bot in Composer
  4. Navigating to Package Manager, click and install Microsoft.Bot.Components.HelpAndCancel package
    • Package version shouldn't matter as it fails on all when tested
  5. Start bot
  6. Observe error in terminal console window followed by repeating api/publishing 202 status

Expected behavior

I should be able to install the package and run the bot without error.

Screenshots

v2.0.0 error displayed in Output pane:

Command:
dotnet build Empty_Bot_0.csproj
Stack Trace:
Error: Command failed: dotnet build Empty_Bot_0.csproj

    at ChildProcess.exithandler (child_process.js:319:12)
    at ChildProcess.emit (events.js:376:20)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
Output:
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : warning NU1701: Package 'Microsoft.Azure.KeyVault.Core 1.0.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : error NU1605: Detected package downgrade: Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime from 4.14.1 to 4.13.2. Reference the package directly from the project to select a different version. 
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : error NU1605:  Empty_Bot_0 -> Microsoft.Bot.Components.HelpAndCancel 1.1.2 -> Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime (>= 4.14.1) 
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : error NU1605:  Empty_Bot_0 -> Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime (>= 4.13.2)
  Failed to restore C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj (in 1.28 sec).

Build FAILED.

C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : warning NU1701: Package 'Microsoft.Azure.KeyVault.Core 1.0.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : error NU1605: Detected package downgrade: Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime from 4.14.1 to 4.13.2. Reference the package directly from the project to select a different version. 
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : error NU1605:  Empty_Bot_0 -> Microsoft.Bot.Components.HelpAndCancel 1.1.2 -> Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime (>= 4.14.1) 
C:\Users\Steven Kanberg\source\Composer\Converts\Empty_Bot_0\Empty_Bot_0\Empty_Bot_0.csproj : error NU1605:  Empty_Bot_0 -> Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime (>= 4.13.2)
    1 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.23
Killed:
Code:
1

v2.1.0 error does not display within Composer, only in terminal console:

(node:22904) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stdout' of undefined
    at LocalPublisher2.removeListener (C:\Users\Steven Kanberg\source\botbuilder-repos\BotFramework-Composer-2.1.0\extensions\localPublish\dist\extension.js:29683:13)
    at C:\Users\Steven Kanberg\source\botbuilder-repos\BotFramework-Composer-2.1.0\extensions\localPublish\dist\extension.js:29730:20
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:22904) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:22904) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
GET /api/publish/16716.521586883948/status/default/92d49cd5-b57b-4943-9b2f-e1e055927568 202 89.427 ms - 39
GET /api/publish/16716.521586883948/status/default/92d49cd5-b57b-4943-9b2f-e1e055927568 202 89.355 ms - 39
GET /api/publish/16716.521586883948/status/default/92d49cd5-b57b-4943-9b2f-e1e055927568 202 95.487 ms - 39
GET /api/publish/16716.521586883948/status/default/92d49cd5-b57b-4943-9b2f-e1e055927568 202 87.305 ms - 39
srinaath commented 3 years ago

@benbrown . It looks like dotnet build fails when we add this package. Multiple tickets referring the same issue. Can we move this to the components repo? https://github.com/microsoft/BotFramework-Composer/issues/8533 https://github.com/microsoft/BotFramework-Composer/issues/8515

cwhitten commented 3 years ago

It seems like when the start bot sequence is mid-flight, and you try and switch projects, or install a package, we see the cannot read property 'stdout' of undefined error.

cc @srinaath