How do I solve this error?

  • Javascript error!

    Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

    blob: r/https://preview.construct.net/b98dc71d-2434-4fbc-94b0-0f6b316ef03d, line 14 (col 102)

    This may be a bug in Construct 3, or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.

    How can I solve this guys? Thank you!

  • Well the message seems to indicate you are attempting to create a non-secured websocket connection.

    As indicated in the first paragraphs of the websocket plugin manual article your connection should be established using the wss protocol so make sure the websocket server you are trying to reach is correctly configured and providing/using a secure connection.

    Construct 3 runs and previews your games on a secure (HTTPS) site. Some browsers block connections from secure to insecure sites. This means if you use an insecure WebSocket (ws: rather than wss:) the connection may be blocked in Construct 3's preview mode.

  • And how can I fix it? Im not very informed about websocket plugin. Thank you by the way.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well the first thing to do is to inform yourself.

    Read the manual article as a start.

    Then have you set up the server you are trying to reach ?

    If so, consult its documentation to make sure it is correctly configure and is using a secure protocol.

    Then make sure the URL you are using within construct starts with wss instead of ws.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)