Conversation was disappeared after refreshing the page

(Chaitanya Tanniru) #1

I have used Redis for storing conversations, But after refreshing the bot the entire conversation was disappeared. Is there any solution to this.

(Chaitanya Tanniru) #2

Hi @Juste, Is there any solution.

(Juste) #3

Hey @Chaitanya. My guess is that there is an issue with the tracker stores config. Can you share how you configure the tracker store for your bot?

(Chaitanya Tanniru) #4

Hi @Juste .Thanks for the response.


store_type: redis
url: localhost
port: 6379
db: 0

I am using Web Chat code: chat.html (776 Bytes)

Here I am using , src=“

Because 0.5.6.js is not working.

(Chaitanya Tanniru) #5

Hi @Juste, Is there any solution.

(Steve) #6

@Chaitanya was that the content of your endpoints.ym; file you posted? If so, can you comfirm it looks like this (with the indents)…

  store_type: redis
  url: localhost
  port: 6379
  db: 0

A couple of questions for the redis server config: Are you using one of the server persistence mechanisms - like aof? If not, did you either restart the redis server or power-cycle the redis host at all as that would loose the state of the tracker.

Personally, I’ve not used Redis as a tracker store before, but I have successfully used Mongo.

(Chaitanya Tanniru) #7

HI @netcarver , yeah that is endpoints.yml . I am using rdb,aof persistences .

(Chaitanya Tanniru) #8

Hi @netcarver , Any solution.

(Steve) #9

Have you connected to your redis server using redis-cli and checked that the data is actually in there?

(Steve) #10

Have you also got the line session_persistence: true in your credentials.yml file under the socketio section?

Something like this…

  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true
(Chaitanya Tanniru) #11

Hi @netcarver , yeah I have connected to redis server using redis-cli . I have set session_persistence: true .

(Chaitanya Tanniru) #12

Hi @netcarver , My conversations are stored in redis is fine . But my problem is after refreshing the page in webchat conversations are disappeared in webchat window , not redis tracker store.

(Steve) #13

Which front-end are you using? Is it scalableminds Chatroom or the react-based webchat?

(Chaitanya Tanniru) #14

react-based webchat

(Steve) #15

Try changing the config of the webchat widget to use the “local” storage engine instead of the “session” storage engine.

    selector: "#webchat",  // <<< Use whatever selector you need
    initPayload: "/greet",   // <<< Use whatever initial intent you need
    interval: 1200,
    socketUrl: server,
    socketPath: "/",
    title: "Your title",
    subtitle: "Your subtitle",
    inputTextFieldHint: "Type a message...",
    connectingText: "Bot is not connected. Waiting...",
    hideWhenNotConnected: false,
    fullScreenMode: false,
    autofocus: true,
    openLauncherImage: 'launcher_button.svg',
    closeLauncherImage: 'clear-button.svg',
    params: {
      images: {
        dims: {
          width: 300,
          height: 200,
      storage: "session"    // <<< Try changing to "local"

You can use the built-in browser development tools to check that the conversation is being held in the session or local store.

(Chaitanya Tanniru) #16

I am already tried with storage: “local” . It is not working

(Steve) #17

I’m out of ideas then.

(Chaitanya Tanniru) #18

Thanks for your response @netcarver, Can anybody else please provide me a solution for this issue. Also let me know if i need to share any further information. Thanks in advance.

(Chaitanya Tanniru) #19

Any solution. Please respond.

(Steve) #20

If you get no response from the crass team here, try raising an issue on the webchat component repository.