{"record":{"id":"9e37ce20678cbbc1","repo":"qishibo/AnotherRedisDesktopManager","slug":"this-t-message-scan-disabled","errorCode":null,"errorMessage":"this.$t('message.scan_disabled')","messagePattern":"this\\.\\$t\\('message\\.scan_disabled'\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/components/KeyList.vue","lineNumber":188,"sourceCode":"          this.onePageKeysCount += keys.length;\n\n          // scan once reaches page size\n          if (this.onePageKeysCount >= keysPageSize && loadAll === false) {\n            // temp stop\n            stream.pause();\n            this.resetSearchStatus();\n          }\n        });\n\n        stream.on('error', (e) => {\n          this.resetSearchStatus();\n\n          // scan command disabled, other functions may be used normally\n          if (\n            (e.message.includes('unknown command') && e.message.includes('scan'))\n            || e.message.includes(\"command 'SCAN' is not allowed\")\n          ) {\n            return this.$message.error({\n              message: this.$t('message.scan_disabled'),\n              duration: 1500,\n            });\n          }\n\n          // other errors\n          this.$message.error({\n            message: `Stream On Error: ${e.message}`,\n            duration: 1500,\n          });\n\n          setTimeout(() => {\n            this.$bus.$emit('closeConnection');\n          }, 50);\n        });\n\n        stream.on('end', () => {\n          // all nodes scan finished(cusor back to 0)","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/KeyList.vue#L170-L206","documentation":"Special-cased SCAN failure in KeyList.vue's stream error handler. When the server/proxy error message contains 'unknown command' together with 'scan', or exactly matches \"command 'SCAN' is not allowed\" (the signature of restrictive proxies and ACL-restricted users), the app shows the localized 'scan_disabled' toast and deliberately keeps the connection usable - per the comment, other functions still work.","triggerScenarios":"Connecting through a proxy that does not implement SCAN (Twemproxy, some managed front-ends); Redis 2.x older than SCAN's introduction in 2.8; an ACL user restricted with '-scan' or missing the @keyspace category; managed offerings that whitelist a fixed command set.","commonSituations":"Corporate proxy in front of Redis; ElastiCache/managed entry points with limited command surfaces; tightly scoped ACL users created for the GUI.","solutions":["Connect directly to a real Redis node instead of through the proxy.","If an ACL is in play, grant the user the @keyspace category (SCAN) - 'ACL SETUSER myuser +@keyspace'.","For read-only exploration without SCAN, use exact key-name lookup (the app's exists-based exact match) or KEYS on small, non-production instances.","Upgrade servers older than Redis 2.8."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// probe SCAN availability once per connection\nasync function scanAvailable(client) {\n  try {\n    await client.call('scan', '0');\n    return true;\n  } catch (e) {\n    return !(e.message.includes('unknown command') || e.message.includes('is not allowed'));\n  }\n}","typeGuard":"const isScanDisabledError = (e) =>\n  (e.message.includes('unknown command') && e.message.includes('scan')) ||\n  e.message.includes(\"command 'SCAN' is not allowed\");","tryCatchPattern":"stream.on('error', (e) => {\n  if (isScanDisabledError(e)) {\n    switchToExactMatchMode(); // degraded but functional - do NOT close the connection\n  } else {\n    handleFatalStreamError(e);\n  }\n});","preventionTips":["Probe SCAN once per connection and cache the result instead of discovering the restriction mid-scan.","When SCAN is unavailable, fall back to exact-name lookups (EXISTS) rather than erroring.","Prefer direct node connections over proxies that implement a subset of the command set."],"tags":["scan","proxy","acl","redis-version","command-restriction"],"backgroundTag":"redis-command-not-allowed","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}