Cognigy / Cognigy-CLI

Cognigy-CLI is a series of tools meant to aid Cognigy.AI developers in maintaining local copies of their virtual agent projects.
Other
7 stars 6 forks source link

Errors when creating snapshots #146

Closed dlukes closed 6 months ago

dlukes commented 9 months ago

When trying to create snapshots, I get various errors. More often, it's an UnhandledPromiseRejection:

$ cognigy create snapshot foo bar
Creating Cognigy.AI Snapshot foo ... /node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Timeout".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v20.8.0

More rarely:

$ cognigy create snapshot foo bar
Creating Cognigy.AI Snapshot foo ... -/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/commands/create.js:52
        console.log(`\n[${chalk.red("error")}] ${err.message}`);
                                ^

TypeError: chalk.red is not a function
    at create (/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/commands/create.js:52:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.<anonymous> (/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/program/program.js:81:5)

Node.js v20.8.0

In both cases, the snapshot gets created on the Cognigy instance AFAICS. In the second case, it even gets downloaded to ./agent/snapshots. So the second case seems almost fine in terms of the final result achieved; unfortunately, I haven't been able to determine how to hit it consistently, the typical result is the first case, with no local download available.

XavierJordaMurria commented 9 months ago

Hi @dlukes, Thanks for reporting this. we will create an investigation ticket for this.

XavierJordaMurria commented 6 months ago

Hi, This should be fixed in the CLI v1.5.0. Please update you CognigyCLI and try again.