55
Views
0
Comments
[Reactive SocketIO Client] xhr poll error
reactive-socketio-client
Reactive icon
Forge asset by Arley Silveira
Application Type
Reactive

Hi!


I'm getting an "[]XHR poll error" when trying to use my Socket.IO Url and I'm stuck where to debug the code. OS is running on a personal environment and socket IO is hosted on a different self hosted environment (IIS) as well. 


The testing that I did were

  • turning of the firewall of both server and client 
  • tested different configurations on both Server (Socket.IO) and client(OutSystems)
  •  I am able to browse the server's front end (NodeJS App) from another client PCs.


Here is my code on OutSystems

 -I'm using the ReactiveSocketIODemo and tried entering my socket IO Server URL on the textbox and didn't input any text on the event textbox.


Socket.IO Server 

const path = require('path');

const http = require('http');  

const express = require('express');

const socketio = require('socket.io');


const app = express();

const server = http.createServer(app);

const io = socketio(server);



app.use(express.static(path.join(__dirname, 'public')));

//testing events

io.on('connection', socket => {

    console.log('New Connection');

    socket.emit('message', 'Connected to IO Server');

    socket.broadcast.emit('message', 'another User connected');

    socket.on('disconnect', () => {

        io.emit('message','A user has left the Server');

    });

    

});

const PORT = 3001 || process.env.PORT;

server.listen(PORT,'0.0.0.0',() => console.log(`Server Running on PORT: ${PORT}`));

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.