botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
68 stars 83 forks source link

[BUG] Infinite loop if 'Error' flow redirects back to Main #1560

Closed Gordon-BP closed 2 years ago

Gordon-BP commented 2 years ago

Describe the bug A bot will enter into an infinite loop if the default 'error' flow always transitions back to the 'main' flow.

To Reproduce Steps to reproduce the behavior:

  1. Create a new empty bot, and add a message saying "Error" to the default 'error' flow. Create an additional flow called "flow-1" that the main flow always transitions to. Error_Step2

  2. Force an error by going to the advanced editor and editing the 'main.flow.json' file to transition to a flow that does not exist. In my example, I changed 'flow-1' to 'flow-2.' Error_step3

  3. Add a transition to the 'error' flow to always transition back to 'main.' Error_Step4

  4. Talk to the bot and see the infinite loop. Error_Step5

Expected behavior Botpress core should detect and break out of the loop somehow.

Screenshots See above.

Environment (please complete the following information):

franklevasseur commented 2 years ago

hey @Gordon-BP

fixed here: https://github.com/botpress/botpress/pull/5761

the fix will be available in the next release.

feel free to reopen if anything's missing.