socketio / socket.io-admin-ui

Admin UI for Socket.IO

Home Page:https://admin.socket.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI not showing running socket.io server and users

Thomas-1985 opened this issue · comments

Hi

express: 4.17.2
socket.io: 4.4.1
@socket.io/admin-ui: 0.3.0

I have added the ui backend to my socket.io / Express backend like this

    instrument(this.socketServer, {
      auth: {
        type: "basic",
        username: "admin",
        password: "$2b$10$..."
      },
      readonly: true,
      namespaceName: "/socketui"
    });

After i booted my backend, i can login to the ui (it says "connected") but i always see 0 servers and 0 clients online.

My socket.io server requires that for every event a token (jwt) has to be sent with the token attribute, but i don't think this should block the admin ui from showing stuff.

I don't know what im doing wrong here

Best,
Thomas

I think that's because you forgot to include the namespace name ("/socketui") in the server URL, so you are connected to the Socket.IO server, but in the main namespace and not the admin namespace.

I have added a dedicated field in the connection modal for the namespace, in order to prevent this kind of issues: 5a8a75e

Please reopen if needed!