Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatched event, postBack, or messageBack + activityMiddleware causes fatal error #3434

Closed
stevkan opened this issue Aug 21, 2020 · 5 comments · Fixed by #3671
Closed

Dispatched event, postBack, or messageBack + activityMiddleware causes fatal error #3434

stevkan opened this issue Aug 21, 2020 · 5 comments · Fixed by #3671
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior. p1 Painful if we don't fix, won't block releasing Sample Implement PoC or sample code
Milestone

Comments

@stevkan
Copy link
Collaborator

stevkan commented Aug 21, 2020

Screenshots

image

Version

CDN: v4.10.0

Describe the bug

Error occurs when store.dispatch() is used to send a SEND_EVENT, SEND_POST_BACK, or SEND_MESSAGE_BACK activity and activityMiddleware is also utilized.

Steps to reproduce

  1. Run the 05.custom-components/c.user-highlighting MockBot located in the sample.
  2. Type "herocard" into the send box
  3. Click the "postBack" button
  4. See error

Expected behavior

No error should occur with dispatch and activityMiddleware functioning, as expected.

[Bug]

@stevkan stevkan added bug Indicates an unexpected problem or an unintended behavior. customer-reported Required for internal Azure reporting. Do not delete. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. and removed Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. labels Aug 21, 2020
@tdurnford
Copy link
Contributor

@stevkan I believe this is due to a breaking change in Web Chat v4.10. Take a look the Breaking Changes in the Change Log for more details.

@compulim Can you please weigh in.

@stevkan
Copy link
Collaborator Author

stevkan commented Aug 24, 2020

@tdurnford, thanks for the info. That did seem to fix it. Originally, I had a different implementation that, with v.4.10.0, was failing. I went to the samples and updated according to those which, as you can see, still wasn't working. Late on a Friday, I hadn't thought to check the change log.

@stevkan stevkan closed this as completed Aug 24, 2020
@tdurnford
Copy link
Contributor

tdurnford commented Aug 24, 2020

I'm going to reopen this since the sample is still broken.

@stevkan
Copy link
Collaborator Author

stevkan commented Aug 24, 2020

@tdurnford, good call on re-opening. Just tested the sample referenced above, again, and yes it is still broken.

The readme shows the below code which, presumably, MockBot still uses as it also breaks when calling the hero card and clicking the postBack button.

const activityMiddleware = () => next => card => {
    return children => (
        <div  className={card.activity.from.role === 'user' ? 'highlightedActivity--user' : 'highlightedActivity--bot'} >
            {next(card)(children)}
        </div>
    );
};

@corinagum corinagum added needs-team-attention needs-scheduling backlog Out of scope for the current iteration but it will be evaluated in a future release. front-burner and removed backlog Out of scope for the current iteration but it will be evaluated in a future release. needs-team-attention labels Sep 23, 2020
@compulim compulim added the backlog Out of scope for the current iteration but it will be evaluated in a future release. label Oct 5, 2020
@corinagum corinagum added this to the R12 milestone Dec 21, 2020
@corinagum
Copy link
Contributor

Needs prioritization

@corinagum corinagum added p1 Painful if we don't fix, won't block releasing Sample Implement PoC or sample code and removed backlog Out of scope for the current iteration but it will be evaluated in a future release. front-burner needs-scheduling labels Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. p1 Painful if we don't fix, won't block releasing Sample Implement PoC or sample code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants