-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ioredis throws an error that i cannot catch and make p3x-redis-server (p3x-redis-ui) crash #1310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @p3x-robot , I'm not sure where the select command was sent. Can you enable |
it is happening, when i set the it happens, when a user wrong configuration sets (eg. the server is cluster, but the config is not in cluster mode) [P3XRS] [PID: 024551] 3/27/2021, 7:05:54 AM unhandledRejection ReplyError: ERR SELECT is not allowed in cluster mode
at Object.onceWrapper (events.js:421:28)
at Socket.emit (events.js:327:22)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10)
at TCPConnectWrap.callbackTrampoline (internal/async_hooks.js:131:14) {
command: { name: 'select', args: [ '1' ] }
} Promise {
<rejected> ReplyError: ERR SELECT is not allowed in cluster mode
at Object.onceWrapper (events.js:421:28)
at Socket.emit (events.js:327:22)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10)
at TCPConnectWrap.callbackTrampoline (internal/async_hooks.js:131:14) {
command: { name: 'select', args: [Array] }
}
} |
the problam is i cannot catch this error, uncoverable. |
Hmm, strange. The stack doesn't give any useful information. Is there a way I can reproduce the issue? I downloaded the electron package from https://github.com/patrikx3/redis-ui/releases but can't reproduce it. My steps:
|
@luin : (make sure it is an error, disable cluster) then connect to it, then on the home, select a database like 10. then refresh the browser, it will try to connect to database 10, then it crashes. |
ok, i solved it, with a different solution, but this errror exists... if you do not want to care about i can close it for you. |
I can finally reproduce this. How did you solve the issue? Regarding the solution, my current idea is to emit an |
i disabled on the connection and when the gui reads the keys via scan, before, i call but what it is in the |
yes i think it is a good solution to emit an error event, sure. |
🎉 This issue has been resolved in version 4.24.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
thanks very much! |
## [4.24.5](redis/ioredis@v4.24.4...v4.24.5) (2021-03-27) ### Bug Fixes * select db in cluster mode causes unhandled errors ([#1311](redis/ioredis#1311)) ([da3ec92](redis/ioredis@da3ec92)), closes [#1310](redis/ioredis#1310)
hello!
what happening is that if a user configure a redis settings wrong, there is an error, that i cannot catch.
the error is like this:
so if the user creates a setting for a non cluster that is actually a cluster this error happening and there is no way to catch, so my app crashes.
please let me know how i can disable this automatic
select 1
command, when you are connecting to a clustered redis instance but with wrong connection, without enabling cluster mode.The text was updated successfully, but these errors were encountered: