Error map

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

Flutter / Dart · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (11). 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.

FormatException: Unexpected character — Dart: FormatException: Unexpected character (at character 1) <!DOCTYPE html> — jsonDecode of an HTML page (Flutter / Dart)FormatExcep…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…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…Cleartext HTTP traffic not permitted — Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted (Flutter / Dart)Cleartext HTTP traf…Bad state: No element — Dart: Bad state: No element — .first, .last or .single on an empty list (Flutter / Dart)Bad state: No eleme…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 …RangeError (index): Invalid value — Dart: RangeError (index): Invalid value: Valid value range is empty: 0 (Flutter / Dart)RangeError (index):…Bad state: Stream has already been listened to — Dart: Bad state: Stream has already been listened to (Flutter / Dart)Bad state: Stream h…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 getter/method isn't defined for the type — Dart: The getter 'name' isn't defined for the type 'User' / The method 'foo' isn't defined for the class (Flutter / Dart)The getter/method i…Illegal argument in isolate message: object is unsendable — Dart: Invalid argument(s): Illegal argument in isolate message: object is unsendable - Library:'dart:async' Class: _Future@4048458 (Flutter / Dart)Illegal argument in…Cannot convert value of type — Swift: Cannot convert value of type 'X' to expected argument type 'Y' (iOS)Cannot convert valu…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…BoxConstraints forces an infinite width — Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row) (Flutter / Dart)BoxConstraints forc…HandshakeException: CERTIFICATE_VERIFY_FAILED — Dart: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate) (Flutter / Dart)HandshakeException:…NetworkImageLoadException: HTTP request failed, statusCode: 404 — Flutter: Exception caught by image resource service — NetworkImageLoadException: HTTP request failed, statusCode: 404, https://example.com/a.png (Flutter / Dart)NetworkImageLoadExc…NetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…NSURLErrorDomain Code=-1009 — Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." (iOS)NSURLErrorDomain Co…NSURLErrorDomain Code=-1001 — Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." (iOS)NSURLErrorDomain Co…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…The property/method can't be unconditionally accessed because the receiver can be null — Dart: The property 'length' can't be unconditionally accessed because the receiver can be 'null' (Flutter / Dart)The property/method…The named parameter is required, but there's no corresponding argument — Dart: The named parameter 'key' is required, but there's no corresponding argument (Flutter / Dart)The named parameter…setState() or markNeedsBuild() called during build — Flutter: setState() or markNeedsBuild() called during build. This widget cannot be marked as needing to build because the framework is already in the process of building widgets (Flutter / Dart)setState() or markN…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…version solving failed (pub get) — Dart pub: Because app depends on intl ^0.19.0 and flutter_localizations from sdk depends on intl 0.18.1, version solving failed (Flutter / Dart)version solving fai…The current Dart SDK version is x; package requires SDK >= y — Dart pub: The current Dart SDK version is 2.19.0. Because app requires SDK version >=3.0.0 <4.0.0, version solving failed (Flutter / Dart)The current Dart SD…Looking up a deactivated widget's ancestor is unsafe — Flutter: Looking up a deactivated widget's ancestor is unsafe. At this point the state of the widget's element tree is no longer stable (Flutter / Dart)Looking up a deacti…

Directly related (11)

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.

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

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.

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.

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.

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

Bad state: Stream has already been listened toFlutter / Dart

Dart: Bad state: Stream has already been listened to

A single-subscription stream was listened to twice, for instance by two `StreamBuilder`s or after a rebuild.

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 getter/method isn't defined for the typeFlutter / Dart

Dart: The getter 'name' isn't defined for the type 'User' / The method 'foo' isn't defined for the class

The analyzer cannot find that property or method on the object's static type.

Illegal argument in isolate message: object is unsendableFlutter / Dart

Dart: Invalid argument(s): Illegal argument in isolate message: object is unsendable - Library:'dart:async' Class: _Future@4048458

You tried to send an object (closure, Future, socket, platform object) to another isolate that cannot be copied.

Two steps away (17)

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.

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.

BoxConstraints forces an infinite widthFlutter / Dart

Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row)

A widget that needs a finite width, like a `TextField` or `Container` with no size, was placed where the parent offers unlimited…

HandshakeException: CERTIFICATE_VERIFY_FAILEDFlutter / Dart

Dart: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate)

The app refused the server's TLS certificate because it is self-signed, expired, missing intermediates, or the device clock/CA st…

NetworkImageLoadException: HTTP request failed, statusCode: 404Flutter / Dart

Flutter: Exception caught by image resource service — NetworkImageLoadException: HTTP request failed, statusCode: 404, https://example.com/a.png

`Image.network` could not download the image (bad URL, status error, or blocked by CORS on web).

NetworkOnMainThreadExceptionAndroid

android.os.NetworkOnMainThreadException

The app made a network call on the main (UI) thread, which Android forbids.

NSURLErrorDomain Code=-1009iOS

Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline."

URLSession couldn’t reach the network — the device is offline, the app’s cellular data is disabled, or the simulator lost network…

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…

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.

The property/method can't be unconditionally accessed because the receiver can be nullFlutter / Dart

Dart: The property 'length' can't be unconditionally accessed because the receiver can be 'null'

With null safety you used `.` on a nullable value; Dart requires a null check first.

The named parameter is required, but there's no corresponding argumentFlutter / Dart

Dart: The named parameter 'key' is required, but there's no corresponding argument

A constructor or function marked `required` for a parameter was called without it.

setState() or markNeedsBuild() called during buildFlutter / Dart

Flutter: setState() or markNeedsBuild() called during build. This widget cannot be marked as needing to build because the framework is already in the process of building widgets

State was changed while Flutter was building widgets, for example calling `setState` or a notifier from inside `build`.

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.

version solving failed (pub get)Flutter / Dart

Dart pub: Because app depends on intl ^0.19.0 and flutter_localizations from sdk depends on intl 0.18.1, version solving failed

`flutter pub get` cannot find a set of package versions that satisfy every dependency's constraints.

The current Dart SDK version is x; package requires SDK >= yFlutter / Dart

Dart pub: The current Dart SDK version is 2.19.0. Because app requires SDK version >=3.0.0 <4.0.0, version solving failed

A package (or your own pubspec) requires a newer Dart SDK than the one your Flutter installation provides.

Looking up a deactivated widget's ancestor is unsafeFlutter / Dart

Flutter: Looking up a deactivated widget's ancestor is unsafe. At this point the state of the widget's element tree is no longer stable

You used a `BuildContext` after its widget was removed from the tree — typically after an `await` when the user already navigated…