{
  "id": "flutter/deserialize-list-subtype-error",
  "signature": "Unhandled exception: IsolateSpawnException: Failed to deserialize message: type 'List<dynamic>' is not a subtype of type 'List<String>' in type cast",
  "signature_zh": "未处理的异常：IsolateSpawnException: 反序列化消息失败：类型'List<dynamic>'不是类型'List<String>'的子类型",
  "regex": "IsolateSpawnException: Failed to deserialize message: type 'List<dynamic>' is not a subtype of type 'List<\\w+>' in type cast",
  "domain": "flutter",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "When spawning an isolate, the message sent contains a List without explicit type information, and the receiving isolate expects a typed list (e.g., `List<String>`), causing a type cast failure during deserialization.",
  "root_cause_type": "generic",
  "root_cause_zh": "在生成隔离时，发送的消息包含没有显式类型信息的List，而接收隔离期望一个类型化列表（例如`List<String>`），导致反序列化期间的类型转换失败。",
  "versions": [
    {
      "version": "Flutter 3.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Flutter 3.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Flutter 3.22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This only creates a new List<dynamic>; the receiving side still needs a typed list.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "While this works, it adds overhead and is unnecessary; the proper fix is to type the list correctly.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This avoids the immediate error but may cause other type issues later.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Explicitly cast the list to the expected type before sending: `isolate.send(list.cast<String>())`.",
      "success_rate": 0.95,
      "how": "Explicitly cast the list to the expected type before sending: `isolate.send(list.cast<String>())`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Define the list with explicit type annotations: `List<String> myList = ['a', 'b'];` and then send it.",
      "success_rate": 0.9,
      "how": "Define the list with explicit type annotations: `List<String> myList = ['a', 'b'];` and then send it.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a custom class to wrap the data and ensure proper serialization: `class MyData { final List<String> items; MyData(this.items); }`.",
      "success_rate": 0.85,
      "how": "Use a custom class to wrap the data and ensure proper serialization: `class MyData { final List<String> items; MyData(this.items); }`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Explicitly cast the list to the expected type before sending: `isolate.send(list.cast<String>())`.",
    "Define the list with explicit type annotations: `List<String> myList = ['a', 'b'];` and then send it.",
    "Use a custom class to wrap the data and ensure proper serialization: `class MyData { final List<String> items; MyData(this.items); }`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://api.flutter.dev/flutter/dart-isolate/Isolate/spawn.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2024-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}