Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Socket.IO Admin UI - connected but data is not displayed

I followed documentation for Socket.IO Admin UI (https://socket.io/docs/v4/admin-ui/) which is pretty simple, but I can't get it to work.

Let me tell you that my socket.io code works perfectly.

My code:

const { instrument } = require("@socket.io/admin-ui");

instrument(io, {
  auth: {
    type: "basic",
    username: "example",
    password: "$2a$10$Jisp23q0LsLDWTxS3p5MzOxf4Lu9y6r.example"
  }
});

The thing is that when I enter server url and hit connect (without username and password) it actually connects, but there is no data traffic. It's always on zero.

enter image description here

enter image description here

Why it ignores my credentials and why there is no traffic even though it says that it successfuly connected to socket.io server?

like image 588
Luka Elsner Avatar asked Mar 23 '26 20:03

Luka Elsner


1 Answers

I have found out what was the problem. Default namespace is "/admin" and had to change it to "/". :(

enter image description here

like image 148
Luka Elsner Avatar answered Mar 26 '26 13:03

Luka Elsner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!