flying-squid icon indicating copy to clipboard operation
flying-squid copied to clipboard

Item throw error/bug

Open ghost opened this issue 6 years ago • 4 comments

Error:

/home/pi/Desktop/NodeJS_MC/node_modules/minecraft-protocol/src/transforms/framing.js:66
          } else { throw e }
                   ^

TypeError: Cannot read property 'type' of undefined

I tried throw item while inventory was open. I mean I moved cursor to item then pressed q. After that server crashed.

ghost avatar Sep 15 '19 12:09 ghost

Full error, full code

On Sun, Sep 15, 2019, 14:46 RisksY [email protected] wrote:

Error:

/home/pi/Desktop/NodeJS_MC/node_modules/minecraft-protocol/src/transforms/framing.js:66 } else { throw e } ^

TypeError: Cannot read property 'type' of undefined

I tried throw item while inventory was open. I mean I moved cursor to item then pressed q. After that server crashed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/flying-squid/issues/369?email_source=notifications&email_token=AAR437RHSS2SGDZS2GI3TYTQJYVBTA5CNFSM4IW2PBD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLNYZWA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAR437VF63SPJBVB32OGPC3QJYVBTANCNFSM4IW2PBDQ .

rom1504 avatar Sep 15 '19 16:09 rom1504

Full log

[Essentials] Plugin enabled
September 15th 2019, 19:58:51 [PLUGINS] Loaded "flying-squid-essentials"
September 15th 2019, 19:58:51 [INFO]: Server listening on port 25565
September 15th 2019, 19:58:51 seed: 1320044072
September 15th 2019, 19:59:19 [INFO]: RisksY (127.0.0.1) connected
September 15th 2019, 19:59:19 [INFO]: position written, player spawning...
/home/risksy/Desktop/NodeJS_MC/node_modules/minecraft-protocol/src/transforms/framing.js:66
          } else { throw e }
                   ^

TypeError: Cannot read property 'type' of undefined
    at Client.<anonymous> (/home/risksy/Desktop/NodeJS_MC/src/lib/plugins/inventory.js:75:32)
    at Client.emit (events.js:189:13)
    at FullPacketParser.deserializer.on (/home/risksy/Desktop/NodeJS_MC/node_modules/minecraft-protocol/src/client.js:82:12)
    at FullPacketParser.emit (events.js:189:13)
    at addChunk (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:297:12)
    at readableAddChunk (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:279:11)
    at FullPacketParser.Readable.push (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:240:10)
    at FullPacketParser.Transform.push (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_transform.js:139:32)
    at FullPacketParser._transform (/home/risksy/Desktop/NodeJS_MC/node_modules/protodef/src/serializer.js:81:10)
    at FullPacketParser.Transform._read (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_transform.js:177:10)
    at FullPacketParser.Transform._write (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_transform.js:164:83)
    at doWrite (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_writable.js:405:139)
    at writeOrBuffer (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_writable.js:394:5)
    at FullPacketParser.Writable.write (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_writable.js:303:11)
    at Decompressor.ondata (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:662:20)
    at Decompressor.emit (events.js:189:13)
    at addChunk (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:297:12)
    at readableAddChunk (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:279:11)
    at Decompressor.Readable.push (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_readable.js:240:10)
    at Decompressor.Transform.push (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_transform.js:139:32)
    at Decompressor._transform (/home/risksy/Desktop/NodeJS_MC/node_modules/minecraft-protocol/src/transforms/compression.js:52:12)
    at Decompressor.Transform._read (/home/risksy/Desktop/NodeJS_MC/node_modules/readable-stream/lib/_stream_transform.js:177:10)

I used latest flying-squid didn't change any code. To make crash server, throw item on survival after pick up block with breaking it.

ghost avatar Sep 15 '19 17:09 ghost

I tried again in my computer. So username is risksy this time.

ghost avatar Sep 15 '19 17:09 ghost

Line 75

https://github.com/PrismarineJS/flying-squid/blob/1b519708bc661613f5aec3fa048138f03eb93a2b/src/lib/plugins/inventory.js#L68-L79

demipixel avatar Sep 15 '19 17:09 demipixel