# Unhandled exception: IsolateSpawnException: Failed to deserialize message: type 'List<dynamic>' is not a subtype of type 'List<String>' in type cast

- **ID:** `flutter/deserialize-list-subtype-error`
- **Domain:** flutter
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 92%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Flutter 3.10.0 | active | — | — |
| Flutter 3.16.0 | active | — | — |
| Flutter 3.22.0 | active | — | — |

## Workarounds

1. **Explicitly cast the list to the expected type before sending: `isolate.send(list.cast<String>())`.** (95% success)
   ```
   Explicitly cast the list to the expected type before sending: `isolate.send(list.cast<String>())`.
   ```
2. **Define the list with explicit type annotations: `List<String> myList = ['a', 'b'];` and then send it.** (90% success)
   ```
   Define the list with explicit type annotations: `List<String> myList = ['a', 'b'];` and then send it.
   ```
3. **Use a custom class to wrap the data and ensure proper serialization: `class MyData { final List<String> items; MyData(this.items); }`.** (85% success)
   ```
   Use a custom class to wrap the data and ensure proper serialization: `class MyData { final List<String> items; MyData(this.items); }`.
   ```

## Dead Ends

- **** — This only creates a new List<dynamic>; the receiving side still needs a typed list. (65% fail)
- **** — While this works, it adds overhead and is unnecessary; the proper fix is to type the list correctly. (50% fail)
- **** — This avoids the immediate error but may cause other type issues later. (70% fail)
