{
  "id": "flutter/install-error-pub-get-failed-socket",
  "signature": "Pub get failed (server unavailable) -- Could not resolve packages due to socket exception: OS Error: Connection refused",
  "signature_zh": "Pub get 失败（服务器不可用）-- 由于套接字异常无法解析包：OS 错误：连接被拒绝",
  "regex": "Pub get failed.*socket exception.*Connection refused",
  "domain": "flutter",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The pub.dev server or a custom package repository is unreachable due to network issues, firewall blocking, or DNS resolution failure.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于网络问题、防火墙阻止或 DNS 解析失败，pub.dev 服务器或自定义包仓库无法访问。",
  "versions": [
    {
      "version": "flutter 3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "flutter 3.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "dart 3.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "dart 3.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Repeatedly running 'flutter pub get' without any network changes",
      "why_fails": "The underlying network issue persists; retrying does not resolve connectivity problems.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Deleting the pubspec.lock file and running pub get again",
      "why_fails": "The lock file is not the cause; the error is network-related, so deletion has no effect.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check network connectivity and ensure pub.dev is accessible. Temporarily disable VPN or firewall, then run 'flutter pub get --offline' if dependencies are already cached, or use a mirror like 'dart pub get --no-precompile' with PUB_HOSTED_URL set to a mirror.",
      "success_rate": 0.85,
      "how": "Check network connectivity and ensure pub.dev is accessible. Temporarily disable VPN or firewall, then run 'flutter pub get --offline' if dependencies are already cached, or use a mirror like 'dart pub get --no-precompile' with PUB_HOSTED_URL set to a mirror.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a different DNS server (e.g., Google DNS 8.8.8.8) or add an exception for pub.dev in the firewall/proxy settings.",
      "success_rate": 0.8,
      "how": "Use a different DNS server (e.g., Google DNS 8.8.8.8) or add an exception for pub.dev in the firewall/proxy settings.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "检查网络连接并确保 pub.dev 可访问。临时禁用 VPN 或防火墙，然后运行 'flutter pub get --offline'（如果依赖已缓存），或使用镜像，设置 PUB_HOSTED_URL 为镜像地址。",
    "使用不同的 DNS 服务器（例如 Google DNS 8.8.8.8）或在防火墙/代理设置中添加 pub.dev 的例外。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://dart.dev/tools/pub/troubleshoot",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2024-01-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}