Some bot messages not rendering in trained dialog UI
Closed this issue · 7 comments
Describe the bug
Some bot messages do not render in the trained dialogs UI, instead I get a stack trace with an error about a conversation id not being found.
To Reproduce
I see a lot of this in my current app, but not sure how to repro. I can send an export of the model if you provide an email.
Desktop (please complete the following information):
- OS: Windows
- Browser: latest Chrome
- Version: 0.295.10
Did this occur when creating new dialog, converting from log dialog, or were you simply viewing an existing train dialog? Based on the issue description it sounded like you were viewing an existing dialog, but I don't think any activities should be sent when only viewing.
There is known similar issue with missing conversation id when modifying the extractor step of log dialog so that the first action to take in the train dialog is to select an action. Since the user hasn't entered any text into webchat yet there isn't a user id for us to match to the conversation and it misleadingly says conversation id is missing even though there is one. @LarsLiden is working on a fix for that one, but I think your issue might be different.
That's actually a good question. I was converting from a log dialog before I noticed this.
I just looked at the train dialogs again and it seems any dialog that includes one of a couple of actions seems to display this problem.
@srozga - We just fixed two bugs in the dev branch relating to conversation references being missing. Would you mind updating to the latest version of the Samples develop branch and letting us know if you see this again? We're doing a bug bash here, prior to pushing develop to master, so please let us know if you notice anything else awry in the dev branch. Thanks!
I pulled latest and updated my demo script to match some new signatures and to use express, like the rest of then demos. Ran:
npm run build
I am getting an error in the UI it cannot retrieve bot info.
I went ahead and tried to run the vrapp demo. Console looks like this:
But I still see the same UI error when loading the UI. Super odd. If I go to any url on localhost:3978/sdk i get an 404.
I also see this error in Chrome earlier on (not sure if relevant).
You attempted to use the Conversation Learner Client before its getMemoryKey method was properly configured. Call setMemoryKey to configure
I'm guessing you need to set NODE_ENV=development
in your .env file or as process variable. (This ensures that the SDK route and Direct Offline are added to the server, where as in production they are not used) Try that and let me know if it helps.
There were many breaking changes staged for the next release and unfortunately you're going through them early on develop
branch before we've prepared all the docs and merged it into master. Hopefully we can fix these and get you back on the more stable branch so you have better experience.
Thanks @mattmazzola, that was it. The issue with the conversation id being missing is resolved.
When I try to connect the emulator to http://localhost:3978/api/messages, I get the following messages in the emulator:
[13:08:52] -> POST Unexpected token A in JSON at position 0 in "http:": Accepted...
[13:08:52] -> POST Unexpected token A in JSON at position 0 in "http:": Accepted...
Beyond this, the interaction between the emulator and bot seems OK.
I added a new train dialog, I fixed up a log dialog... it never seemed like a new app training was kicked off. I was used to seeing that thing say "in progress" every time I edited something in the train dialogs.
Thanks!
Thanks for confirming!
The error you mentioned: Unexpected token A in JSON at position 0 in "http:": Accepted
usually implies that a server is responding with text but the receiver is assuming it's JSON and attempting to parse. Example: JSON.parse("Accepted")
would print a similar error. If it's logs from the Bot due to requests from the Emulator, I'm guessing the emulator is making request that our bot isn't handling properly.
We will take a look
it never seemed like a new app training was kicked off
One of our other team members reported issue with training status and we're looking into it.
Going to close the issue since the conversation id problem seems to be fixed.