{"record":{"id":"6f2b39235efa16f6","repo":"projectdiscovery/nuclei","slug":"args-must-be-string-or-interface-got-string","errorCode":null,"errorMessage":"args must be []string or []interface{}, got string","messagePattern":"args must be \\[\\]string or \\[\\]interface(.+?), got string","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/redis/redis.go","lineNumber":248,"sourceCode":"\t// are stringified rather than dropped: Redis ARGV values are always\n\t// bulk strings on the Lua side, so \"123\"/\"true\" match JS expectations.\n\targsInterface := []interface{}{}\n\tif args != nil {\n\t\tswitch v := args.(type) {\n\t\tcase []string:\n\t\t\targsInterface = make([]interface{}, len(v))\n\t\t\tfor i, arg := range v {\n\t\t\t\targsInterface[i] = arg\n\t\t\t}\n\t\tcase []interface{}:\n\t\t\targsInterface = make([]interface{}, len(v))\n\t\t\tfor i, item := range v {\n\t\t\t\targsInterface[i] = fmt.Sprintf(\"%v\", item)\n\t\t\t}\n\t\tcase string:\n\t\t\t// zero-value padding from omitted JS arguments (see keys above)\n\t\t\tif v != \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"args must be []string or []interface{}, got string\")\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"args must be []string or []interface{}, got %T\", args)\n\t\t}\n\t}\n\n\t// Execute the Lua script with keys and args\n\tinfoCmd := client.Eval(ctx, script, keysSlice, argsInterface...)\n\n\tif infoCmd.Err() != nil {\n\t\treturn \"\", infoCmd.Err()\n\t}\n\n\treturn infoCmd.Val(), nil\n}\n","sourceCodeStart":230,"sourceCodeEnd":264,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/redis/redis.go#L230-L264","documentation":"Error \"args must be []string or []interface{}, got string\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/js/libs/redis/redis.go:248 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}