{"record":{"id":"5230579a7ea54112","repo":"vectordotdev/vector","slug":"no-ability-to-glob","errorCode":null,"errorMessage":"No ability to glob","messagePattern":"No ability to glob","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config/loading/mod.rs","lineNumber":104,"sourceCode":"        .into_iter()\n        .flat_map(|(paths, format)| paths.iter().cloned().map(move |path| (path, format)))\n}\n\n/// Expand a list of paths (potentially containing glob patterns) into real\n/// config paths, replacing it with the default paths when empty.\npub fn process_paths(config_paths: &[ConfigPath]) -> Option<Vec<ConfigPath>> {\n    let starting_paths = if !config_paths.is_empty() {\n        config_paths.to_owned()\n    } else {\n        default_config_paths()\n    };\n\n    let mut paths = Vec::new();\n\n    for config_path in &starting_paths {\n        let config_pattern: &PathBuf = config_path.into();\n\n        let matches: Vec<PathBuf> = match glob(config_pattern.to_str().expect(\"No ability to glob\"))\n        {\n            Ok(glob_paths) => glob_paths.filter_map(Result::ok).collect(),\n            Err(err) => {\n                error!(message = \"Failed to read glob pattern.\", path = ?config_pattern, error = ?err);\n                return None;\n            }\n        };\n\n        if matches.is_empty() {\n            error!(message = \"Config file not found in path.\", path = ?config_pattern, internal_log_rate_limit = false);\n            std::process::exit(exitcode::CONFIG);\n        }\n\n        match config_path {\n            ConfigPath::File(_, format) => {\n                for path in matches {\n                    paths.push(ConfigPath::File(path, *format));\n                }","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/vectordotdev/vector/blob/3708c39b12a93212ed8b8d7510b4cc7769cb5864/src/config/loading/mod.rs#L86-L122","documentation":"config::process_paths (src/config/loading/mod.rs) converts each config path to a &str for glob() with config_pattern.to_str().expect(\"No ability to glob\"). Path::to_str() returns None when the path contains bytes that are not valid UTF-8 (possible on Unix) or invalid Unicode (Windows), so passing Vector a config path with non-UTF-8 bytes makes path processing panic during startup.","triggerScenarios":"Running vector -c <path> (or VECTOR_CONFIG env / default discovery) where <path> contains non-UTF-8 bytes — e.g. a directory named with Latin-1/invalid bytes from an old archive, or a shell variable carrying raw bytes ($'\\xff'-style) passed as the config path. to_str() yields None and the expect panics before any config is read.","commonSituations":"Configs unpacked from legacy archives with mangled filenames; scripts passing byte-corrupted variables as paths; systems where filenames were created with a different locale/encoding than the current one.","solutions":["Rename the config file/directory to a valid UTF-8 name: mv $'bad\\xffname' bad-name && vector -c ./bad-name/vector.yaml","Check the bytes of the path you are actually passing: printf '%s' \"$CONFIG_PATH\" | xxd — look for unexpected high bytes","Ensure shell scripts and env vars (VECTOR_CONFIG) are set from UTF-8 sources and not byte-mangled by tools like ssh or containers"],"exampleFix":"# before\nvector --config $'/etc/vector/conf\\xff/vector.yaml'\n\n# after\nmv $'/etc/vector/conf\\xff' /etc/vector/conf_fixed\nvector --config /etc/vector/conf_fixed/vector.yaml","handlingStrategy":"validation","validationCode":"// Before passing paths to Vector, confirm they are UTF-8\nfor p in &config_paths {\n    if p.to_str().is_none() {\n        return Err(format!(\"config path is not valid UTF-8: {:?}\", p));\n    }\n}","typeGuard":"fn path_is_utf8(p: &std::path::Path) -> bool {\n    p.to_str().is_some()\n}","tryCatchPattern":null,"preventionTips":["Inspect suspect paths with printf '%s' \"$p\" | xxd before using them","Rename files extracted from legacy archives to clean UTF-8 names","Avoid passing byte-opaque shell variables as config paths"],"tags":["vector","config","paths","utf-8","filesystem","startup","panic"],"backgroundTag":"invalid-path-encoding","analyzedSha":"3708c39b12a93212ed8b8d7510b4cc7769cb5864","analyzedAt":"2026-08-20T07:02:18.786Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T20:17:18.057Z"}