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

Under proxy when testing in embedded compo webchat, the user receives read ECONNRESET

Open geo-msft opened this issue 4 years ago • 2 comments

Describe the bug

I was working with a customer on the following ISSUE:

The customer has a proxy on his machine where is running composer 2.1.1.

They setup the proxy vars:

set https_proxy="your proxy server IP address":"your port number"

set http_proxy="your proxy server IP address":"your port number"

set no_proxy=localhost

in order to make the publish work well. Docs here Configure a proxy server - Bot Framework Composer | Microsoft Docs

But now, when using the embedded compo webchat to test the bot, they receive this error

[03:48:44 AM]POST201/v3/conversations

[03:48:44 AM]POST404/v3/directline/conversations/75fbaa47-b676-4606-95ac-082c38ed172c%7Clivechat/activitiesAn error occurred posting activity to the bot. read ECONNRESET

Version

2.1.1

Browser

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

OS

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

To Reproduce

Steps to reproduce the behavior:

  1. Have a proxy setup on the machine as we explain here Configure a proxy server - Bot Framework Composer | Microsoft Docs
  2. Start the bot in composer
  3. Wait for it to start
  4. Type a message to the bot
  5. Receive the error

[03:48:44 AM]POST201/v3/conversations

[03:48:44 AM]POST404/v3/directline/conversations/75fbaa47-b676-4606-95ac-082c38ed172c%7Clivechat/activitiesAn error occurred posting activity to the bot. read ECONNRESET

Expected behavior

The bot should reply with no error.

Additional context

The bot replies alright if the customer is testing it into the emulator on the same machine; it's just the embedded compo webchat showing that error.

geo-msft avatar Sep 22 '21 09:09 geo-msft

Hi @geo-msft

I cannot reproduce this exact error (although there are other issues with proxy; LUIS and sign-in, etc).

Is this still reproducible for you/customer? Is this a simple echo bot? Can you confirm they set the proxy as the system proxy as well?

dmvtech avatar Feb 01 '22 19:02 dmvtech

Hi Dana,

The error does still exists within a corporate proxy setup. It seems like an issue between the Emulator Channel and the BotFramework Response methods. The only way I can get it to work is by temporarily deleting the Proxy (process.env.HTTP_PROXY and process.env.HTTPS_PROXY) in the ProccessActivity() function of the botbuilder>lib>botFrameworkAdapter.js file which I believe is triggered on processing an activity and enable the process Env Proxy back after the final Send Activity to the channel.

jithin24 avatar Feb 03 '22 09:02 jithin24