patrikx3/redis-ui

Crash when adding new connection

Frontrider opened this issue ยท 9 comments

I get this crash when opening settings, using docker on openshift (not using the template you provided, as it had no healthchecks):

uncaughtException TypeError: Cannot read property 'map' of undefined
at Object.sendConnections (/usr/local/lib/node_modules/p3x-redis-ui/node_modules/p3x-redis-ui-server/src/service/socket.io/shared.js:68:44)
at Namespace. (/usr/local/lib/node_modules/p3x-redis-ui/node_modules/p3x-redis-ui-server/src/service/socket.io/socket.js:90:24)
at Namespace.emit (node:events:378:20)
at /usr/local/lib/node_modules/p3x-redis-ui/node_modules/socket.io/dist/namespace.js:134:27
at processTicksAndRejections (node:internal/process/task_queues:76:11)
socket.io connected dNmj9eh3QpZom7IKAAAB

it must be in your environment. i cannot reproduce.

try the same settings without openshift and it will work.

So there's not even a "because when you were doing x, it could be caused by y", s in "because it happened because I was opening settings, it could be ... ".

to me it looks like it is not able to saving files, but i cannot debug this. but as you can see multiple kubernetes examples are there and it works. so this error looks like in the environment you setup.

it must be in your configuration, god give me false and i will fix it for you.

i tested, i created a connection and connected and so on, and there are about 30k downloads, if it a valid error, i will receive more errors like this.

to me it looks like it is not able to saving files, but i cannot debug this. but as you can see multiple kubernetes examples are there and it works. so this error looks like in the environment you setup.

Thank you, this is the answer what I was looking for. That error message was not descriptive enough for me to start debugging it.

Found the culprit.
The crash is happening on this line, when calling connections.list.map, with list being undefined:
https://github.com/patrikx3/redis-ui-server/blob/23154624d73002c394a5cac9bea61c23bc5a821d/src/service/socket.io/shared.js#L68

Is that the list of already declared connections (which is 100% undefined in my case as I can not connect to the cluster from outside the environment, and I'm trying to create a new one from the gui), or is it trying to send an empty connection to the server, before I was done with it?

i can't reproduce it.

this error, again, it is in your own environment.