YTFort / 24-Aternos

This is a bot for minecraft hosting aternos. This bot does not allow the server to shut down.
MIT License
81 stars 270 forks source link

error with main.py #30

Closed Litten9370 closed 12 months ago

Litten9370 commented 1 year ago

Start I was kicked: {"translate":"multiplayer.disconnect.unverified_username"} (False,) reconnect [JSE] node:internal/process/promises:288 [JSE] triggerUncaughtException(err, true / fromPromise /); [JSE] ^ [JSE] [JSE] [🐍 Python Error JavaScript attempt to call 'some function' in Python failed: [JSE] > bot.emit('kicked', packet.reason, false) [JSE] at Client. (C:\Python311\Lib\site-packages\javascript\js\node_modules\mineflayer\lib\plugins\kick.js:8:9) [JSE] at Client.emit (node:events:525:35) [JSE] at emitPacket (C:\Python311\Lib\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:83:12) [JSE] at FullPacketParser. (C:\Python311\Lib\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:106:9) [JSE] at FullPacketParser.emit (node:events:513:28) [JSE] at addChunk (C:\Python311\Lib\site-packages\javascript\js\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:279:12) [JSE] at readableAddChunk (C:\Python311\Lib\site-packages\javascript\js\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:262:11) [JSE] [JSE] ... across the bridge ... [JSE] [JSE] > bot.end(); bot.join() [JSE] at kicked (D:\24.Aternos.V2\Python\main.py:36) [JSE] 🌉 TypeError: 'NoneType' object is not callable] [JSE] [JSE] Node.js v18.16.1

5ucur commented 1 year ago

Sounds to me like the server does not allow unverified usernames - i.e. players who don't own the game. Check if toggling that option allows the bot to work normally.

YTFort commented 1 year ago

In order to understand what's going on, you need to know a couple of questions.

  1. What OS do you have
  2. Through which program do you run the script
  3. Are the necessary versions installed
5ucur commented 1 year ago

I tested by disallowing cracked clients over on Aternos, and running the bot. The identical error occurred.

The error ```py Start I was kicked: {"translate":"multiplayer.disconnect.unverified_username"} (False,) reconnect [JSE] node:internal/process/promises:289 [JSE] triggerUncaughtException(err, true /* fromPromise */); [JSE] ^ [JSE] [🐍 Python Error JavaScript attempt to call 'some function' in Python failed: [JSE] > bot.emit('kicked', packet.reason, false) [JSE] at Client. (/home/username/Documents/Git/24-Aternos/Python/env/lib/python3.11/site-packages/javascript/js/node_modules/mineflayer/lib/plugins/kick.js:8:9) [JSE] at Client.emit (node:events:526:35) [JSE] at emitPacket (/home/username/Documents/Git/24-Aternos/Python/env/lib/python3.11/site-packages/javascript/js/node_modules/minecraft-protocol/src/client.js:83:12) [JSE] at FullPacketParser. (/home/username/Documents/Git/24-Aternos/Python/env/lib/python3.11/site-packages/javascript/js/node_modules/minecraft-protocol/src/client.js:107:9) [JSE] at FullPacketParser.emit (node:events:514:28) [JSE] at addChunk (/home/username/Documents/Git/24-Aternos/Python/env/lib/python3.11/site-packages/javascript/js/node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:279:12) [JSE] at readableAddChunk (/home/username/Documents/Git/24-Aternos/Python/env/lib/python3.11/site-packages/javascript/js/node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:262:11) [JSE] ... across the bridge ... [JSE] > bot.end(); bot.join() [JSE] at kicked (/home/username/Documents/Git/24-Aternos/Python/main.py:36) [JSE] 🌉 TypeError: 'NoneType' object is not callable] [JSE] Node.js v20.5.0 ```

Thus, the solution should be allowing cracked clients in your Aternos server settings. It's obvious this is the reason, because the error states multiplayer.disconnect.unverified_username in the kick reason.

YTFort commented 1 year ago

Try to do this: Open server.properties and set the online-mode=false parameter