Error handling
All error handling for the Flutter SDK is centralized in this section. The onErrorUnico, onErrorSelfie, and onErrorDocument callbacks receive a UnicoError object with the fields code (int), description (String) and info (String?). info carries the step of the flow that failed on iOS and is always null on Android.
Error codes
| Code | Description |
|---|---|
73001 | Context invalid |
73002 | Did not grant permission to open camera |
73003 | Minimum API level is 21 (LOLLIPOP) |
73004 | Could not find implementation interface callback iAcessoBioSelfie |
73005 | Could not find implementation interface callback iAcessoBioDocument |
73006 | Unable to open camera on emulators |
73100 | Unable to connect to internet |
73200 | Please inform the JSON file name |
73202 | Unable to parse JSON file |
73300 | Unable to get unico authentication object |
73301 | Unable to parse object |
73302 | Could not find the unico token |
73303 | Current host is not registered |
73400 | Could not initialize camera |
73500 | Unable to get session token — service response error |
73501 | Unable to parse object |
73502 | Could not get session token |
73701 | Could not find active liveness import |
73702 | Unable to initialize active liveness in production mode |
73703 | Unable to get active liveness session |
73704 | The user pressed the cancel button and did not complete the session |
73705 | The session was not performed successfully and a FaceScan was not generated |
73706 | Camera access denied — user explicitly denied permission or device policy blocks it |
73707 | The session was cancelled due to the app being terminated, sleeping, OS notification, or backgrounded |
73708 | The session was cancelled because the device is in landscape mode |
73709 | The session was cancelled because the device is in reverse portrait mode |
73710 | The session was cancelled because the user was unable to complete it within the allotted timeout |
73712 | The session was cancelled due to memory pressure / app not in production requires network |
73713 | The session was cancelled because your key needs to be validated again |
73714 | The session was cancelled because the developer-configured encryption key was not valid |
73715 | The session was cancelled because not all guidance images were configured |
73716 | The session was cancelled because the SDK was unable to start the camera on this device |
73717 | The session was cancelled because the user was in a locked-out state |
73718 | Unknown and unexpected error during normal usage of native APIs |
73719 | The session was cancelled because the user pressed the Get Ready screen subtext message |
73800 | Could not build encrypted key |
74001 | onSuccess callback not implemented when opening the camera with webAppToken |
Official error catalog
The codes above reflect the Flutter SDK catalog. The official cross-platform error code catalog is available at API Reference > Error codes.
Handling the callback
@override
void onErrorUnico(UnicoError error) {
final code = error.code;
final description = error.description;
// handle error
}
Lifecycle callbacks
In addition to onErrorUnico, the SDK also triggers:
onUserClosedCameraManually()— user closed the camera manually.onSystemClosedCameraTimeoutSession()— session expired due to timeout (default 45 s, minimum 40 s).onSystemChangedTypeCameraTimeoutFaceInference()— face detection exceeded the 13 s threshold; capture switches to manual mode.