{
  "id": "python/aiohttp-clientconnector-ssl-certificate-verify-failed",
  "signature": "aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host example.com:443 ssl:True [SSLCertVerificationError: certificate verify failed: unable to get local issuer certificate]",
  "signature_zh": "aiohttp.client_exceptions.ClientConnectorCertificateError: 无法连接到主机 example.com:443 ssl:True [SSLCertVerificationError: 证书验证失败：无法获取本地颁发者证书]",
  "regex": "aiohttp\\.client_exceptions\\.ClientConnectorCertificateError:\\ Cannot\\ connect\\ to\\ host\\ example\\.com:443\\ ssl:True\\ \\[SSLCertVerificationError:\\ certificate\\ verify\\ failed:\\ unable\\ to\\ get\\ local\\ issuer\\ certificate\\]",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The system CA bundle is missing or outdated, so aiohttp's default SSL context cannot verify the server's certificate chain.",
  "root_cause_type": "generic",
  "root_cause_zh": "系统 CA 证书包缺失或过时，导致 aiohttp 默认的 SSL 上下文无法验证服务器证书链。",
  "versions": [
    {
      "version": "3.8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disables all TLS verification, exposes to MITM and is rejected by many servers; masks the real CA problem.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "aiohttp uses its own default context, which on some platforms ignores certifi unless explicitly passed via ssl context.",
      "fail_rate": 0.55,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "import ssl, certifi, aiohttp\nctx = ssl.create_default_context(cafile=certifi.where())\nasync with aiohttp.ClientSession(connector=aiohttp.TCPConnector(ssl=ctx)) as s:\n    await s.get('https://example.com')",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "sudo apt-get install --reinstall ca-certificates && sudo update-ca-certificates",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}