PrismarineJS / flying-squid

Create Minecraft servers with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/flying-squid/
MIT License
547 stars 100 forks source link

Serialization error. Is it because of 1.16.5? #626

Closed FilipinoAkoShaders closed 1 year ago

FilipinoAkoShaders commented 1 year ago

I was wondering why am I getting this screen Screenshot_20230502-073833 Is it because im using 1.16.5 or its just the world? I CAN'T FIGURE OUT WHERE THIS THING IS COMING FROM I don't wanna recode the files because I might break it So the only answer for this is HELP!

Here's the log

May 2nd 2023, 07:38:29 [ERROR]: Client ::ffff:127.0.0.1:40802 : TypeError [ERR_INVALID_ARG_TYPE]: Serialization error for play.toClient : SizeOf error for undefined : The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received undefined                                                               
    at new NodeError (node:internal/errors:399:5)
    at Function.byteLength (node:buffer:738:11)                       
    at Object.shortString (eval at compile (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:258:12), <anonymous>:48:25)                                                   
    at Object.sizeOfPString [as nbtTagName] (eval at compile (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:258:12), <anonymous>:15:18)
    at nbt (eval at compile (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:258:12), <anonymous>:113:31)                                                                    
    at CompiledProtodef.sizeOf (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:89:14)
    at Object.sizeOfNbt [as nbt] (/data/data/com.termux/files/home/McSrv/node_modules/minecraft-protocol/src/datatypes/minecraft.js:55:20)                                                                
    at Object.packet_login (eval at compile (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:258:12), <anonymous>:1195:24)
    at eval (eval at compile (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:258:12), <anonymous>:2375:50)
    at packet (eval at compile (/data/data/com.termux/files/home/McSrv/node_modules/protodef/src/compiler.js:258:12), <anonymous>:2429:9)
May 2nd 2023, 07:38:29 [INFO]: ineedHelp disconnected           
May 2nd 2023, 07:38:30 [INFO]: ineedHelp (::ffff:127.0.0.1) connected                                                             
May 2nd 2023, 07:38:30 [INFO]: position written, player spawning..

Here's the code

const mcServer = require('flying-squid')

mcServer.createMCServer({
  'motd': 'A Minecraft Survival Server',
  'port': 25565,
  'version': '1.16.5',
  'max-players': 10,
  'online-mode': false,
  'logging': true,
  'gameMode': 1,
  'difficulty': 1,
  'worldFolder': 'srv-world', // it is completely in place and it exists where this code file is
  'generation': {
    'name': 'diamond_square',
    'options': {
      'worldHeight': 256
    }
  },
  'kickTimeout': 10000,
  'plugins': {

  },
  'player-list-text': {
    'header': 'NodeJS',
    'footer': 'Survival SMP'
  },
  'modpe': false,
  'view-distance': 10
})

I use my Phone as a server and I use termux If you're wondering why am I using flying-squid and not any server jars? Don't ask.

ghost commented 1 year ago

1.16.5 is not supported

FilipinoAkoShaders commented 1 year ago

So sad bro. What versions can it support?