Error handling
All error handling for the Android SDK is centralized in this section. The onErrorAcessoBio callback receives an ErrorBio object with code (Int) and description (String). Error 73905 never arrives in onErrorAcessoBio: it arrives in the document capture callbacks, onDocumentFailed(ErrorBio) of DocumentCameraListener and onErrorDocument(ErrorBio) of iAcessoBioDocument. Their default implementations pass only the description on to onCameraFailed(String) and onErrorDocument(String), so override the ErrorBio overloads to read the code.
- Kotlin
- Java
override fun onErrorAcessoBio(error: ErrorBio) {
when (error.code) {
73002 -> { /* camera permission denied — redirect to app settings */ }
73006 -> { /* running on emulator — physical device required */ }
73100 -> { /* no internet connection */ }
else -> { /* generic error handling */ }
}
}
@Override
public void onErrorAcessoBio(ErrorBio error) {
switch (error.getCode()) {
case 73002: /* camera permission denied — redirect to app settings */ break;
case 73006: /* running on emulator — physical device required */ break;
case 73100: /* no internet connection */ break;
default: /* generic error handling */
}
}
In addition to onErrorAcessoBio, the SDK also triggers:
onUserClosedCameraManually()— user closed the camera manually.onSystemClosedCameraTimeoutSession()— session expired due to timeout.onSystemChangedTypeCameraTimeoutFaceInference()— no face detected for 13 seconds; the SDK switches to manual capture.
All error codes originate from the UnicoException enum and are delivered via ErrorBio(code, message). The message field contains the exact SDK string — do not modify or localize it.
| Code | Message | Description |
|---|---|---|
73001 | Context invalid | Invalid Android context passed to the SDK |
73002 | Did not grant permission to open camera | Camera permission was denied by the user |
73003 | The lest API is 21(LOLLIPOP | Device API level is below the minimum required (API 21) |
73004 | Could not find implementation interface callback iAcessoBioSelfie | iAcessoBioSelfie interface not implemented |
73005 | Could not find implementation interface callback iAcessoBioDocument | Removed in Android SDK 6.13.0. iAcessoBioDocument interface not implemented |
73006 | Unable to open camera on emulators | SDK does not run on emulators — use a physical device |
73007 | Unknown and unexpected error in WebApp… | Generic WebApp error (camera, storage, security, networking) |
73100 | Unable to connect to internet. | No internet connection available |
73200 | Please inform the config object or json file name | Configuration object or JSON file not provided |
73202 | Unable to parse json file | JSON configuration file is malformed |
73204 | Unable to initialize the SDK, please configure the environment on setEnviroment method of build | setEnvironment() not called before initialization |
73300 | Unable to get unico authentication object | Failed to retrieve authentication object |
73301 | Unable to parse object | Failed to parse authentication response |
73302 | Could not find the unico token | Unico auth token not found |
73303 | Current host is not registered | Bundle identifier not registered in the SDK Key |
73400 | Could not initialize camera | Camera initialization failed |
73701 | Could not find active liveness import | Active liveness module not found |
73703 | Unable to get active liveness session | Failed to obtain a liveness session |
73718 | The Session was cancelled because of an unknown and unexpected error… | Unknown internal session error |
73721 | The Session can't be performed: attempts limit exceeded. | Session cancelled — capture attempt limit reached |
73722 | The Session can't be performed: face alignment timeout. | Session cancelled — face alignment timed out |
73726 | An error happened during video recording | Video recording error during liveness |
73727 | No actions found in a video | No liveness actions detected in video |
73740 | The user pressed the do not consent button and did not complete the Session. | User declined consent |
73800 | Could not build encrypted key. | Failed to build the encrypted JWT |
73801 | The Session of SDK was cancelled because of an unknown and unexpected error. | Unknown internal SDK session error |
73802 | The Session was cancelled because of an unknown and unexpected error… | Session cancelled — missing required JWT fields |
73900 | Erro ao analisar imagem | Error analyzing the captured image |
73901 | É necessário implementar a interface AcessoBioListener | AcessoBioListener interface not implemented |
73902 | É necessário insirir um valor maior que 40 segundos no método: setTimeoutSession. | setTimeoutSession value must be greater than 40 seconds |
73903 | Arquivo de configuração corrompido. Verifique o arquivo json e tente novamente. | Corrupted configuration file — verify and retry |
73904 | Erro ao finalizar processo | Error finalizing the capture process |
73905 | Unable to open document camera | Document camera could not be opened. Since Android SDK 6.13.0, returned by every call to the document capture API. |
73906 | Document type uninformed | Removed in Android SDK 6.13.0. Document type was not specified |
74001 | onSuccess: not implemented when using open:webAppToken: | onSuccess callback not implemented for User Journey |
74100 | Could not prepare SDK-S | Failed to prepare SDK components |
74101 | No URL token was provided. | No URL token provided for the journey |
74102 | Environment type was not specified. | Environment (PROD/UAT) not configured |
737120 | Unable to initialize liveness | Liveness activity could not be initialized |
737220 | Capture could not start | Capture process failed to start |
737320 | Transaction could not start | Transaction could not be initiated |
737321 | The Session was cancelled because of an unknown and unexpected error. This return value is a catch-all for errors experienced during normal usage of these APIs. Try again. | Generic session provider error — retry |
The codes above are SDK callback errors. REST API error codes (HTTP status families) are documented separately at API Reference > Error codes.