YTFort / 24-Aternos

This is a bot for minecraft hosting aternos. This bot does not allow the server to shut down.
The Unlicense
77 stars 250 forks source link

When launching, it fails with this error: Do not have protocol data for protocol version 764 (attempted to use 763 data) #33

Open monohuman opened 9 months ago

monohuman commented 9 months ago

Start Error: Do not have protocol data for protocol version 764 (attempted to use 763 data) at createProtocol (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\transforms\serializer.js:26:11) at createSerializer (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\transforms\serializer.js:46:25) at Client.setSerializer (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:42:23) at set state [as state] (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:128:10) at C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\client\autoVersion.js:43:18 at C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\ping.js:13:7 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Connect ERROR: EventEmitter { _events: [Object: null prototype] { error: [ [Function (anonymous)], (Some Python object) ], inject_allowed: [Function: bound onceWrapper] { listener: [Function: onInjectAllowed] }, login: (Some Python object), kicked: (Some Python object), chat: (Some Python object), spawn: (Some Python object), death: (Some Python object) }, _eventsCount: 7, _maxListeners: undefined, _client: Client { _events: [Object: null prototype] { connect: [Array], keep_alive: [Function: onKeepAlive], end: [Array], encryption_begin: [Function], server_data: [Function (anonymous)], login: [Function], success: [Function], compress: [Function], set_compression: [Function: onCompressionRequest], login_plugin_request: [Function: onLoginPluginRequest], custom_payload: [Function: onCustomPayload], disconnect: [Function (anonymous)], error: [Function (anonymous)], connect_allowed: [Array] }, _eventsCount: 14, _maxListeners: undefined, customPackets: undefined, version: '1.20.2', isServer: false, splitter: Splitter { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 5, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: true, buffer: , recognizeLegacyPing: true,

  [Symbol(kCallback)]: null
},
packetsToParse: {},
compressor: null,
framer: Framer {
  _readableState: [ReadableState],
  _events: [Object: null prototype],
  _eventsCount: 4,
  _maxListeners: undefined,
  _writableState: [WritableState],
  allowHalfOpen: true,
  [Symbol(kCapture)]: false,
  [Symbol(kCallback)]: null
},
cipher: null,
decipher: null,
decompressor: null,
ended: false,
latency: 0,
hideErrors: false,
closeTimer: null,
protocolState: 'handshaking',
serializer: Serializer {
  _readableState: [ReadableState],
  readable: true,
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  _writableState: [WritableState],
  writable: true,
  allowHalfOpen: true,
  _transformState: [Object],
  proto: [CompiledProtodef],
  mainType: 'packet',
  queue: <Buffer >,
  [Symbol(kCapture)]: false
},
deserializer: FullPacketParser {
  _readableState: [ReadableState],
  readable: true,
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  _writableState: [WritableState],
  writable: true,
  allowHalfOpen: true,
  _transformState: [Object],
  proto: [CompiledProtodef],
  mainType: 'packet',
  noErrorLogging: false,
  [Symbol(kCapture)]: false
},
_mcBundle: [],
_hasBundlePacket: true,
username: 'notabot',
socket: Socket {
  connecting: false,
  _hadError: false,
  _parent: null,
  _host: 'bdaworshippers.aternos.me',
  _closeAfterHandlingError: false,
  _readableState: [ReadableState],
  _events: [Object: null prototype],
  _eventsCount: 8,
  _maxListeners: undefined,
  _writableState: [WritableState],
  allowHalfOpen: false,
  _sockname: null,
  _pendingData: null,
  _pendingEncoding: '',
  server: null,
  _server: null,
  [Symbol(async_id_symbol)]: 30,
  [Symbol(kHandle)]: [TCP],
  [Symbol(lastWriteQueueSize)]: 0,
  [Symbol(timeout)]: null,
  [Symbol(kBuffer)]: null,
  [Symbol(kBufferCb)]: null,
  [Symbol(kBufferGen)]: null,
  [Symbol(kCapture)]: false,
  [Symbol(kSetNoDelay)]: true,
  [Symbol(kSetKeepAlive)]: false,
  [Symbol(kSetKeepAliveInitialDelay)]: 0,
  [Symbol(kBytesRead)]: 0,
  [Symbol(kBytesWritten)]: 0
},
wait_connect: true,
serverFeatures: {},
registerChannel: [Function: registerChannel],
unregisterChannel: [Function: unregisterChannel],
writeChannel: [Function: writeChannel],
[Symbol(kCapture)]: false

}, end: [Function (anonymous)], loadPlugin: [Function: loadPlugin], loadPlugins: [Function: loadPlugins], hasPlugin: [Function: hasPlugin],

} (Error: Do not have protocol data for protocol version 764 (attempted to use 763 data) at createProtocol (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\transforms\serializer.js:26:11) at createSerializer (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\transforms\serializer.js:46:25) at Client.setSerializer (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:42:23) at set state [as state] (C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\client.js:128:10) at C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\client\autoVersion.js:43:18 at C:\Users\letsg\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\javascript\js\node_modules\minecraft-protocol\src\ping.js:13:7 at process.processTicksAndRejections (node:internal/process/task_queues:95:5),)

YTFort commented 9 months ago

Answer a couple of questions to help you:

  1. Which version are you running (python/nodeJS)
  2. Have you changed the program code
  3. What is the version of your minecraft server

As I understand it now, you have an error with the fact that you specified the version of the minecraft server in the program code is not correct.

monohuman commented 8 months ago

Python Nope 1.20.2

On Mon, Oct 23, 2023 at 10:11 PM FORT @.***> wrote:

Answer a couple of questions to help you:

  1. Which version are you running (python/nodeJS)
  2. Have you changed the program code
  3. What is the version of your minecraft server

As I understand it now, you have an error with the fact that you specified the version of the minecraft server in the program code is not correct.

— Reply to this email directly, view it on GitHub https://github.com/YTFort/24-Aternos/issues/33#issuecomment-1775945608, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASUBMKYEACPDJ542FIRNBVTYA3FQ7AVCNFSM6AAAAAA6MSU6RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVHE2DKNRQHA . You are receiving this because you authored the thread.Message ID: @.***>

YTFort commented 8 months ago

try running the bot on an empty server. If everything works, then I understand what's going on.

monohuman commented 8 months ago

I will when I get home, thank you for the help What do you mean by an empty server?

On Thu, Oct 26, 2023 at 11:58 AM FORT @.***> wrote:

try running the bot on an empty server. If everything works, then I understand what's going on.

— Reply to this email directly, view it on GitHub https://github.com/YTFort/24-Aternos/issues/33#issuecomment-1780796812, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASUBMK7ZNLOXGPV6L7KRS4DYBIX4LAVCNFSM6AAAAAA6MSU6RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQG44TMOBRGI . You are receiving this because you authored the thread.Message ID: @.***>

YTFort commented 8 months ago

A newly created server, without plugins and so on. Only install the game version 1.20.2

monohuman commented 8 months ago

I did it, and I get the same error

YTFort commented 8 months ago

Look, there are two options.

  1. This is the case in the bot library. That is, the bot is not ready to work on this version of the game yet. In this case, you just need to wait for the update.

  2. This is a bug, to solve it, I will send the code now, try to use it.

YTFort commented 8 months ago

def started(stop): bot = mineflayer.createBot({ 'host': config.get('server', 'host'), 'port': config.get('server', 'port'), 'version': '1.20.2', # If it doesn't help, write 'false' instead of '1.20.2' 'username': config.get('bot', 'name') }) print('Start')

monohuman commented 8 months ago

I will try it when i get home in a few days thank you

On Sun, Oct 29, 2023 at 9:31 PM FORT @.***> wrote:

def started(stop): bot = mineflayer.createBot({ 'host': config.get('server', 'host'), 'port': config.get('server', 'port'), 'version': '1.20.2', # If it doesn't help, write 'false' instead of '1.20.2' 'username': config.get('bot', 'name') }) print('Start')

— Reply to this email directly, view it on GitHub https://github.com/YTFort/24-Aternos/issues/33#issuecomment-1784191185, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASUBMK4RE6PQIXVB5P6JSLLYB2OJRAVCNFSM6AAAAAA6MSU6RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUGE4TCMJYGU . You are receiving this because you authored the thread.Message ID: @.***>

5ucur commented 7 months ago

I have attempted the above fix, it returns Error: unsupported protocol version: 1.20.2 and likewise Error: unsupported protocol version: false. I am getting the error for protocol version 764 on the JS side of things, too - that's how I found this issue report.

If I'm interpreting the cause of the error correctly, it appears mineflayer itself (a dependency of this project) doesn't yet support 1.20.2, as pointed out by a contributor in an issue there. The issue is still open; so for now, there's nothing we can do except wait for the upstream dependency to be updated for 1.20.2.