MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.4k stars 493 forks source link

RuntimeError: Minecraft server reply with code 400 #17

Closed hwigithub closed 1 year ago

hwigithub commented 1 year ago

I've managed to boot up the MC instance and created the world, but it cannot create bots with error "Minecraft server reply with code 400"

Below are the logs:

Creating Minecraft server Starting Minecraft server Subprocess minecraft started with PID 27212. The mc server is listening on port 54705 Server started on port 54705 Mineflayer process has exited, restarting Subprocess mineflayer started with PID 6944. Server started on port 3000

Traceback (most recent call last): returned_data = self.check_process() ^^^^^^^^^^^^^^^^^^^^ File "c:\work\python\git\voyager\voyager\env\bridge.py", line 100, in check_process raise RuntimeError( RuntimeError: Minecraft server reply with code 400 Stopping mineflayer

helincao commented 1 year ago

I had the same issue. Not sure if this log helps for debugging. I used mc_port to initiate Voyager.

2023-05-27 16:30:05,147 - mineflayer - INFO - Stopping subprocess.
2023-05-27 16:30:06,152 - mineflayer - INFO - Starting subprocess with commands: ['node', 
'/Voyager/voyager/env/mineflayer/index.js', '3000']
2023-05-27 16:30:07,018 - mineflayer - INFO - Server started on port 3000
2023-05-27 16:30:07,019 - mineflayer - INFO - Subprocess is ready.
2023-05-27 16:30:07,038 - mineflayer - INFO - {
2023-05-27 16:30:07,038 - mineflayer - INFO - port: 63497,
2023-05-27 16:30:07,039 - mineflayer - INFO - reset: 'hard',
2023-05-27 16:30:07,039 - mineflayer - INFO - inventory: {},
2023-05-27 16:30:07,039 - mineflayer - INFO - equipment: [],
2023-05-27 16:30:07,039 - mineflayer - INFO - spread: false,
2023-05-27 16:30:07,039 - mineflayer - INFO - waitTicks: 20,
2023-05-27 16:30:07,039 - mineflayer - INFO - position: null
2023-05-27 16:30:07,039 - mineflayer - INFO - }
2023-05-27 16:30:07,371 - mineflayer - INFO - Error: unsupported/unknown protocol version: 762, update minecraft-data
2023-05-27 16:30:07,371 - mineflayer - INFO - at /Voyager/voyager/env/mineflayer/node_modules/minecraft-protocol/src/client/autoVersion.js:32:28
2023-05-27 16:30:07,371 - mineflayer - INFO - at /Voyager/voyager/env/mineflayer/node_modules/minecraft-protocol/src/ping.js:13:7
2023-05-27 16:30:07,371 - mineflayer - INFO - at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-05-27 16:30:07,371 - mineflayer - INFO - Error: unsupported/unknown protocol version: 762, update minecraft-data
2023-05-27 16:30:07,371 - mineflayer - INFO - at /Voyager/voyager/env/mineflayer/node_modules/minecraft-protocol/src/client/autoVersion.js:32:28
2023-05-27 16:30:07,371 - mineflayer - INFO - at /Voyager/voyager/env/mineflayer/node_modules/minecraft-protocol/src/ping.js:13:7
2023-05-27 16:30:07,371 - mineflayer - INFO - at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-05-27 16:30:07,383 - mineflayer - INFO - Stopping subprocess.
2023-05-27 16:30:07,383 - mineflayer - INFO - TypeError: Cannot read properties of undefined (reading 'minecraftVersion')
2023-05-27 16:30:07,383 - mineflayer - INFO - at /Voyager/voyager/env/mineflayer/node_modules/minecraft-protocol/src/client/autoVersion.js:34:42
2023-05-27 16:30:07,383 - mineflayer - INFO - at /Voyager/voyager/env/mineflayer/node_modules/minecraft-protocol/src/ping.js:13:7
2023-05-27 16:30:07,383 - mineflayer - INFO - at processTicksAndRejections (node:internal/process/task_queues:96:5)
xieleo5 commented 1 year ago

Hi, all. Thanks for your interest in this project. The log shows that the version of the game read by Mineflayer is incorrect. I guess it's a problem with Mineflayer. Did you see the bot entering your world?

helincao commented 1 year ago

@xieleo5 I found Fabric was not installed properly. Reinstalling Fabric fixed it. Thanks!

ProjectAtlantis-dev commented 1 year ago

Mineflayer github seems to suggest protocol only tested up to 1.19.3 https://github.com/PrismarineJS/node-minecraft-protocol FWIW the fabric that worked for me was mods/fabric-api-0.76.1+1.19.3.jar and fabric-loader-0.14.18-1.19.3

xieleo5 commented 1 year ago

Close since issue is resolved.