Open leore92 opened 2 weeks ago
Unfortunately this line https://github.com/kolbytn/mindcraft/blob/a6edd8fc44813e01c4decfda3d6b6ee018671620/src/agent/agent.js#L57 eats the stack trace and as result we no longer can tell what exactly happend by just reading the messages.
You can try to edit agent.js, and replace this:
try {
this.bot = initBot(this.name);
} catch (error) {
throw new Error(`Failed to initialize Minecraft bot: ${error.message || error}`);
}
with:
try {
this.bot = initBot(this.name);
} catch (error) {
console.error(`Failed to initialize Minecraft bot: ${error.message || error}`);
throw error;
}
then your error message should become more meaningfull for us
Starting agent with profile: ./andy.json Starting agent initialization with profile: ./andy.json Initializing action manager... Initializing prompter... Using chat settings: { model: 'groq/mixtral-8x7b-32768', api: 'groq' } Using embedding settings: { api: 'groq' } Unknown embedding: groq . Using word overlap. Initializing history... Initializing coder... Initializing npc controller... Initializing memory bank... Initializing self prompter... Initializing examples... Logging into minecraft... Failed to initialize Minecraft bot: Cannot read properties of null (reading 'version') Agent start failed with error: { message: "Cannot read properties of null (reading 'version')", stack: "TypeError: Cannot read properties of null (reading 'version')\n" + ' at next (D:\mindcraft\node_modules\mineflayer\lib\loader.js:108:67)\n' + ' at createBot (D:\mindcraft\node_modules\mineflayer\lib\loader.js:105:34)\n' + ' at initBot (file:///D:/mindcraft/src/utils/mcdata.js:57:15)\n' + ' at Agent.start (file:///D:/mindcraft/src/agent/agent.js:55:16)\n' + ' at async file:///D:/mindcraft/src/process/init-agent.js:48:9', error: {} } Failed to start agent process: { message: "Cannot read properties of null (reading 'version')", stack: "TypeError: Cannot read properties of null (reading 'version')\n" + ' at next (D:\mindcraft\node_modules\mineflayer\lib\loader.js:108:67)\n' + ' at createBot (D:\mindcraft\node_modules\mineflayer\lib\loader.js:105:34)\n' + ' at initBot (file:///D:/mindcraft/src/utils/mcdata.js:57:15)\n' + ' at Agent.start (file:///D:/mindcraft/src/agent/agent.js:55:16)\n' + ' at async file:///D:/mindcraft/src/process/init-agent.js:48:9', error: {} } Agent process exited with code 1 and signal null Agent process ./andy.json exited too quickly and will not be restarted. All agent processes have ended. Exiting. PS D:\mindcraft>
when i do node main.js it outputs:
[ './andy.json' ] Starting agent with profile: ./andy.json Starting agent initialization with profile: ./andy.json Initializing action manager... Initializing prompter... Using chat settings: { model: 'groq/mixtral-8x7b-32768', api: 'groq' } Using embedding settings: { api: 'groq' } Unknown embedding: groq . Using word overlap. Initializing history... Initializing coder... Initializing npc controller... Initializing memory bank... Initializing self prompter... Initializing examples... Logging into minecraft... Agent start failed with error: { message: "Failed to initialize Minecraft bot: Cannot read properties of null (reading 'version')", stack: "Error: Failed to initialize Minecraft bot: Cannot read properties of null (reading 'version')\n" + ' at Agent.start (file:///D:/mindcraft/src/agent/agent.js:57:23)\n' + ' at async file:///D:/mindcraft/src/process/init-agent.js:48:9', error: {} } Failed to start agent process: { message: "Failed to initialize Minecraft bot: Cannot read properties of null (reading 'version')", stack: "Error: Failed to initialize Minecraft bot: Cannot read properties of null (reading 'version')\n" + ' at Agent.start (file:///D:/mindcraft/src/agent/agent.js:57:23)\n' + ' at async file:///D:/mindcraft/src/process/init-agent.js:48:9', error: {} } Agent process exited with code 1 and signal null Agent process ./andy.json exited too quickly and will not be restarted. All agent processes have ended. Exiting.