Botpress: Timeout handles not working

Created on 5 Apr 2019  路  6Comments  路  Source: botpress/botpress

Make sure these checkboxes are checked before raising an issue, thank you!

Please also fill in these fields:


  • I am running: from docker
  • My OS is: docker

Issue
Neither the "before_session_timeout" hook nor the other methods mentioned in docs for BP 11.7.4 seem to work.

Expected

  • The hooks logs the message in the console and in the frontend, at least one message appears

Current

  • Although the dialog-engine handles the timeout correctly, none of the timeout handles are executed

Step to reproduce

  • docker run -p 3000:3000 --name bp_1 botpress/server:v11_7_4
  • create a welcome-bot
  • add a timeout flow
  • add a timeout node to the main flow
  • add the before_session_timeout hook and change the configuration to a shorter timeout
  • commit the change to the docker image, restart
  • start a conversation

Any ideas, hints or comments highly appreciated!

/Crixx

Most helpful comment

We're gonna look into it. Thanks for reporting.

All 6 comments

Facing the same issue

We're gonna look into it. Thanks for reporting.

Hi @rndlaine
Any news or dates? :)

@rndlaine after a lot of debugging I found two problems,
On the Janitor when the timeout was reached you emit a event without state, so it throws an exception because context is undefined on the next line
https://github.com/botpress/botpress/blob/3a00dc7680c789784818173d139a0db0f8239757/src/bp/core/services/dialog/dialog-engine.ts#L127

The second was that the queue of the session was not being cleaned, so if the previous node had transitions it would try to execute them and fails, I set it to undefined, I tested the fix adding a timeout flow to the bot
Please, can you merge the fix asap ? I would be very grateful, our team urgently needs it

@juanpmarin Sorry for the very late reply, we merged it and is part of the new release

@slvnperron It is already merged and released at v11.8.4
I did not test all the scenarios, it would be great if you can test all of them

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eyalcohen4 picture eyalcohen4  路  12Comments

mhjb picture mhjb  路  6Comments

crixx picture crixx  路  5Comments

azizkhani picture azizkhani  路  6Comments

raphaelsilvasage picture raphaelsilvasage  路  4Comments