Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when connect to flying-squid server #201

Open
codingwatching opened this issue Jul 30, 2021 · 5 comments
Open

Error when connect to flying-squid server #201

codingwatching opened this issue Jul 30, 2021 · 5 comments
Labels

Comments

@codingwatching
Copy link

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'
})

@u9g
Copy link
Member

u9g commented Jul 30, 2021

How did you access pwebclient?

@codingwatching
Copy link
Author

codingwatching commented Jul 30, 2021

@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

@AwesomestCode
Copy link
Member

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.

@codingwatching
Copy link
Author

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
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants