mojira.dev
MCPE-70226

Could not connect to server: ws://localhost:8080

I have been trying to connect to a very simple example web socket server using the command /connect. When trying and doing the command /connect localhost:8080, I get the error "Could not connect to server: ws://localhost:8080" on mc, after a few seconds after executing the command. 

Before this I set up the simple server, using example code from github (https://github.com/websockets/ws#simple-server). Executing the web socket server seems to execute fine, with no issues, but on running the command I see no output from the code. Even when debugging further looking at specific web socket server events, eg. error, I still get no output. 

I'm lead to believe that this is a problem on the mc side, and the mc client will not connect to my web socket server.

Extra info:

  • I'm running the command inside my own world, with cheat's active.

  • I've tried doing the same on a world with education edition enabled, ( it seemed like web sockets were designed to be used on this mode ).

  • I've tried using my local ip address instead of local host, as well as using a different port number.

Comments 4

Hi Joseph,

I just tested this with Code Connect and the WebSocket functionality still works in the official app so its likely something wrong in the GitHub project.

I was unable to test though because you linked to the Bug report rather than the git repo 😛

Ionic

Here's the link to the example code I used. https://github.com/websockets/ws#simple-server

I read through and tried to copy the few tutorials of how this is implemented in minecraft without the use of code connect, and seem to be unable to replecate it. 

Original post editied to include link as well

Thank you for your report!
However, this issue has been temporarily resolved as Awaiting Response

Is this still an issue in the latest version?

If it is, please be sure to include steps to reproduce the problem:

Steps to Reproduce:
1.
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

joe

(Unassigned)

Unconfirmed

Windows

Windows 10

1.14.60 Hotfix

Retrieved