{"record":{"id":"0c959976fb8e9527","repo":"projectdiscovery/nuclei","slug":"unresolved-variables-with-values-found-s","errorCode":null,"errorMessage":"unresolved variables with values found: %s","messagePattern":"unresolved variables with values found: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/common/expressions/variables.go","lineNumber":112,"sourceCode":"\t\t\t}\n\t\t\tmatchName := match[1]\n\t\t\t// Skip if the match is an expression\n\t\t\tif numericalExpressionRegex.MatchString(matchName) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// or if it contains only literals (can be solved from expression engine)\n\t\t\tif hasLiteralsOnly(match[1]) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif _, ok := skipNames[matchName]; ok {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tunresolvedVariables = append(unresolvedVariables, matchName)\n\t\t}\n\t}\n\n\tif len(unresolvedVariables) > 0 {\n\t\treturn errors.New(\"unresolved variables with values found: \" + strings.Join(unresolvedVariables, \",\"))\n\t}\n\n\treturn nil\n}\n\nfunc hasLiteralsOnly(data string) bool {\n\texpr, err := govaluate.NewEvaluableExpressionWithFunctions(data, dsl.HelperFunctions)\n\tif err != nil {\n\t\treturn false\n\t}\n\n\tif expr == nil {\n\t\treturn true\n\t}\n\n\treturn len(expr.Vars()) == 0\n}\n","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/common/expressions/variables.go#L94-L130","documentation":"Raised by ContainsVariablesWithNames (variables.go:112), the stricter sibling of the unresolved-variable checker. It checks only for {{markers}} whose names appear in the provided names map (minus an explicit skipNames exemption) and errors with 'unresolved variables with values found: x,y' when any of those named variables are still unresolved in the given items. It is used where the caller knows exactly which variables must be substituted.","triggerScenarios":"A protocol engine passes a values map (e.g. extracted or payload values) plus request strings; one of the mapped names, say {{baseURL}}, still appears verbatim in a raw request because its value was never merged in.","commonSituations":"A flow step fails to run before the request is built; an extractor returned empty so the value never entered the map; SDK users call the request builder without supplying all declared dynamic values.","solutions":["Ensure every named variable in the map has a concrete value before building the final request","Order flow/extract steps so dependencies resolve before the consuming request","If a marker may legitimately remain, route it through the skipNames mechanism the API exposes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if err := expressions.ContainsVariablesWithNames(valuesMap, raw1, raw2); err != nil {\n    // populate missing keys before building final requests\n}","typeGuard":"func hasUnresolvedNamedVariables(err error) bool { return strings.HasPrefix(err.Error(), \"unresolved variables with values found:\") }","tryCatchPattern":"err := expressions.ContainsVariablesWithNames(names, items...)\nif err != nil { missing := strings.Split(strings.TrimPrefix(err.Error(), \"unresolved variables with values found: \"), \",\") /* fill or skip */ }","preventionTips":["Ensure flow/extract steps complete before dependent requests","Pass only names you can guarantee values for","Use the skip set for markers that intentionally stay literal"],"tags":["template","variables","request-building","validation"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}