Skip to main content

Error Handling

This page only applies to the new runtime - not the legacy runtime.
Wrap Rive operations in try/catch blocks to handle errors. For example, when loading a file:

View-Based Errors

Use the onError callback prop to handle errors during view configuration or runtime operations:

Error Types

The following error types may occur during view operations: Use these error types to provide specific error handling:
If no onError handler is provided, errors will be logged to the console by default.

Android Runtime Initialization

On Android, the Rive native library is automatically initialized at app startup. In rare cases (ABI mismatch, missing native libraries, etc.), this initialization can fail. Use RiveRuntime.getStatus() to check whether initialization succeeded:
On iOS, the runtime requires no explicit initialization — getStatus() will always return { isInitialized: true }.
Advanced: If you need full control over when initialization happens, you can disable automatic initialization by adding Rive_RiveRuntimeAndroidSkipSetup=true to android/gradle.properties and calling RiveRuntime.initialize() yourself. This is not recommended for most apps — only use this if you have a specific reason to defer initialization.