tonhowtf/omniget · error
no cookies in payload match domain
Error message
no cookies in payload match domain {root} What it means
After computing the root domain, ingest_to_account() filters the incoming cookies to those whose own domain maps to the same root. If none match, it bails with 'no cookies in payload match domain {root}' rather than creating an empty bucket.
Solutions
- Ensure every cookie's domain shares the target root, e.g. cookies for '.bilibili.com' when ingesting to 'bilibili.com'.
- Check that the import parser did not mangle cookie domains (empty or wrong Domain field).
- Verify you exported cookies from the same site you're ingesting into.
Example fix
// before
let cookies: Vec<ExtensionCookie> = all_cookies; // mixed domains
ingest_to_account(root, "bilibili.com", slug, &cookies, src)?;
// after
let scoped: Vec<ExtensionCookie> = all_cookies.into_iter().filter(|c| c.domain.ends_with("bilibili.com")).collect();
anyhow::ensure!(!scoped.is_empty(), "no bilibili cookies in payload");
ingest_to_account(root, "bilibili.com", slug, &scoped, src)?; Defensive patterns
Strategy: validation
Validate before calling
let root = storage::root_domain_of(domain);
anyhow::ensure!(cookies.iter().any(|c| storage::root_domain_of(&c.domain) == root), "no cookies match {root}"); Try / catch
match ingest_to_account(root, domain, slug, &cookies, src) {
Err(e) if e.to_string().contains("no cookies in payload match") => warn_wrong_site_export(),
other => other,
} Prevention
- Export cookies from the same site you ingest into
- Verify cookie Domain attributes weren't stripped by the parser
- Log root domains of both sides when imports fail
When it happens
Trigger: Calling ingest_to_account(domain="bilibili.com") with cookies whose c.domain belongs to a different root (e.g. '.example.com'), or with an empty cookie list.
Common situations: Copying cookies from the wrong site; mixing cookies for several domains in one payload; header-pair imports that omitted a Domain attribute and got scoped to an unexpected root.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Target domain is required for Cookie header import.
- invalid domain
- bucket not found
- empty stream url
- No valid cookies found in file (expected Netscape format)
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/7c2285f312f57faa.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/cookies/storage.rs:409
}
pub fn ingest_to_account(
domain: &str,
requested_slug: &str,
cookies: &[ExtensionCookie],
source: IngestSource,
) -> anyhow::Result<(String, usize)> {
let root = root_domain_of(domain);
if root.is_empty() {
anyhow::bail!("invalid domain: {domain}");
}
let scoped: Vec<ExtensionCookie> = cookies
.iter()
.filter(|c| root_domain_of(&c.domain) == root)
.cloned()
.collect();
if scoped.is_empty() {
anyhow::bail!("no cookies in payload match domain {root}");
}
let mut registry = load_registry();
let bucket = registry.buckets.entry(root.clone()).or_insert_with(|| {
let platform = PlatformKind::from_domain(&root);
BucketEntry {
platform_kind: platform.as_str().to_string(),
accounts: Vec::new(),
}
});
let mut slug = if requested_slug.trim().is_empty() {
slugify_alias(source.alias_hint.as_deref().unwrap_or(""))
} else {
slugify_alias(requested_slug)
};
if slug == DEFAULT_SLUG {
slug = format!("{}-extra", DEFAULT_SLUG.trim_start_matches('_'));View on GitHub (pinned to 8600b91f42)