qishibo/AnotherRedisDesktopManager · critical

Client On Error: ${error} Config right?

Error message

Client On Error: ${error} Config right?

What it means

The connected Redis client emitted its 'error' event — node_redis/ioredis surface every socket- and protocol-level failure here: ECONNRESET on dropped connections, ECONNREFUSED after a server restart, 'ERR invalid password' at handshake, or malformed replies. The handler shows the message and broadcasts closeConnection, tearing the connection tab down. The listener is also a crash guard: an unhandled 'error' event on an EventEmitter would throw and kill the renderer process.

Source

Thrown at src/components/ConnectionWrapper.vue:180

      // ssh client
      if (configCopy.sshOptions) {
        var clientPromise = redisClient.createSSHConnection(
          configCopy.sshOptions, configCopy.host, configCopy.port, configCopy.auth, configCopy,
        );
      }
      // normal client
      else {
        var clientPromise = redisClient.createConnection(
          configCopy.host, configCopy.port, configCopy.auth, configCopy,
        );
      }

      clientPromise.then((client) => {
        this.client = client;

        client.on('error', (error) => {
          this.$message.error({
            message: `Client On Error: ${error} Config right?`,
            duration: 3000,
            customClass: 'redis-on-error-message',
          });

          this.$bus.$emit('closeConnection');
        });
      }).catch((error) => {
        this.$message.error(error.message);
        this.$bus.$emit('closeConnection');
      });

      return clientPromise;
    },
    setColor(color, save = true) {
      const ulDom = this.$refs.connectionMenu.$el;
      const className = 'menu-with-custom-color';

View on GitHub (pinned to c149855106)

Solutions

  1. Read the embedded cause in the message: fix credentials for ERR invalid password, reachability for ECONNREFUSED/ECONNRESET
  2. Reconnect with the corrected config after closeConnection instead of leaving the tab dead
  3. Configure retryStrategy/maxRetriesPerRequest on the client so transient resets recover instead of bubbling here
  4. Keep the listener attached for the client's lifetime (removing it risks unhandled 'error' crashes)

Example fix

// before
client.on('error', (error) => {
  this.$message.error({ message: `Client On Error: ${error} Config right?`, duration: 3000 });
  this.$bus.$emit('closeConnection');
});

// after
client.on('error', (error) => {
  const msg = String(error && error.message ? error.message : error);
  if (/invalid password|NOAUTH/i.test(msg)) {
    this.$message.error(`Auth failed: ${msg}`);
  } else if (/ECONNRESET|ECONNREFUSED|ETIMEDOUT/.test(msg)) {
    this.$message.error(`Connection lost: ${msg}`);
  } else {
    this.$message.error(`Client On Error: ${msg} Config right?`);
  }
  this.$bus.$emit('closeConnection');
});
Defensive patterns

Strategy: try-catch

Try / catch

client.on('error', (err) => {
  const m = String(err && err.message ? err.message : err);
  if (/ECONNRESET|ETIMEDOUT/.test(m)) { /* transient: let retryStrategy recover */ }
  else if (/invalid password|NOAUTH|AUTH/i.test(m)) { /* fix config, reconnect */ }
  else {
    this.$message.error(`Client On Error: ${m} Config right?`);
    this.$bus.$emit('closeConnection');
  }
});

Prevention

When it happens

Trigger: Server restart or network blip while a connection tab is open; wrong password saved in the config (ERR invalid password on connect); LB reaping idle sockets; Redis sending unexpected protocol bytes.

Common situations: Long-lived desktop sessions over VPN, servers restarted under the user, stale configs after password rotation, flaky corporate networks.

Related errors


AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22). Data as JSON: /api/errors/81f000a1d34e83a3. Report an issue: GitHub.