• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Opera GX Websockets not working on Opera GX

Tizzio

Member
Hi, did you manage to get websockets working on OperaGX?

GML:
socket = network_create_socket(network_socket_ws);

//i tried all of the following
network_connect_raw(socket, "localhost", 9777)
network_connect_raw_async(socket, "localhost", 9777)
network_connect(socket, "localhost", 9777)
network_connect_async(socket, "localhost", 9777)

//but none it's working on Opera GX, console output:
//Socket(0): Synchronous read timed out.
//Socket(0): synchronous WebSocket handshake failed.


minimal node server code (the log is triggered when running on windows, but not on GX)
JavaScript:
var net = require('net');
var server = net.createServer(function(socket) {
    console.log("something happened"); //this is triggered using the Windows export, but not by Opera GX
});
server.listen(9777, '127.0.0.1');
This is a result of many hours of tests with all the possible configurations (network_socket_tcp, network_socket_udp, network_socket_ws), localhost and server hosted.
I also tried with the ws and http node packages before trying the lowest level way to communicate (net package)

For example the following code works, and triggers "something happened" on both Windows and Opera GX
GML:
http_get("http://127.0.0.1:9777");
 
Last edited:

peardox

Member
Ahh - my server was responding with 301s if I gave it a URL without a trailing slash so I just thought there may be a similar issue with network

Did you actually try the trailing slash? It can't hurt and it did solve my problem when GMS itself gave no hint of the problem's cause (worked out my issue with Apache logs)

Has node got anything similar, maybe verbose output or summat (I don't use node - it shows...) - i.e. can you see if a connection attempt is even made. That's how I started my bug-finding with mine.
 

Tizzio

Member
Ahh - my server was responding with 301s if I gave it a URL without a trailing slash so I just thought there may be a similar issue with network

Did you actually try the trailing slash? It can't hurt and it did solve my problem when GMS itself gave no hint of the problem's cause (worked out my issue with Apache logs)

Has node got anything similar, maybe verbose output or summat (I don't use node - it shows...) - i.e. can you see if a connection attempt is even made. That's how I started my bug-finding with mine.
In my case i'm trying to connect to localhost network_connect_raw(socket, "localhost", 9777) so there are no slashes (i also tried with 127.0.0.1 or custom IP with no luck, i guess the functions are still in development for the GX Export)
 

kyle788

Member
I also tried the same with websockets and Opera GX with the same results as Tizzio.

Can we get an official word from one of the devs regarding networking support on the Opera GX export?
 

kyle788

Member
Hi rwkay,

Thanks for the reply! I checked out the beta runtime release notes and it mentioned:
"Secure sockets are now supported on almost all platforms (everything except for UWP, Xbox One builds which used the XDK, and OperaGX)"

It looks like according to those patch notes, it is saying OperaGX doesn't have secure sockets support. Also regardless of secure web sockets, what about just web socket support in general?

Have you got it tested and working on your side rwkay? Thanks for your help.
 

rwkay

GameMaker Staff
GameMaker Dev.
OperaGX secure web sockets was added in one of the Beta's last week it may not have been mentioned in the Release Notes but it is there.

EDIT: I also asked the team and normal web sockets was added to OperaGX as well at the same time.

Russell
 

kyle788

Member
Thanks for the reply Russell.

I am using the newest build that came out today and now I can see the OperaGX client connect to my Windows server but then it promptly disconnects.
It states on my OperaGX client: "Synchronous WebSocket connections are not supported on the Opera GX target" which is incorrect as I am using an asynchronous connection (network_connect_async)

Just a heads up that I am using ws, not wss, as it appears you cannot create a server on the Windows target with wss at the moment. It states "Error: WSS not yet implemented"
 

rwkay

GameMaker Staff
GameMaker Dev.
Thanks for the reply Russell.

I am using the newest build that came out today and now I can see the OperaGX client connect to my Windows server but then it promptly disconnects.
It states on my OperaGX client: "Synchronous WebSocket connections are not supported on the Opera GX target" which is incorrect as I am using an asynchronous connection (network_connect_async)

Just a heads up that I am using ws, not wss, as it appears you cannot create a server on the Windows target with wss at the moment. It states "Error: WSS not yet implemented"
Please file a bug so we can see what you are doing as this should be working in both scenarios (You are definitely on the new runtime)

Russell
 
Top