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
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.
Directly related (12)
Swift: Could not cast value of type 'X' to 'Y'
A force cast (as!) failed because the object isn’t the expected type.
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).
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.
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.
Error Domain=NSCocoaErrorDomain Code=3840 "Unable to parse empty data." / dataCorrupted
JSONDecoder got empty, HTML or malformed data.
Fatal error: Index out of range
Mutating an array while looping over indices.
Thread 1: Fatal error: Arithmetic operation '255 + 1' (on type 'UInt8') results in an overflow
Swift traps on integer overflow instead of wrapping.
com.airbnb.lottie.LottieAnimationView: Unable to parse composition: java.lang.IllegalStateException: Unable to find lottie json
Lottie couldn't read the animation file.
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.
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 key: 'id'
Creating a dictionary with duplicate keys traps.
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)
Fatal error: Unexpectedly found nil while unwrapping an Optional value
Swift force-unwrapped (`!`) an optional that was nil, crashing the app.
Illegal instruction (core dumped) (SIGILL)
The program used a CPU instruction your processor doesn’t support — typically AVX/AVX2 in prebuilt binaries (TensorFlow, MongoDB…
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…
Dart: Bad state: No element — .first, .last or .single on an empty list
You called `.first`, `.last`, `.single` or `.reduce` on an empty collection.
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.
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.
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.
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`.
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.
Dart/Flutter: Null check operator used on a null value
The ! operator was applied to a variable that was null at runtime.
Dart: LateInitializationError: Field 'controller' has not been initialized
A `late` variable was read before it was assigned.
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 downloaded: https://cdn.cocoapods.org/...
CocoaPods couldn’t reach its CDN spec repo — network/proxy issues, rate limiting, or an outdated CocoaPods.
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…
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…
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.
Swift: 'X' is only available in iOS 16.0 or newer
You used an API that requires a newer iOS than your deployment target.
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.
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.
Fatal error: String index is out of bounds
Accessing a character past the end of a string.
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.
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…
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.
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.
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.
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.
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…
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.
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.
java.text.ParseException: Unparseable date: "x"
SimpleDateFormat couldn’t parse the string with its pattern.
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.
Crashlytics: Missing dSYM — upload dSYMs to see readable stack traces
Crash logs show addresses because dSYMs weren't uploaded.
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.
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.
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.