PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.96k stars 904 forks source link

TypeError: Cannot read property 'id' of undefined #762

Closed Some1Random closed 5 years ago

Some1Random commented 5 years ago

If you are reporting a bug please report on these points :

C:\Users\1234\Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\transforms\framing.js:66 } else { throw e } ^

TypeError: Cannot read property 'id' of undefined at confirmTransaction (C:\Users\1234\Desktop\Bot\node_modules\mineflayer\lib\plugins\inventory.js:390:21) at Client.bot._client.on (C:\Users\1234\Desktop\Bot\node_modules\mineflayer\lib\plugins\inventory.js:502:5) at Client.emit (events.js:182:13) at FullPacketParser.deserializer.on (C:\Users\1234\Desktop\Bot\node_modules\minecraft-protocol\src\client.js:82:12) at FullPacketParser.emit (events.js:182:13) at addChunk (C:\1234\Desktop\Bot\node_modules\readable-stream\lib_stream_readable.js:301:12) at readableAddChunk (C:\Users\1234\Desktop\Bot\node_modules\readable-stream\lib_stream_readable.js:283:11) at FullPacketParser.Readable.push (C:\Users\1234\Desktop\Bot\node_modules\readable-stream\lib_stream_readable.js:247:10) at FullPacketParser.Transform.push (C:\Users\1234\Desktop\Bot\node_modules\readable-stream\lib_stream_transform.js:149:32) at FullPacketParser._transform (C:\Users\1234\Desktop\Bot\node_modules\protodef\src\serializer.js:81:10)

In particular it will be useful to provide these informations :

rom1504 commented 5 years ago

Yes this bug is known, it has been reported in the previous issue for a example (but also about 4 other ones) I think it's a spigot plugin doing weird things with the inventory. I'll have a look when I have some time.

On Sat, Jan 5, 2019, 12:53 SomeoneRandom notifications@github.com wrote:

If you are reporting a bug please report on these points :

  • what you want to do (the objective in english) not to get crash my bot
  • what you tried (the code) not relevant
  • what happened an error (you can see below)

C:\Users*****\Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\transforms\framing.js:66 } else { throw e } ^

TypeError: Cannot read property 'id' of undefined at confirmTransaction (C:\Users \Desktop\Ftop Discord Bot\node_modules\mineflayer\lib\plugins\inventory.js:390:21) at Client.bot._client.on (C:\Users*\Desktop\Ftop Discord Bot\node_modules\mineflayer\lib\plugins\inventory.js:502:5) at Client.emit (events.js:182:13) at FullPacketParser.deserializer.on (C:\Users

*\Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\client.js:82:12) at FullPacketParser.emit (events.js:182:13) at addChunk (C:\Users\Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:301:12) at readableAddChunk (C:\Users \Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:283:11) at FullPacketParser.Readable.push (C:\Users\Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:247:10) at FullPacketParser.Transform.push (C:\Users \Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_transform.js:149:32) at FullPacketParser._transform (C:\Users**\Desktop\Ftop Discord Bot\node_modules\protodef\src\serializer.js:81:10)

  • what you expected to happen: not to get kicked

In particular it will be useful to provide these informations :

  • what happens when using a mineflayer example?
  • what happens when using a node-minecraft-protocol example?
  • what mineflayer version? 6.4.1
  • what server version? 1.8-1.12
  • which server? (spigot, paper, vanilla, any particular plugins ?) spigot
  • what's the output of DEBUG="minecraft-protocol" node your_bot.js ?
  • what's the error msg? look above
  • what script is used?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/762, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_jwXyRPxk5nr5r0vk4kI_-hH54hnks5vAJI5gaJpZM4ZwqnF .

Some1Random commented 5 years ago

Yes this bug is known, it has been reported in the previous issue for a example (but also about 4 other ones) I think it's a spigot plugin doing weird things with the inventory. I'll have a look when I have some time. On Sat, Jan 5, 2019, 12:53 SomeoneRandom @.*> wrote: If you are reporting a bug please report on these points : - what you want to do (the objective in english) not to get crash my bot - what you tried (the code) not relevant - what happened an error (you can see below) C:\Users***\Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\transforms\framing.js:66 } else { throw e } ^ TypeError: Cannot read property 'id' of undefined at confirmTransaction (C:\Users \Desktop\Ftop Discord Bot\node_modules\mineflayer\lib\plugins\inventory.js:390:21) at Client.bot._client.on (C:\Users\Desktop\Ftop Discord Bot\node_modules\mineflayer\lib\plugins\inventory.js:502:5) at Client.emit (events.js:182:13) at FullPacketParser.deserializer.on (C:\Users \Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\client.js:82:12) at FullPacketParser.emit (events.js:182:13) at addChunk (C:\Users\Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:301:12) at readableAddChunk (C:\Users \Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:283:11) at FullPacketParser.Readable.push (C:\Users\Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:247:10) at FullPacketParser.Transform.push (C:\Users \Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_transform.js:149:32) at FullPacketParser._transform (C:\Users\Desktop\Ftop Discord Bot\node_modules\protodef\src\serializer.js:81:10) - what you expected to happen: not to get kicked In particular it will be useful to provide these informations : - what happens when using a mineflayer example? - what happens when using a node-minecraft-protocol example? - what mineflayer version? 6.4.1 - what server version? 1.8-1.12 - which server? (spigot, paper, vanilla, any particular plugins ?) spigot - what's the output of DEBUG="minecraft-protocol" node your_bot.js ? - what's the error msg? look above - what script is used? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#762>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_jwXyRPxk5nr5r0vk4kI_-hH54hnks5vAJI5gaJpZM4ZwqnF .

could the issue be related to the server version being 1.7 just noticed that there is no protocol for 1.7.

rom1504 commented 5 years ago

Yes, mineflayer doesn't support 1.7 (yet, if you care, it probably wouldn't be that hard to make it work for 1.7)

On Sat, Jan 5, 2019, 22:30 SomeoneRandom notifications@github.com wrote:

Yes this bug is known, it has been reported in the previous issue for a example (but also about 4 other ones) I think it's a spigot plugin doing weird things with the inventory. I'll have a look when I have some time. … <#m-2112724232248872676> On Sat, Jan 5, 2019, 12:53 SomeoneRandom @.> wrote: If you are reporting a bug please report on these points : - what you want to do (the objective in english) not to get crash my bot - what you tried (the code) not relevant - what happened an error (you can see below) C:\Users\Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\transforms\framing.js:66 } else { throw e } ^ TypeError: Cannot read property 'id' of undefined at confirmTransaction (C:\Users \Desktop\Ftop Discord Bot\node_modules\mineflayer\lib\plugins\inventory.js:390:21) at Client.bot._client.on (C:\Users\Desktop\Ftop Discord Bot\node_modules\mineflayer\lib\plugins\inventory.js:502:5) at Client.emit (events.js:182:13) at FullPacketParser.deserializer.on (C:\Users \Desktop\Ftop Discord Bot\node_modules\minecraft-protocol\src\client.js:82:12) at FullPacketParser.emit (events.js:182:13) at addChunk (C:\Users\Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:301:12) at readableAddChunk (C:\Users \Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:283:11) at FullPacketParser.Readable.push (C:\Users\Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_readable.js:247:10) at FullPacketParser.Transform.push (C:\Users \Desktop\Ftop Discord Bot\node_modules\readable-stream\lib_stream_transform.js:149:32) at FullPacketParser._transform (C:\Users\Desktop\Ftop Discord Bot\node_modules\protodef\src\serializer.js:81:10) - what you expected to happen: not to get kicked In particular it will be useful to provide these informations : - what happens when using a mineflayer example? - what happens when using a node-minecraft-protocol example? - what mineflayer version? 6.4.1 - what server version? 1.8-1.12 - which server? (spigot, paper, vanilla, any particular plugins ?) spigot - what's the output of DEBUG="minecraft-protocol" node your_bot.js ? - what's the error msg? look above - what script is used? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <

762 https://github.com/PrismarineJS/mineflayer/issues/762>, or mute

the thread https://github.com/notifications/unsubscribe-auth/ACPN_jwXyRPxk5nr5r0vk4kI_-hH54hnks5vAJI5gaJpZM4ZwqnF .

could the issue be related to the server version being 1.7 just noticed that there is no protocol for 1.7.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/762#issuecomment-451691921, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_tGyLtD8f_EdW7dse-KTgbQjy3Qgks5vARlbgaJpZM4ZwqnF .

Some1Random commented 5 years ago

ok, if you got spare time to add it, that would be awesome!

Some1Random commented 5 years ago

i was testing to see if i could get rid of the error and i noticed when i did chat broke but also i noticed that it broke at the same message

ChatMessage { json: { text: '' }, text: '', bold: undefined, italic: undefined, underlined: undefined, strikethrough: undefined, obfuscated: undefined, color: undefined }

had it log into console at the same time

could the issue be that the message has nothing? @rom1504

rom1504 commented 5 years ago

now fixed