Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-123297

Cannot connect to working Websocket Server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.16.220, 1.16.210
    • None
    • Unconfirmed
    • Windows

      Websocket connection requests using the /connect or /wsserver command fail when trying to connect to a local websocket server. The server code has not changed since but suddenly Bedrock cannot connect, "Could not connect to server: ws://localhost:3000"

      The issue has been replicated on more than one network using various websocket servers. The following code is a very simple C# websocket server for testing.

      using System;
      using System.Net;
      using System.Net.Sockets;
      
      namespace WebsocketServ
      {
          class Program
          {
              static void Main(string[] args)
              {
                  TcpListener server = new TcpListener(IPAddress.Parse("127.0.0.1"), 3000);
                  server.Start();
                  Console.WriteLine("Server has started on 127.0.0.1:3000");
                  TcpClient client = server.AcceptTcpClient();
                  Console.WriteLine("A client connected.");
              }
          }
      }
      

      Attempting to connect in-game produces the "Could not connect to server: ws://localhost:3000" error. Attempting to connect from a test client confirms that the server does accept connections properly.

      This server code along with multiple other WSS implementations have all worked previously, but suddenly stopped about a day or two ago. Other users have tested the code as well and have been able to produce the same issue.

       

            laurhinch Lauren Hinch
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: