Error map

Could not cast value of type 'X' to 'Y' (as!) Fatal error: Could not cast value of type '__NSDictionaryM' (0x1f) to 'NSArray' (0x1e)

iOS · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

Could not cast value of type 'X' to 'Y' (as!) — Fatal error: Could not cast value of type '__NSDictionaryM' (0x1f) to 'NSArray' (0x1e) (iOS)Could not c…Could not cast value of type — Swift: Could not cast value of type 'X' to 'Y' (iOS)Could not cast valu…type '_InternalLinkedHashMap' is not a subtype of type 'List<dynamic>' — Dart: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast (Flutter / Dart)type '_InternalLink…FormatException: Unexpected character — Dart: FormatException: Unexpected character (at character 1) <!DOCTYPE html> — jsonDecode of an HTML page (Flutter / Dart)FormatException: Un…type 'Null' is not a subtype of type 'String' — Dart: type 'Null' is not a subtype of type 'String' in type cast (Flutter / Dart)type 'Null' is not …DecodingError.dataCorrupted: The given data was not valid JSON — Error Domain=NSCocoaErrorDomain Code=3840 "Unable to parse empty data." / dataCorrupted (iOS)DecodingError.dataC…Swift: Fatal error: Array index is out of range (mutating while iterating) — Fatal error: Index out of range (iOS)Swift: Fatal error:…EXC_BAD_INSTRUCTION: Fatal error arithmetic overflow — Thread 1: Fatal error: Arithmetic operation '255 + 1' (on type 'UInt8') results in an overflow (iOS)EXC_BAD_INSTRUCTION…Lottie: Unable to parse composition — com.airbnb.lottie.LottieAnimationView: Unable to parse composition: java.lang.IllegalStateException: Unable to find lottie json (Android)Lottie: Unable to p…ClassCastException: cannot be cast to android.widget — java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView (Android)ClassCastException:…MissingFieldException: Field 'x' is required — kotlinx.serialization.MissingFieldException: Field 'id' is required for type with serial name 'com.example.User', but it was missing (Android)MissingFieldExcepti…Fatal error: Duplicate values for key — Fatal error: Duplicate values for key: 'id' (iOS)Fatal error: Duplic…Gson: Unable to invoke no-args constructor — java.lang.RuntimeException: Unable to invoke no-args constructor for interface com.example.Item. Registering an InstanceCreator with Gson for this type may fix this problem. (Android)Gson: Unable to inv…Unexpectedly found nil — Fatal error: Unexpectedly found nil while unwrapping an Optional value (iOS)Unexpectedly found …Illegal instruction — Illegal instruction (core dumped) (SIGILL) (Linux)Illegal instruction0xC0000142 — The application was unable to start correctly (0xc0000142) (Windows)0xC0000142Bad state: No element — Dart: Bad state: No element — .first, .last or .single on an empty list (Flutter / Dart)Bad state: No eleme…Error: Couldn't resolve the package — Dart: Error: Couldn't resolve the package 'x' in 'package:x/x.dart' (Flutter / Dart)Error: Couldn't res…The argument type can't be assigned to the parameter type — Dart: The argument type 'String?' can't be assigned to the parameter type 'String' (Flutter / Dart)The argument type c…SocketException: Failed host lookup — Flutter: Unhandled Exception: SocketException: Failed host lookup: 'api.example.com' (OS Error: No address associated with hostname, errno = 7) (Flutter / Dart)SocketException: Fa…RangeError (index): Invalid value — Dart: RangeError (index): Invalid value: Valid value range is empty: 0 (Flutter / Dart)RangeError (index):…Cleartext HTTP traffic not permitted — Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted (Flutter / Dart)Cleartext HTTP traf…Null check operator used on a null value — Dart/Flutter: Null check operator used on a null value (Flutter / Dart)Null check operator…LateInitializationError: Field has not been initialized — Dart: LateInitializationError: Field 'controller' has not been initialized (Flutter / Dart)LateInitializationE…Non-nullable instance field must be initialized — Dart: Non-nullable instance field 'name' must be initialized. Try adding an initializer expression, or a generative constructor that initializes it, or mark it 'late' (Flutter / Dart)Non-nullable instan…CDN: trunk URL couldn't be downloaded — [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/... (iOS)CDN: trunk URL coul…NSURLErrorDomain Code=-1001 — Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." (iOS)NSURLErrorDomain Co…DecodingError — Swift DecodingError: keyNotFound / typeMismatch / valueNotFound / dataCorrupted (iOS)DecodingErrorIndex out of range — Swift: Fatal error: Index out of range (iOS)Index out of rangeis only available in iOS x or newer — Swift: 'X' is only available in iOS 16.0 or newer (iOS)is only available i…Cannot convert value of type — Swift: Cannot convert value of type 'X' to expected argument type 'Y' (iOS)Cannot convert valu…Core Data: NSManagedObjectContext was accessed from the wrong queue — CoreData: error: Serious application error. Exception was caught during Core Data change processing (iOS)Core Data: NSManage…String index is out of bounds — Fatal error: String index is out of bounds (iOS)String index is out…AVAudioEngine: required condition is false: format.sampleRate == hwFormat.sampleRate — Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate' (iOS)AVAudioEngine: requ…Resources$NotFoundException — android.content.res.Resources$NotFoundException: Resource ID #0x7f... (Android)Resources$NotFoundE…There are multiple heroes that share the same tag — Flutter: There are multiple heroes that share the same tag within a subtree (Flutter / Dart)There are multiple …A Ticker was active when the State was disposed — Flutter: _HomeState#abc(ticker active) was disposed with an active Ticker. State.dispose() implementations must call dispose() on all their AnimationControllers (Flutter / Dart)A Ticker was active…measured with an infinity maximum height — Jetpack Compose: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed (Android)measured with an in…A RenderFlex overflowed — Flutter: A RenderFlex overflowed by x pixels on the right/bottom (Flutter / Dart)A RenderFlex overfl…RenderBox was not laid out — Flutter: RenderBox was not laid out: RenderFlex#a1b2c relayoutBoundary=up2 NEEDS-PAINT — Failed assertion: 'hasSize' (Flutter / Dart)RenderBox was not l…NumberFormatException — java.lang.NumberFormatException: For input string: "x" (Java)NumberFormatExcepti…DateTimeParseException — java.time.format.DateTimeParseException: Text '31/12/2024' could not be parsed at index 2 (Java)DateTimeParseExcept…Unparseable date — java.text.ParseException: Unparseable date: "x" (Java)Unparseable dateForEach: the ID occurs multiple times — ForEach<Array<Item>, String, Text>: the ID abc occurs multiple times within the collection, this will give undefined results! (iOS)ForEach: the ID occ…Crash report not symbolicated (missing dSYM) — Crashlytics: Missing dSYM — upload dSYMs to see readable stack traces (iOS)Crash report not sy…ClassNotFoundException only in release — java.lang.ClassNotFoundException: Didn't find class "com.example.Model" on path: DexPathList (Android)ClassNotFoundExcept…Fragment$InstantiationException: could not find Fragment constructor — androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.DetailFragment: could not find Fragment constructor (Android)Fragment$Instantiat…Retrofit: Unable to create converter for class — java.lang.IllegalArgumentException: Unable to create converter for class com.example.User for method Api.getUser (Android)Retrofit: Unable to…

Directly related (12)

Could not cast value of typeiOS

Swift: Could not cast value of type 'X' to 'Y'

A force cast (as!) failed because the object isn’t the expected type.

type '_InternalLinkedHashMap' is not a subtype of type 'List<dynamic>'Flutter / Dart

Dart: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast

JSON decoded to a Map but your code expected a List (or the other way round).

FormatException: Unexpected characterFlutter / Dart

Dart: FormatException: Unexpected character (at character 1) <!DOCTYPE html> — jsonDecode of an HTML page

`jsonDecode` received something that is not JSON, commonly an HTML error page, an empty string, or a plain-text message.

type 'Null' is not a subtype of type 'String'Flutter / Dart

Dart: type 'Null' is not a subtype of type 'String' in type cast

A value that was `null` at runtime was cast or used as a non-nullable type, most often when parsing JSON.

DecodingError.dataCorrupted: The given data was not valid JSONiOS

Error Domain=NSCocoaErrorDomain Code=3840 "Unable to parse empty data." / dataCorrupted

JSONDecoder got empty, HTML or malformed data.

Swift: Fatal error: Array index is out of range (mutating while iterating)iOS

Fatal error: Index out of range

Mutating an array while looping over indices.

EXC_BAD_INSTRUCTION: Fatal error arithmetic overflowiOS

Thread 1: Fatal error: Arithmetic operation '255 + 1' (on type 'UInt8') results in an overflow

Swift traps on integer overflow instead of wrapping.

Lottie: Unable to parse compositionAndroid

com.airbnb.lottie.LottieAnimationView: Unable to parse composition: java.lang.IllegalStateException: Unable to find lottie json

Lottie couldn't read the animation file.

ClassCastException: cannot be cast to android.widgetAndroid

java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView

A view id in the layout is a different widget type than the one the code expects.

MissingFieldException: Field 'x' is requiredAndroid

kotlinx.serialization.MissingFieldException: Field 'id' is required for type with serial name 'com.example.User', but it was missing

A required property wasn't present in the JSON being decoded.

Fatal error: Duplicate values for keyiOS

Fatal error: Duplicate values for key: 'id'

Creating a dictionary with duplicate keys traps.

Gson: Unable to invoke no-args constructorAndroid

java.lang.RuntimeException: Unable to invoke no-args constructor for interface com.example.Item. Registering an InstanceCreator with Gson for this type may fix this problem.

Gson can't instantiate an interface or abstract type.

Two steps away (35)

Unexpectedly found niliOS

Fatal error: Unexpectedly found nil while unwrapping an Optional value

Swift force-unwrapped (`!`) an optional that was nil, crashing the app.

Illegal instructionLinux

Illegal instruction (core dumped) (SIGILL)

The program used a CPU instruction your processor doesn’t support — typically AVX/AVX2 in prebuilt binaries (TensorFlow, MongoDB…

0xC0000142Windows

The application was unable to start correctly (0xc0000142)

A DLL the program loads failed to initialise — often after an update, with corrupt runtimes, or when a desktop heap/session limit…

Bad state: No elementFlutter / Dart

Dart: Bad state: No element — .first, .last or .single on an empty list

You called `.first`, `.last`, `.single` or `.reduce` on an empty collection.

Error: Couldn't resolve the packageFlutter / Dart

Dart: Error: Couldn't resolve the package 'x' in 'package:x/x.dart'

Code imports a package that is not in `pubspec.yaml` or `pub get` has not been run since adding it.

The argument type can't be assigned to the parameter typeFlutter / Dart

Dart: The argument type 'String?' can't be assigned to the parameter type 'String'

You passed a value whose type does not match what the function parameter requires.

SocketException: Failed host lookupFlutter / Dart

Flutter: Unhandled Exception: SocketException: Failed host lookup: 'api.example.com' (OS Error: No address associated with hostname, errno = 7)

The app could not resolve or reach the server: no internet, wrong host name, DNS failure, or missing network permission.

RangeError (index): Invalid valueFlutter / Dart

Dart: RangeError (index): Invalid value: Valid value range is empty: 0

A list or string was indexed outside its bounds, often an empty list or an off-by-one in `itemBuilder`.

Cleartext HTTP traffic not permittedFlutter / Dart

Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted

Android 9+ blocks plain `http://` requests by default; the app must use HTTPS or explicitly allow cleartext for that host.

Null check operator used on a null valueFlutter / Dart

Dart/Flutter: Null check operator used on a null value

The ! operator was applied to a variable that was null at runtime.

LateInitializationError: Field has not been initializedFlutter / Dart

Dart: LateInitializationError: Field 'controller' has not been initialized

A `late` variable was read before it was assigned.

Non-nullable instance field must be initializedFlutter / Dart

Dart: Non-nullable instance field 'name' must be initialized. Try adding an initializer expression, or a generative constructor that initializes it, or mark it 'late'

With null safety every non-nullable field needs a value by the end of construction.

CDN: trunk URL couldn't be downloadediOS

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/...

CocoaPods couldn’t reach its CDN spec repo — network/proxy issues, rate limiting, or an outdated CocoaPods.

NSURLErrorDomain Code=-1001iOS

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."

The server didn’t respond within URLSession’s timeout (60 s default) — slow server, unreachable host on this network, or a stalle…

DecodingErroriOS

Swift DecodingError: keyNotFound / typeMismatch / valueNotFound / dataCorrupted

JSONDecoder couldn’t map the JSON to your Codable type — a key is missing, a value has a different type or is null, or the data i…

Index out of rangeiOS

Swift: Fatal error: Index out of range

Code accessed an array index that doesn’t exist — empty arrays, off-by-one loops, or data changing while a table reloads.

is only available in iOS x or neweriOS

Swift: 'X' is only available in iOS 16.0 or newer

You used an API that requires a newer iOS than your deployment target.

Cannot convert value of typeiOS

Swift: Cannot convert value of type 'X' to expected argument type 'Y'

The value’s type doesn’t match what the function or property expects.

Core Data: NSManagedObjectContext was accessed from the wrong queueiOS

CoreData: error: Serious application error. Exception was caught during Core Data change processing

A managed object or context was used on a different thread than it belongs to.

String index is out of boundsiOS

Fatal error: String index is out of bounds

Accessing a character past the end of a string.

AVAudioEngine: required condition is false: format.sampleRate == hwFormat.sampleRateiOS

Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate'

An audio tap or node format doesn't match the hardware format.

Resources$NotFoundExceptionAndroid

android.content.res.Resources$NotFoundException: Resource ID #0x7f...

Code asked for a resource ID that doesn’t exist for the current configuration — often passing an int to setText(), or a resource…

There are multiple heroes that share the same tagFlutter / Dart

Flutter: There are multiple heroes that share the same tag within a subtree

Two `Hero` widgets with the same tag exist on one screen during a route transition.

A Ticker was active when the State was disposedFlutter / Dart

Flutter: _HomeState#abc(ticker active) was disposed with an active Ticker. State.dispose() implementations must call dispose() on all their AnimationControllers

An `AnimationController` was still running when its `State` was disposed, because `dispose()` did not release it.

measured with an infinity maximum heightAndroid

Jetpack Compose: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed

A LazyColumn (or verticalScroll) is placed inside another vertically scrolling container, so it gets infinite height.

A RenderFlex overflowedFlutter / Dart

Flutter: A RenderFlex overflowed by x pixels on the right/bottom

A Row or Column’s children need more space than available, so Flutter draws the yellow-black overflow stripes.

RenderBox was not laid outFlutter / Dart

Flutter: RenderBox was not laid out: RenderFlex#a1b2c relayoutBoundary=up2 NEEDS-PAINT — Failed assertion: 'hasSize'

A widget was asked for its size or painted before layout finished, usually because a parent gave it unbounded or conflicting cons…

NumberFormatExceptionJava

java.lang.NumberFormatException: For input string: "x"

A string couldn’t be parsed as a number — it’s empty, has spaces/commas, is too large, or isn’t numeric.

DateTimeParseExceptionJava

java.time.format.DateTimeParseException: Text '31/12/2024' could not be parsed at index 2

A java.time parse call got text that doesn’t match the expected format.

Unparseable dateJava

java.text.ParseException: Unparseable date: "x"

SimpleDateFormat couldn’t parse the string with its pattern.

ForEach: the ID occurs multiple timesiOS

ForEach<Array<Item>, String, Text>: the ID abc occurs multiple times within the collection, this will give undefined results!

ForEach items share the same id.

Crash report not symbolicated (missing dSYM)iOS

Crashlytics: Missing dSYM — upload dSYMs to see readable stack traces

Crash logs show addresses because dSYMs weren't uploaded.

ClassNotFoundException only in releaseAndroid

java.lang.ClassNotFoundException: Didn't find class "com.example.Model" on path: DexPathList

A class is stripped or renamed by R8 in the release build but still used by reflection.

Fragment$InstantiationException: could not find Fragment constructorAndroid

androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.DetailFragment: could not find Fragment constructor

The system can't recreate a fragment because it has no public no-argument constructor.

Retrofit: Unable to create converter for classAndroid

java.lang.IllegalArgumentException: Unable to create converter for class com.example.User for method Api.getUser

Retrofit has no converter that can handle the response type.