• I'm using the exact example here on port 3030 to create a websocket server on an esp32 and when I attempt to connect to the server via a Chrome browser client I receive the error below:

    ws server connection error

    The js code used in Chrome is extremely simple:

    new WebSocket('ws://')

    The weird part is the callback for when a websocket connection opens is called on the espruino websocket server:

    server.on('websocket', function(ws){
      console.log('websocket opened!');

    but right after, Chrome throws the error shown in the image above, and I'm not able to send or receive messages.

    The current espruino version info is:

      VERSION: "2v00.42",
      GIT_COMMIT: "1a1fd36",
      BOARD: "ESP32",
      FLASH: 0, RAM: 524288,
      CONSOLE: "Serial1",
      EXPTR: 1073483756

    Thank you in advance!

  • Also, I've used the same code on both the an official espruino board and an esp8266 without Chrome throwing any error. (For reference). Thank you!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

esp32 Websocket server error when connecting from chrome browser client

Posted by Avatar for mike_k @mike_k