Help after exporting bot to New version

Hello, today I updated my BP version fron 12.9.2 to 12.11.0,and used the export function to export my bot and it worked nicely, I pasted my old actions and activated the pertinent modules in order to have the same workspace as in the previous version but ever since I activated the HITL module it started to be more laggy and the console says this error:

Launcher Unhandled Rejection [error, select * from "hitl_sessions" where "botId" = $1 and "channel" = $2 and "userId" = $3 and "thread_id" = $4 limit $5 - the column «thread_id»] do not exists

I also have this action to pause the conversation:

const axios = require('axios')

  const pauseConversation = async (action = 'pause') => {
    // Pause
    const config = await bp.http.getAxiosConfigForBot(event.botId, { localUrl: true })
    await`/mod/hitl/channel/${}/user/${}/${action}`, {}, config)
    // Create notification
    /*const message = 'Un usuario necesita asistencia.'
    const { botId } = event
    bp.notifications.create(botId, { botId, message, level: 'info', redirectUrl: '/modules/hitl' })*/

  return pauseConversation(args.action)

  /** Your code ends here */

Could you please help me understand what went wrong? I have the postgres DB connected and everything besides that works fine and it used to work fine in the previous version. Right now BP goes crazy every time I send a message showing that error in the console :confused:

Hey @Saul_Esparza!

This error messages indicates that a database migration was not run.
Please run Botpress with the --auto-migrate flag (e.g. ./bp --auto-migrate), or use the AUTO_MIGRATE=true environment variable.

This will ensure migrations are executed.

Hope this helps!

Have a great day.

Hi, I putted AUTO_MIGRATE=true in an .env file and it keeps showing that error :frowning_face:, should I rebuild from scratch (from a new or clean Source file)? Or what am I doing wrong?

Hey @Saul_Esparza,

There was a bug in Botpress which caused your issue. I explain the workarounds in this pull request:

Let me know if you need more help.

1 Like