Skip to content

Error Code Reference ​

This page lists the error codes integrators can actually receive on Android, organized by where you get them.

Before You Read ​

The current SDK reports errors through Result<T> and InstaException subclasses. Most failures carry only an exception type and message, with no number; integer error codes appear only in the channels below:

Where you get itWhere the value comes from
NativeException.nativeErrorCode in Result.onFailure / Callback.onThrowableConnection, export, stitching, and player internals
NativeException.nativeErrorCode in DisconnectListener.onDisconnect(throwable)Connection internals
BleWakeUpListener.onWakeUpError(errCode)Bluetooth advertising
CameraLiveListener.onFailed(errorCode, message)Streaming internals
CameraActivateException.codeActivation backend
AiVoiceAssistantStatus.errorCodeRaw enum value reported by the camera
HttpStatusException.code / FirmwareUpgradeHttpException.codeHTTP status code — not a business error code

TemplateOtherException, StitchSeparatedFisheyeException, GenerateHDRException, and GeneratePureShotFailedException all extend NativeException, so the table above applies to their nativeErrorCode as well.

The same number means completely different things in different channels — never look it up across channels. For example, 1002 means "socket received corrupted data" in the connection channel but "audio filter recording failed" in the streaming channel; -1 means "Bluetooth is off" in the scan channel but "streaming module not initialized" in the streaming channel. When troubleshooting, first confirm which callback the code came from, then check the matching section.


1. Camera Connection ​

Connection failures are returned through Result.onFailure / Callback.onThrowable of CameraDevice.connect*(); forced disconnections after the connection is established are returned through DisconnectListener.onDisconnect(throwable). Both are NativeException — read nativeErrorCode.

1.1 Bluetooth Connection Failures (100 – 140) ​

CodeDescription
100Operation timed out
101Generic GATT error
102Other error
103Failed to open the link
104Sync packet timed out
105Failed to subscribe to notify
106Failed to set MTU
107Failed to write characteristic
108Handshake failed
109Wake-up authorization failed
110Camera busy
133GATT status 133 (system-level exception)
134Characteristic not found
135Uncategorized exception
136Privileged crash
137Classic Bluetooth connection timed out
138Classic Bluetooth connection canceled
139Classic Bluetooth pairing failed
140Missing BLUETOOTH_CONNECT runtime permission (retrying won't help; prompt the user to grant it)

1.2 Bluetooth Scan Failures ​

CodeDescription
-1Bluetooth is off
-2BLE Scanner unavailable
-3A scan is already running in the app
-4Missing scan permission
-100BLE scanning is not supported on this platform
1A scan is already running at the system level
2App registration failed
3Internal error
4BLE scanning feature not supported
5Insufficient hardware resources
6Scanning too frequently

1.3 USB / Socket Connection Failures and Runtime Disconnections ​

CodeDescription
-19Socket operation timed out
-120USB transfer error
-121Device not found / device unplugged
-210Socket closed
-211Socket read failed
-212Socket write failed
-213Socket fd_set failed
-214Socket connection failed
-503Camera busy
-504Occupied by cloud upload
-505Occupied by Wi-Fi switching
501Bluetooth link disconnected
1001Socket device busy
1002Socket received corrupted data and disconnected

-121 covers both "device not found" and "device unplugged"; the two cannot be told apart by the code. 501 is the most common disconnection code after a connection is established. It usually means the camera-side Bluetooth link has dropped, and you need to reconnect.

1.4 Typed Connection Exceptions (No Number) ​

The following failures carry only an exception type and message — nativeErrorCode is not available. Troubleshoot by exception type:

ExceptionMeaning
BleScanRejectExceptionBluetooth scan rejected (Bluetooth is off or scanning too frequently)
BleDeviceNotFoundExceptionNo available camera Bluetooth device nearby
BleConnectRejectExceptionBluetooth connection rejected
BleScanningExceptionBluetooth scan in progress
CameraConnectingExceptionCamera is connecting; don't start another connection
CameraTypeGetFailedExceptionUnable to get the camera type
CameraTypeNotSupportExceptionUnsupported camera type
CameraOptionFetchExceptionUnable to get camera parameters

2. Camera Activation ​

Activation failures are returned through CameraActivateException.code, taken from the code field of the activation backend's response body.

CodeDescription
-1The response body has no code field
400Invalid parameters (camera type or serial number not obtained)
401API signature verification failed
402Data encryption verification failed
403The nonce has already been used
406The timestamp has expired
429Too many requests / activation IP rate-limited (45 per IP per day)
500Internal system error
3001Device serial number does not match the device type
3002Camera already activated
3003Activation denied: the activation IP is not in an allowed region
3004Unable to generate an available serial number
3005The system does not support activating this device model
3006Serial number locked by the backend; activation not allowed

Note the following three failure paths that do not go through CameraActivateException:

  • Non-2xx HTTP status → HttpStatusException. Its code is the HTTP status code, a different set of values from the table above — don't mix them up.
  • Network error / request timeout → the network library's exception is passed through directly, with no code.
  • Failed to read the serial number → OptionValueNullException("SERIAL_NUMBER"), with no code.

3. Bluetooth Wake-up ​

Wake-up failures are returned through BleWakeUpListener.onWakeUpError(errCode).

CodeDescription
-99This model does not support Bluetooth advertising wake-up (pre-checked inside the SDK; nothing is sent to the system)
-1An exception was thrown when starting Bluetooth advertising
1Advertising data too large
2Number of advertisements exceeds the system limit
3Advertising already in progress
4Internal system error
5This device does not support BLE advertising

Known limitation: when system Bluetooth is off or the device does not support BLE advertising, the underlying layer triggers no callback at all — you receive neither success nor failure. Add your own timeout fallback instead of relying only on this callback.


4. Capture Failures ​

When the camera stops capturing on its own (duration limit, storage full, slow card, overheating, low battery, etc.), the SDK throws CameraCaptureException.

This exception carries only a message, with no numeric field, so you cannot branch on an error code — only display the message. The message is an English string the SDK translates from the enum reported by the camera, for example:

Reason reported by the cameraException message
Exceeded the maximum recording durationExceeding the maximum recording duration limit
Storage fullExceeding the maximum storage space limit
Exceeded the maximum number of filesExceeding the maximum file limit
Storage card write speed too lowStorage card write speed is too low
Encoding errorMuxer stream error and recording has been stopped
Frame lossFrame loss error occurred and recording has been stopped
Low battery (while recording)The camera battery is too low and has stopped recording
Overheating (while recording)The camera temperature is too high and has been stopped
Battery too low to start recordingThe camera battery is too low to start recording
Insufficient storage to start recordingInsufficient storage space to start recording
Too hot to start recordingThe camera temperature is too high to start recording
Task conflictTask conflict, recording has been stopped
Recording prohibited during firmware upgradeRecording is prohibited during firmware upgrades
Recording prohibited during P2PRecording is prohibited during P2P
Other / uncovered reasonsRecording stopped due to an error

Two things to note:

  • On some model configurations, "exceeded the maximum recording duration" produces no callback at all — capture ends silently.
  • When the camera reports a reason the SDK doesn't know (usually because the camera firmware is newer than the SDK), it falls back to Recording stopped due to an error, and the specific reason is not visible.

A few other capture failure paths embed a native integer in the message (such as Record video failed, code=xxx). That integer comes from a native event, not from the enum in the table above, and is for reference only.


5. Firmware Upgrade ​

Firmware upgrade failures expose no integer error code; distinguish them by exception type:

ExceptionMeaning
FirmwareUpgradeLowBatteryExceptionCamera battery is below the level required for the upgrade (the exception carries the required battery percentage)
FirmwareUpgradeChargeBoxLowBatteryExceptionCharging case battery is below the level required for the upgrade (the exception carries the required battery percentage)
FirmwareFileNotFoundExceptionFirmware file not found
FirmwareUpgradeHttpExceptionAbnormal HTTP status during upload (the code it carries is the HTTP status code)
FirmwareUpgradeIOExceptionIO exception during upload
FirmwareUpgradeCancelExceptionUpgrade canceled
FirmwareUpgradeUnknownExceptionOther uncategorized exception
CameraNotConnectedExceptionCamera not connected

6. Media · Export ​

Export failures are returned through IExportCallback.onFail(throwable).

6.1 Named Template Exceptions (No Number) ​

When template processing fails, a named exception is thrown and nativeErrorCode is not available. Troubleshoot by exception type:

ExceptionMeaning
TemplateInvalidFileTypeExceptionInvalid template file type
TemplateInvalidOffsetExceptionInvalid template offset
TemplateDownloadFailedExceptionTemplate download failed
TemplateParseFailedExceptionFailed to parse template imageAsset
TemplateInitFailedExceptionTemplate initialization failed
TemplateBlenderFailedExceptionTemplate image blending failed

6.2 Other Export Failures (TemplateOtherException.nativeErrorCode) ​

CodeDescription
-31000Export already in progress
-31011Failed to load stabilization data
-31012Export terminated because the Work reference was released
-31016Post-export processing failed
-31017Original thumbnail LRV missing
-31018Failed to load original thumbnail LRV
-13016Export timed out
-13021Failed to open the hardware encoder
-13031Frame exporter preparation failed
-13033Failed to reverse-parse video
-13034The two streams have different frame formats
-13036Video frame rate is 0
-13037Video bitrate is 0
-13038Video width is 0
-13039Video height is 0
-13041Source video frame rate is 0
-13042Source video duration is 0
-13044Failed to load AAA parameters
-13045Failed to create denoising data
-13046Image width is 0
-13047Image height is 0
-13048Export URL is empty

The table above lists the codes the export pipeline constructs itself. When an underlying write fails, the export callback passes through the underlying library's error code unchanged, so you may also receive codes like -5701110x (encoder), -5701220x (extradata), and negative codes from the underlying audio/video library (such as -5 or -22). These are described in "9. Live Streaming" — both pipelines share the same underlying write and encoding components.

6.3 Transcoding / Proxy (Shared by the Player and Export) ​

CodeDescription
-15062Unknown transcoding error
-15063Failed to remux panorama info during transcoding
-15064Failed to rename after remuxing panorama info during transcoding
-15065Original export length during transcoding is not 1

6.4 Cancellation Does Not Go Through onFail ​

Canceling an export does not go to onFail; it calls IExportCallback.onCancel() instead. The following codes therefore never appear as nativeErrorCode — receiving onCancel means the user or your business logic canceled on purpose:

-13017 (export canceled), -31010 (loading extra info canceled), -31019 (video-to-image-sequence export canceled)


7. Media · Stitching ​

Stitching and PureShot failures are returned through Result.onFailure of the Stitcher methods.

ExceptionCode carriedMeaning
StitchSeparatedFisheyeException-35001Invalid template offset
StitchSeparatedFisheyeException-35004Template initialization failed
StitchSeparatedFisheyeException-35005Template image blending failed
StitchSeparatedFisheyeException-35006Failed to merge template sub-offsets
StitchSeparatedFisheyeExceptionOtherSeparated fisheye stitching failed; code returned by the underlying layer
GenerateHDRExceptionOtherHDR compositing failed; code returned by the underlying layer
GeneratePureShotFailedExceptionOtherPureShot generation failed; code returned by the algorithm layer

The following failures carry no code; troubleshoot by exception type:

ExceptionMeaning
GeneratePureShotNotSupportExceptionThis footage does not support PureShot
GeneratePureShotModelFileMissingExceptionLUT or model file missing (the exception carries the type of the missing file)
StitchSeparatedFisheyeParamsExceptionThe footage has fewer than 2 URLs and cannot be stitched

8. Media · Player ​

Playback failures are returned through PlayerViewListener.onFail(exception) — read NativeException.nativeErrorCode.

8.1 SDK Player Error Codes ​

CodeDescription
-10000Failed to load stabilization data
-10001Player terminated because the Work reference was released
-10003GPU texture size not supported
-10004Player failed to initialize flash
-10005Invalid rendering environment
-10006Recording callback status point provider is null
-10008Player loading canceled
-10009Project parameters are null
-10010Playback parameters are null
-10011Lifecycle is null
-20000Resource permit registration failed: thread interrupted
-20001Resource permit registration failed: wait timed out
-20002Resource permit registration canceled
-23000Failed to load Work GPS data
-23002Failed to load Work extra data
-23003Failed to load Work LRV extra data
-23007Player failed to load the proposal
-23008Failed to load stabilization data for export
-23009Invalid precomputed stabilization data
-33004AI analysis canceled
-33005Failed to load AI stabilization data
-35000Invalid template file type
-35001Invalid template offset
-35002Template download failed
-35003Failed to parse template imageAsset
-35004Template initialization failed
-35005Template image blending failed

8.2 Underlying Playback Engine Error Codes ​

The following error codes are passed up unchanged by the playback engine and are the most common type of playback failure. The table lists the values the engine defines; the engine may also pass up codes not in this table.

CodeDescription
-2Directory or file does not exist
-5Transfer error (system exception or Wi-Fi connection problem)
-12Out of memory
-22Invalid argument (corrupted video / code logic issue / unexpected Wi-Fi interruption)
-28Insufficient storage space
-101Network unavailable
-104Connection reset
-110Connection timed out (usually a camera-side issue)
-113Host unreachable (camera not connected / DNS issue / camera server unreachable)
-1094995529Invalid data (corrupted video / unsupported encoding / unexpected Wi-Fi interruption)
-1397312835Cache verification failed; clearing the player cache may fix it
-542398533Low-level or system error, usually an unsupported hardware codec
-808465656Camera server returned 400
-823242872Camera server returned 401
-858797304Camera server returned 403
-875574520Camera server returned 404
-1482175736Camera server returned another 4xx
-1482175992Camera server returned 5xx
-1128613112Decoding this file format is not supported
-1129203192Encoding this format is not supported
-1296385272Parsing this file format is not supported
-57011001Video encoding format not supported
-57012103Invalid packet; the file may be corrupted
-57041001URL protocol not supported
-57041002Underlying library initialization failed (internal error)
-57041003Malformed URL
-57041004Required feature not compiled into the underlying library
-57041005Unable to resolve proxy host
-57041006Unable to resolve host (cloud footage)
-57041007Unable to connect to remote host or proxy (cloud footage)
-57041008Server returned an unparseable response
-57041009Server denied remote access (missing permission)
-57041028Access timed out
-57041035SSL/TLS handshake failed
-57041047Too many redirects
-57041052Server returned no data
-57041055Failed to send network data
-57041056Failed to receive network data
-57041092HTTP/2 framing layer stream error
-57040000 – -57040999Any value in this range means "the server returned the corresponding HTTP status code"

9. Live Streaming ​

Streaming failures are returned through CameraLiveListener.onFailed(errorCode, message). message is the underlying description string and can be displayed alongside the code.

CodeDescription
-1Streaming module not initialized (streaming started without calling preview initialization preview.init())
-1001Audio filter send failed
-1002Audio filter recording failed
-1003Audio filter open failed
1000Writer stopped abnormally
1001Writer not switched
-57011101Encoder extradata is missing the start code
-57011102No available encoder found
-57011103Failed to open the encoder (this value is returned when the hardware encoder fails to open)
-57011104Pixel format mismatch
-57012201Invalid writer extradata
-57012202Writer extradata changed

Beyond the table above, when RTMP connection or streaming fails, the underlying audio/video library's error code is passed through unchanged (negative values, with no fixed list), such as -5 (IO / transfer error) or -22 (invalid argument). Use message and the streaming logs to investigate these codes further.

On models that support software encoding, the SDK automatically retries when the hardware encoder fails to open; your app is called back only if software encoding also fails.


10. AI Voice Assistant ​

AiVoiceAssistantStatus.errorCode is the raw value reported by the camera and is for diagnostics only.

CodeDescription
0No error
1Unknown error
2Timed out
3Check failed
4Not supported
5Wake-up link not ready (not paired or not yet woken up)
6The user has not enabled location permission
7Poor network conditions on the user's side
8The app is disconnected from the LLM service
9The user has not accepted the privacy agreement
10The current system version does not meet the feature's minimum requirement
11Multiple connection failures

A non-zero value does not mean there is currently a fault. In testing, the camera still reports 5 while the voice assistant is running normally (state is running), because this SDK does not establish the wake-up link — the value stays there indefinitely, which is expected and not a fault. Only an error state indicates the feature is malfunctioning.

When the camera reports a new value not listed in this table (usually because the firmware is newer than the SDK), it is read as 0 and cannot be distinguished from "no error".