kolbytn / mindcraft

MIT License
2.02k stars 245 forks source link

exit with code 0 on startup #291

Open MaxRobinsonTheGreat opened 1 week ago

MaxRobinsonTheGreat commented 1 week ago
Using chat settings: { model: 'groq/llama-3.2-90b-vision-preview', api: 'groq' }
Using embedding settings: { api: 'groq' }
Unknown embedding:  groq . Using word overlap.
Logging in...
{}
Agent process exited with code 0 and signal null
[ './andy.json' ]
Using chat settings: { model: 'gpt-4o-mini', api: 'openai' }
SES_UNHANDLED_REJECTION: {}
Agent process exited with code 0 and signal null

A few examples I've seen. I cannot reproduce. Logs are useless. SES_UNHANDLED_REJECTION is a recent module that might be responsible for it, but always triggers on error and I think is not the true issue.

JurassikLizard commented 1 week ago

https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md here it says the error is due to a rejected promise that went unhandled, maybe something is interrupting the runtime?

nimaid commented 1 week ago

I am also having this issue, trying to use ollama.

Here is my settings.js file:

export default 
{
    "minecraft_version": "1.20.4", // supports up to 1.21.1
    "host": "127.0.0.1", // or "localhost", "your.ip.address.here"
    "port": 55916,
    "auth": "offline", // or "microsoft"

    "profiles": [
        // "./andy.json",
        // "./profiles/gpt.json",
        // "./profiles/claude.json",
        // "./profiles/gemini.json",
        "./profiles/llama.json",
        // "./profiles/qwen.json",

        // using more than 1 profile requires you to /msg each bot indivually
    ],
    "load_memory": false, // load memory from previous session
    "init_message": "Say hello world and your name", // sends to all on spawn

    "language": "en", // translate to/from this language. Supports these language names: https://cloud.google.com/translate/docs/languages
    "show_bot_views": false, // show bot's view in browser at localhost:3000, 3001...

    "allow_insecure_coding": false, // allows newAction command and model can write/run code on your computer. enable at own risk
    "code_timeout_mins": 10, // minutes code is allowed to run. -1 for no timeout

    "max_messages": 15, // max number of messages to keep in context
    "max_commands": -1, // max number of commands to use in a response. -1 for no limit
    "verbose_commands": true, // show full command syntax
    "narrate_behavior": true, // chat simple automatic actions ('Picking up item!')
}

And here is my profiles/llama.json file:

{
    "name": "LLama",

    "model": "llama3.1",

    "max_tokens": 8000,

    "embedding": "openai",

    ... *[default settings]* ...

When running with node main.js:

[ './profiles/llama.json' ]
keys.json not found. Defaulting to environment variables.
Using chat settings: { model: 'llama3.1', api: 'ollama' }
Using embedding settings: { api: 'openai' }
SES_UNHANDLED_REJECTION: {}
Agent process exited with code 0 and signal null

When running with docker-compose up:

[+] Running 1/0
 ✔ Container mindcraft-app-1  Created                                      0.0s 
Attaching to mindcraft-app-1
mindcraft-app-1  | [ './profiles/llama.json' ]
mindcraft-app-1  | Removing unpermitted intrinsics
mindcraft-app-1  |   Removing intrinsics.Promise.try
mindcraft-app-1  | keys.json not found. Defaulting to environment variables.
mindcraft-app-1  | Using chat settings: { model: 'llama3.1', api: 'ollama' }
mindcraft-app-1  | Using embedding settings: { api: 'openai' }
mindcraft-app-1  | (node:18) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
mindcraft-app-1  | (Use `node --trace-deprecation ...` to show where the warning was created)
mindcraft-app-1  | SES_UNHANDLED_REJECTION: {}
mindcraft-app-1  | Agent process exited with code 0 and signal null
mindcraft-app-1 exited with code 0

I am running Ubuntu Server 24.04.1 LTS with a custom Openbox/Tint2 setup for graphical applications. (Not a full DE, just a window manager and accessories.)

nimaid commented 1 week ago

I have additionally tried this on Windows 10, with the same error.

Here is the output of npm install, in case it helps:


npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported

> postinstall
> patch-package

patch-package 8.0.0
Applying patches...
mineflayer@4.20.1 ✔
mineflayer-collectblock@1.4.1 ✔
mineflayer-pathfinder@2.4.5 ✔
mineflayer-pvp@1.3.2 ✔

Warning: patch-package detected a patch file version mismatch

  Don't worry! This is probably fine. The patch was still applied
  successfully. Here's the deets:

  Patch file created for

    mineflayer@4.20.1

  applied to

    mineflayer@4.23.0

  At path

    node_modules/mineflayer

  This warning is just to give you a heads-up. There is a small chance of
  breakage even though the patch was applied successfully. Make sure the package
  still behaves like you expect (you wrote tests, right?) and then run

    patch-package mineflayer

  to update the version in the patch file name and make this warning go away.

---
patch-package finished with 1 warning(s).

added 298 packages, and audited 299 packages in 5m

34 packages are looking for funding
  run `npm fund` for details

6 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
``