BotFramework-Composer
BotFramework-Composer copied to clipboard
Unable to launch Bot Framework Composer
I am unable to launch Bot Framework Composer. I get an error as shown in the Pic below. Details:
- BFC version = 2.1.2
- Launching this behind a corporate network
- Proxy setting done and verified.
Can anyone guide on how to overcome this issue (not sure if this is a bug, hence reporting this as a issue)
Hi @mys2kor.
I'm not able to reproduce this issue from my end using fresh Composer 2.1.2.
Environment:
- Windows 11
- Composer 2.1.2
- Node v14.20.0
- .NET Core Runtime 3.1
After creating C# Empty Bot Template in Composer 2.1.2, It is able to start without issues.
@mys2kor, to clarify: are you using Node (Preview)
or C#
Composer bot?
@ramfattah I was not even able to go that far. I get this error when I try to open the Application. One time the application opened & I was able to login to the company azure account. Then I choose Node (Preview)
and selected the 2nd option (bot with language I think). It showed the Downloading
for a while and then got struck at Building run time
. Even after 30-40minutes, nothing happened. So I closed the application.
My environment is Environment:
Windows 10 Composer 2.1.2 & 2.1.1 (I tried with both versions) Node v16.14.2 .NET Core Runtime 3.1 (I an not sure about this)
One more this I have noticed is that I click only once to launch the application but multiple instances of the applications seem to have been initiated. Pic from the task manages below. After the error message, I have close the application via Task Manager & there I noticed this.
@mys2kor, could you please try to uninstall Composer and delete the following directories:
- Uninstall Composer
- If installed for local user, delete: C:\Users<USER>\AppData\Local\Programs\Bot Framework Composer
- If installed for all users, delete: C:\program files\bot framework composer
- Download and install the latest version of Composer and try again.
Try the above steps and let me know if you still get that error message. Thanks.
@ramfattah I have done clean installation (uninstall, restart the PC, reinstall) more than 10times since 2 days on both 2.1.1 & 2.1.2 versions. No Use.
However, just now I stumbled upon something. I use https://github.com/genotrance/px/
as a HTTP(s) proxy server. When Px is running, I get the error I am getting during the launch. If the Px is not running, I do not get this error.
Please also not that after the launch happens, I need to have PX running to login to my Azure account if not I cannot login to my Azure account!
Also, The window to install is popping up on its own once in a while.(Pic attached)
I have moved the .exe file to a different folder so, I am 100% sure I have not clicked on it at all & still yet the install window pops up!
I am available on Teams if you want to have a quick call.
@ramfattah I have been able to to a 'work around' of this issue by doing the following a. When installing BFC (2.1.1 or 2.1.2), we need Px to be running, else it will not install. b. However, during the launch of BFC, Px SHOULD NOT be running!!! Else we get the error I shared with you. c. When logging into BFC (we have to login every time we launch the application!), we again need Px to be running else we get ‘No Azure Directories Found” error.
Also, When I close the program the window to install is popping up ! Not sure why but it does !!!
Bu there is now another issue. Reporter here https://github.com/microsoft/BotFramework-Composer/issues/9333
@mys2kor
Could you please run Composer in debug mode using the following directions and attempt to reproduce the failure? Then send the output of the debugging console window.
Steps to run Composer in debug mode:
- Completely close Composer if already open
- Go to Composer's install location (mine is at C:\Users{username}\AppData\Local\Programs\Bot Framework Composer)
- Open Windows command line terminal in that directory
- run
set DEBUG=composer*
- run the executable from the terminal.
- Ex: in CMD: run
"Bot Framework Composer.exe"
- Ex: in CMD: run
You have enabled debugging successfully if you see prefixed composer:____
in the log:
We will take a look at the log to see what is the cause of this issue. Let me know if you have any questions. Thanks.
@ramfattah
The pics of the Logs are below. I get the error when I try to open BFC when Px is running (no error when Px is not running).
Thank you @mys2kor for sharing the logs.
@mys2kor
have you had a chance to follow Configure a proxy server documentation? https://docs.microsoft.com/en-us/composer/configure-composer-proxy?tabs=windows
It describes how to configure a proxy server to allow Composer to access resources.
@ramfattah Yes. I have followed the configured the proxy server as given in the link above.
Hi @tonyanziano, any ideas regarding this issue?
We started with this issue today, we are trying to reproduce the error.
@ceciliaavila any update on this?
Hi @mys2kor, @ramfattah, @johnataylor, @tracyboehrer, we were able to reproduce this issue by following the next steps:
TLDR: we couldn’t find a solution nor workaround for this issue, since it could be related to the
px
program, the proxy, or Application Insights not supporting Headers + Body when it comes in the content response when retrieving theAppId
(more information).
-
Run the genotrance/px program with a custom proxy (
px --proxy=x.x.x.x --debug
). -
Start Composer from the terminal with the following environment variables (
DEBUG=composer* no_proxy=localhost https_proxy=http://localhost:3128 http_proxy=http://localhost:3128
, how to configure env variables).Note: when using Composer from the source code, set the
APPINSIGHTS_INSTRUMENTATIONKEY=xxx
env variable, otherwise it will not fail. -
Steps to cause the issue
Note: not all proxies fail with the 'request-context' issue, so probably could be a proxy misconfiguration issue. Note: these steps don’t always make Composer fail, in any case, keep trying the following steps with different proxies or combinations (always involves the Microsoft login dialog). Note: here are the list of proxies we used to test this (they are gathered from the https://free-proxy-list.net/ website just for testing purposes)
- 198.59.191.234:8080 (FAIL)
- 43.155.106.118:1088 (FAIL)
- 93.188.8.25:3128 (NOT FAIL)
a. Open Composer, click on the 'Sign in' button and then close the Microsoft login dialog. b. Change the
px
proxy by cancelling the current running command instance, and repeat the step 1 (without closing Composer). c. Click on the 'Sign in' button and close the Microsoft login dialog again. d. Close and open Composer (should fail). e. Even changing to another proxy that have the possibility to have the same issue, it will continue failing.
More information
This issue is being raised by the Application Insights library when it tries to log
something, the failure is originated when gathering the AppId
from the Application Insights resource under the API Access
section (url to gather the AppId
https://dc.services.visualstudio.com/api/profiles/<APPINSIGHTS_INSTRUMENTATIONKEY>/appId
).
Moreover, this URL according to the Application Insights' code, should only return the AppId
(uuid format), but instead when the proxy returns the Headers and Body in the content response, it makes the request-context
header variable fail when is set, due to invalid values.
Furthermore, diving deeper into the px
's code (python) we discovered that is saving the headers into the same buffer data as the page's body when creating the HTTP bridge. This HTTP bridge is being executed when the CURL method isn't 'CONNECT' as when it is working as expected.
Additional Context
- We couldn’t find a workaround for this issue, since Application Insights is integrated into Composer and the variable APPINSIGHTS_INSTRUMENTATIONKEY
cannot be changed at runtime (without having a value, so the Application Insights' code is never setup).
- Even if the Application Insights is accessing the URL and returns anything other than the AppId
, it will fail if the request-context
header isn't in the right format (e.g. it could return an HTML page (with a failure), Header + Body, etc).
- We believe this issue is either originated from the px
program, the proxy configuration, or the Application Insights library not supporting the possibility of receiving Headers and Body in the content response (more information) when sending messages through an HTTP proxy (https proxy is not supported according to Application Insights' code).
Images
px
program using the same buffer data (wfile
) for the headers.
Application Insights when receiving the request from https://dc.services.visualstudio.com/api/profiles/<APPINSIGHTS_INSTRUMENTATIONKEY>/appId
, that comes with the Headers and Body in the same content response.
The current version of https://github.com/genotrance/px cannot be used with Bot Framework Composer