prismarine-web-client icon indicating copy to clipboard operation
prismarine-web-client copied to clipboard

Error when connect to flying-squid server

Open codingwatching opened this issue 4 years ago • 5 comments

Hi everyone, Please help me to find out why this is error, thank you so much

image

image

Here is the script to start the server:

const mcServer = require('flying-squid')

mcServer.createMCServer({
  'motd': 'A Minecraft Server \nRunning flying-squid',
  'port': 25565,
  'max-players': 10,
  'online-mode': false,
  'logging': true,
  'gameMode': 1,
  'difficulty': 1,
  'worldFolder':'world',
  'generation': {
    'name': 'diamond_square',
    'options':{
      'worldHeight': 80
    }
  },
  'kickTimeout': 10000,
  'plugins': {

  },
  'modpe': false,
  'view-distance': 10,
  'player-list-text': {
    'header':'Flying squid',
    'footer':'Test server'
  },
  'everybody-op': true,
  'max-entities': 100,
  'version': '1.8'
})

codingwatching avatar Jul 30 '21 03:07 codingwatching

How did you access pwebclient?

u9g avatar Jul 30 '21 03:07 u9g

@u9g by open http://localhost:8080/ I run the npm install then npm start

image

Some logs

Last login: Fri Jul 30 10:08:31 on ttys000
apple@Apples-iMac FlyingSquid % node main.js 
July 30th 2021, 10:10:31 [INFO]: Server listening on port 25565
July 30th 2021, 10:10:31 seed: 1879398677
July 30th 2021, 10:12:00 [INFO]: pviewer927 (::ffff:127.0.0.1) connected
July 30th 2021, 10:12:00 [INFO]: position written, player spawning...
July 30th 2021, 10:12:09 [INFO]: pviewer927 disconnected

The error on the Inspect console here

Encountered error! Error: Cannot call write after a stream was destroyed
    at new NodeError (errors-browser.js:26)
    at doWrite (_stream_writable.js:409)
    at writeOrBuffer (_stream_writable.js:398)
    at Socket.Writable.write (_stream_writable.js:307)
    at Socket.write (browser.js:265)
    at Framer.ondata (_stream_readable.js:681)
    at Framer.emit (events.js:153)
    at addChunk (_stream_readable.js:298)
    at readableAddChunk (_stream_readable.js:280)
    at Framer.Readable.push (_stream_readable.js:241)
index.js:199 disconnected for undefined

image

image

image

codingwatching avatar Jul 30 '21 03:07 codingwatching

Hello. First of all, sorry for the late reply. I didn't notice this until now.

Does this issue happen only when connecting to a flying-squid based server or does it happen also when connecting to other servers (e.g., our public test server)?

As a sidenote, I'd heavily recommend joining our Discord for help, as we can respond faster there.

raymondjxu avatar Sep 06 '21 16:09 raymondjxu

Hi @AwesomestCode Thank you for the help Yes I can connect client with server.jar (1.12.2) from Minecraft server The error only happens when connecting to flying-squid based server. I update pwebclient to the latest version (1.3.0) but still have that error

codingwatching avatar Sep 07 '21 08:09 codingwatching

image

codingwatching avatar Sep 07 '21 08:09 codingwatching