projectdiscovery/nuclei · error

args must be []string or []interface{}, got string

Error message

args must be []string or []interface{}, got string

What it means

Error "args must be []string or []interface{}, got string" thrown in projectdiscovery/nuclei.

Source

Thrown at pkg/js/libs/redis/redis.go:248

	// are stringified rather than dropped: Redis ARGV values are always
	// bulk strings on the Lua side, so "123"/"true" match JS expectations.
	argsInterface := []interface{}{}
	if args != nil {
		switch v := args.(type) {
		case []string:
			argsInterface = make([]interface{}, len(v))
			for i, arg := range v {
				argsInterface[i] = arg
			}
		case []interface{}:
			argsInterface = make([]interface{}, len(v))
			for i, item := range v {
				argsInterface[i] = fmt.Sprintf("%v", item)
			}
		case string:
			// zero-value padding from omitted JS arguments (see keys above)
			if v != "" {
				return nil, fmt.Errorf("args must be []string or []interface{}, got string")
			}
		default:
			return nil, fmt.Errorf("args must be []string or []interface{}, got %T", args)
		}
	}

	// Execute the Lua script with keys and args
	infoCmd := client.Eval(ctx, script, keysSlice, argsInterface...)

	if infoCmd.Err() != nil {
		return "", infoCmd.Err()
	}

	return infoCmd.Val(), nil
}

View on GitHub (pinned to 265b3a3dec)

When it happens

Trigger: Thrown at pkg/js/libs/redis/redis.go:248 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/6f2b39235efa16f6. Report an issue: GitHub.