BotFramework-Composer icon indicating copy to clipboard operation
BotFramework-Composer copied to clipboard

Can't Create on Bot Framework Composer

Open YebeltalAbebe opened this issue 11 months ago • 10 comments

Describe the bug

Command failed: dotnet build Empty.csproj Unhandled exception. System.ObjectDisposedException: Cannot write to a closed TextWriter. Object name: 'StreamWriter'. at System.IO.StreamWriter.<ThrowIfDisposed>g__ThrowObjectDisposedException|77_0() at System.IO.StreamWriter.WriteLine(String value) at Microsoft.DotNet.Installer.Windows.TimestampedFileLogger.Dispose(Boolean disposing) at Microsoft.DotNet.Workloads.Workload.Install.NetSdkMsiInstallerClient.OnProcessExit(Object sender, EventArgs e) at System.AppContext.OnProcessExit()

Version

v2.1.2

Browser

  • [ ] Chrome

OS

  • [ ] Windows

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Additional context

YebeltalAbebe avatar Mar 27 '24 09:03 YebeltalAbebe

there's a problem also no reply from my chatbot after running i don't know what to do may you help me versions 2.1.2 browser chrome os:windows

creme-des-cremes avatar Apr 03 '24 22:04 creme-des-cremes

Please try the latest nightly

OEvgeny avatar Apr 03 '24 23:04 OEvgeny

I used BotFramework-Composer-2.1.3-nightly.364675.1a93f21 and still experienced same thing.

$ node -v
v14.21.3

$ npm -v
8.5.4

$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.202
 Commit:    f8a55617d2

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22631
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.202\

Host (useful for support):
  Version: 6.0.4
  Commit:  be98e88c76

.NET SDKs installed:
  3.1.416 [C:\Program Files\dotnet\sdk]
  3.1.426 [C:\Program Files\dotnet\sdk]
  6.0.202 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

image

ilhamfadhil14 avatar May 17 '24 01:05 ilhamfadhil14

@ilhamfadhil14

What happens if you try and build outside of Composer: dotnet build <projectname>.csproj

dmvtech avatar Jun 05 '24 20:06 dmvtech

I am also seeing this error trying to create a project using the Azure Function runtime, but an Azure Web App runtime creates.

@ilhamfadhil14

What happens if you try and build outside of Composer: dotnet build <projectname>.csproj

I cannot find where the files are created locally to directly build the project. There are no files created at the "Location" specified in the creation dialog.

image

kratkaericd avatar Jun 07 '24 19:06 kratkaericd

@ilhamfadhil14

What happens if you try and build outside of Composer: dotnet build <projectname>.csproj

Hi @dmvtech ,

I tried but at that time still failed.

I have an update. I have successfully running bot composer, but i do not know why it resolved itself. I have tried bunch of uninstall, reinstall .NET, node. install visual studio and install .NET from there.

ilhamfadhil14 avatar Jun 10 '24 03:06 ilhamfadhil14

I am also seeing this error trying to create a project using the Azure Function runtime, but an Azure Web App runtime creates.

@ilhamfadhil14 What happens if you try and build outside of Composer: dotnet build <projectname>.csproj

I cannot find where the files are created locally to directly build the project. There are no files created at the "Location" specified in the creation dialog.

I'm not quite sure about that. If you cannot find the files at the location you are telling Composer to create them at, then something is severly broken. The bot folder is not there at all? Or only contains a few files?

dmvtech avatar Jul 05 '24 23:07 dmvtech

I'm not quite sure about that. If you cannot find the files at the location you are telling Composer to create them at, then something is severly broken. The bot folder is not there at all? Or only contains a few files?

Nada, nothing, zilch, no folder, no files.

kratkaericd avatar Jul 08 '24 04:07 kratkaericd

Hi @kratkaericd

That seems extremely odd. Are you able to create in a new folder in the C:\ root? Like if you create C:\composertest\, are you able to create bots there?

Also, to confirm; Composer shows the bot is at something like C:\code\AzureBotService\BotComposer\NotGonnaFindThisATheLocationBelow\, but the bot successfully starts? Or do you get the same error as the original poster of this issue?

dmvtech avatar Jul 23 '24 00:07 dmvtech

The bot does not successfully start.

Tried the root, saw the c:\composertest folder get created, saw a subfolder and a composertest.sln file created, watched Bot Framework composer try to compile, then fail as stated above, and now the files and folders don't exist on my hard drive, so it appears it all gets removed on failure.

image

kratkaericd avatar Jul 23 '24 18:07 kratkaericd

@kratkaericd

Since your issue is related to Azure Functions, are you able to create an Azure function (not necessarily a bot) outside of Composer? For example; can you create a basic http function with Visual Studio Code? I'm wondering if maybe some prerequisite is missing for the Functions. Then, as you said, when it fails Composer just removes the folder.

You can also try getting additional logging during a reproduction of the failure.

  • Go to Composer's install location (mine is at C:\Users{username}\AppData\Local\Programs\Bot Framework Composer)
  • Open a terminal here
  • Run set DEBUG=composer*
  • Run the executable from the terminal Ex. "Bot Framework Composer.exe"
  • Reproduce issue and send output of the terminal

dmvtech avatar Sep 17 '24 17:09 dmvtech

@dmvtech Thank you for your help with this. Yes, I create, author, and run Azure Functions locally nearly all day and every day. At this point we decided to move on to a different technology than Bot Framework, so thank you for trying to help, but we won't use this product anymore.

kratkaericd avatar Sep 22 '24 04:09 kratkaericd