8000 POST activity HTTP502 fails silently · Issue #5424 · microsoft/BotFramework-WebChat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
POST activity HTTP502 fails silently #5424
Open
@jsomsanith

Description

@jsomsanith

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

NPM

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Browser: Chrome (latest)

Which area does this issue affect?

Others or unrelated

Which theme pack does this issue affect?

I did not test it on other theme packs

What is the public URL for the website?

No response

Please describe the bug

Hello Webchat team 👋
We experienced an issue that failed silently on the webchat frontend.

We have a lambda that directline calls when someone sends a message (POST
https://directline.botframework.com/v3/directline/conversations/<convId>/activities). We had an outage recently and the lambda was not responding.

The directline POST call was returning an HTTP 502.
In that case (in fact any error >= 500), there is no error that is displayed on screen.
I did a code exploration about this behavior (see What actually happened? section in this ticket)

Do you see any errors in console log?

No error in the console.

How to reproduce the issue?

That is a little tricky, we don't have any environment to reproduce it.
Our case was that the lambda that directline calls wasn't answering. But what is important is that the POST activity returns an HTTP 502.

What do you expect?

An error on the message that didn't gone through, with the retry button.

What actually happened?

The error was silent.

Here is my code investigation

In directline repo

During the postActivity function call, there is

  1. an ajax call (code link)
  2. on error (code link), there are 3 cases
    a. 403 --> expired token
    b. >400 <500 --> throw an error through the observable (code link)
    c. status >= 500 --> resolve the value retry via the observable (code link)

In webchat repo

When sending an activity, there is a race between the postActivity observable + message echo (via the websocket I guess), and a 20sec default timeout (code link).

  • postActivity Observable is mapped to a Promise (code link)
  • message echo from WebSocket I assume (code link)

In our case, the postActivity is resolved with "retry", and the mapped Promise is resolved, hiding the error.
No error is displayed on screen, but no response is coming neither, we have a bad user experience, we are waiting for an answer that will never come.

Do you have any screenshots or recordings to repro the issue?

Image

On the screenshot, we can see the POST activity that ended up with an HTTP 502, but we don't have any error under the message with the retry button.

Adaptive Card JSON

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-reportedRequired for internal Azure reporting. Do not delete.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0