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

fix(hitl): use renderPayload from ui-shared-lite to fix undefined #5454

Merged

Conversation

billsomen
Copy link
Contributor

@billsomen billsomen commented Sep 15, 2021

Main issue: botpress/v12#1055
This PR also fixes this issue: botpress/v12#1471

Description:
I was not able to reproduce the issue. But this PR fixes another issue that happens when reproducing the initial issue.
The renderPayload method was not defined.

fix (below)
image

@linear
Copy link

linear bot commented Sep 15, 2021

BUS-23 Sending out a message using HITL module causes client's chat dialog to be deleted (botpress/botpress botpress/v12#1055)

I have a fairly basic botpress installation running 12.10.2 on windows server. I went through almost all of the production checklist stuff to launch a sample bot for one of my clients to review so I’ve completed:

  • Connect to Postgres
  • Enabled SSL
  • Setup local LANG and DUCKLING servers
  • enabled HITL and Misunderstood modules

I am using a simple webchat widget (from the tutorial) and my bot was setup using the example “Small Talk” example bot. There is only a single flow (for misunderstood messages) and the rest of the bot responses were built using the QnA module.

My problem is with HITL. No matter how I try and use the bot, via webchat, via the “emulator” built into the admin site, or using “open chat” from the botpress dashboard… whenever I (as an admin) type a response to a user using HITL I get the following on the user/web visitor’s chat window:

  • I get a red notification number next to the profile picture showing “1” to note that the user received a reply from the system
  • The entire chat dialog area goes blank - the area where the messages are displayed. In HTML, it’s this section >>
<div class="bpw-msg-list-container">
    <div tabindex="0" class="bpw-msg-list">
         <div></div>
    </div>
</div>

If I, as a user, start talking to the bot again then everything works fine and I still get the standard bot responses as expected using the QnA module. The bpw-msg-list div gets populated with all the back and forth messages between the user and the bot.

But if I try and respond to the user using the HITL module, all divs within bpw-msg-list get deleted and the dialog goes blank again. I don’t see any errors on either the server OR the browser console and have tried on multiple OS and browser combinations.

Any help would be much appreciated!

@laurentlp laurentlp changed the title fix(hitl): use renderPaylood from ui-shared-lite to fix undefined fix(hitl): use renderPayload from ui-shared-lite to fix undefined Sep 15, 2021
Copy link
Contributor

@laurentlp laurentlp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@laurentlp laurentlp merged commit 56a020c into master Sep 15, 2021
@laurentlp laurentlp deleted the billsomen-bus-23-sending-out-a-message-using-hitl-module branch September 15, 2021 23:07
@EFF EFF mentioned this pull request Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants