leon-ai / leon

🧠 Leon is your open-source personal assistant.

Home Page:https://getleon.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash in Gitpod whenever Leon asks my name and I reply with my name

jamesmortensen opened this issue · comments

Specs

  • Leon version: 1.3.1 and same behavior on the latest develop branch commit 2f56a14
  • OS (or browser) version: Ubuntu 20.04.5 in GitPod
  • Node.js version: 16.19.0
  • Complete "leon check" (or "npm run check") output:
  • (if using Docker) Complete "npm run docker:check" output:
  • (optional) Leon skill version:

Expected Behavior

I expected Leon to reply with some acknowledgement that he knows my name is James.

Actual Behavior

Instead, the UI hung, and the server crashed.

.: TCP CLIENT :.
ℹ️  Received data: {"topic": "spacy-entities-received", "data": {"spacyEntities": [{"start": 0, "end": 5, "len": 5, "sourceText": "James", "utteranceText": "James", "entity": "person", "resolution": {"value": "James"}}]}}
/workspace/leon/node_modules/@nlpjs/slot/src/slot-manager.js:295
      latestSlot: context.slotFill.latestSlot,
                                   ^

TypeError: Cannot read properties of undefined (reading 'latestSlot')
    at SlotManager.process (/workspace/leon/node_modules/@nlpjs/slot/src/slot-manager.js:295:36)
    at Nlp.process (/workspace/leon/node_modules/@nlpjs/nlp/src/nlp.js:737:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /workspace/leon/server/dist/core/nlu.js:390:28
Error: Command failed with exit code 1: npm start

How Do We Reproduce?

I am not sure if you can reproduce, but here is what I did:

  1. Fork the repo.
  2. Load gitpod but using jamesmortensen instead of leon-ai so it clones my fork.
  3. Browse to port 1337 in Gitpod browser.
  4. Start chatting with Leon.
  5. When Leon asks my name, I reply "James" or "I am James" or any variation of this, and the UI hangs. We see the application crashes.
  6. Restart and repeat and the same thing occurs.

In addition, I cd'd to the gitpod home folder and followed the instructions to install the production v1.3.1 and repeated the steps. Same behavior.

Not sure if this matters, but I'm not a fan of speech. So I'm only chatting with Leon. There's no mic or speaker involved.

Not sure if it matters, but I'm also a first time user, so I'm not entirely sure that I've done everything correctly. I assume that Gitpod would work out of the box which is why I tried it first. I can see a lot of potential here and am looking forward to exploring more. Thank you for your dedication to this project!

Extra (like a sample repo to reproduce the issue, etc.)

Hello! @jamesmortensen
Thanks for your report, it is indeed a bug!

Leon-AI is still in beta and there are still many things to do, so features can break between releases, but we're more and more approaching to a stable v1.0.0 release. 💪

I tried to reproduce the bug with my locally installed Leon instance, and it is working, but when using GitPod, Leon successfully answer to the "Hello!" query, but when I write "My name is Divlo.", it crashes with the same error message as you (TypeError: Cannot read properties of undefined (reading 'latestSlot')).

I'm not sure what can be the root cause, we will need to investigate.

This issue was not related to Gitpod, after some research, it was an issue with @nlpjs releasing a new minor broken version.
axa-group/nlp.js#1252

The issue has been fixed, since then.