C Specification

typedef enum XrResult {
    XR_SUCCESS = 0,
    XR_TIMEOUT_EXPIRED = 1,
    XR_SESSION_LOSS_PENDING = 3,
    XR_EVENT_UNAVAILABLE = 4,
    XR_SPACE_BOUNDS_UNAVAILABLE = 7,
    XR_SESSION_NOT_FOCUSED = 8,
    XR_FRAME_DISCARDED = 9,
    XR_ERROR_VALIDATION_FAILURE = -1,
    XR_ERROR_RUNTIME_FAILURE = -2,
    XR_ERROR_OUT_OF_MEMORY = -3,
    XR_ERROR_API_VERSION_UNSUPPORTED = -4,
    XR_ERROR_INITIALIZATION_FAILED = -6,
    XR_ERROR_FUNCTION_UNSUPPORTED = -7,
    XR_ERROR_FEATURE_UNSUPPORTED = -8,
    XR_ERROR_EXTENSION_NOT_PRESENT = -9,
    XR_ERROR_LIMIT_REACHED = -10,
    XR_ERROR_SIZE_INSUFFICIENT = -11,
    XR_ERROR_HANDLE_INVALID = -12,
    XR_ERROR_INSTANCE_LOST = -13,
    XR_ERROR_SESSION_RUNNING = -14,
    XR_ERROR_SESSION_NOT_RUNNING = -16,
    XR_ERROR_SESSION_LOST = -17,
    XR_ERROR_SYSTEM_INVALID = -18,
    XR_ERROR_PATH_INVALID = -19,
    XR_ERROR_PATH_COUNT_EXCEEDED = -20,
    XR_ERROR_PATH_FORMAT_INVALID = -21,
    XR_ERROR_PATH_UNSUPPORTED = -22,
    XR_ERROR_LAYER_INVALID = -23,
    XR_ERROR_LAYER_LIMIT_EXCEEDED = -24,
    XR_ERROR_SWAPCHAIN_RECT_INVALID = -25,
    XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -26,
    XR_ERROR_ACTION_TYPE_MISMATCH = -27,
    XR_ERROR_SESSION_NOT_READY = -28,
    XR_ERROR_SESSION_NOT_STOPPING = -29,
    XR_ERROR_TIME_INVALID = -30,
    XR_ERROR_REFERENCE_SPACE_UNSUPPORTED = -31,
    XR_ERROR_FILE_ACCESS_ERROR = -32,
    XR_ERROR_FILE_CONTENTS_INVALID = -33,
    XR_ERROR_FORM_FACTOR_UNSUPPORTED = -34,
    XR_ERROR_FORM_FACTOR_UNAVAILABLE = -35,
    XR_ERROR_API_LAYER_NOT_PRESENT = -36,
    XR_ERROR_CALL_ORDER_INVALID = -37,
    XR_ERROR_GRAPHICS_DEVICE_INVALID = -38,
    XR_ERROR_POSE_INVALID = -39,
    XR_ERROR_INDEX_OUT_OF_RANGE = -40,
    XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED = -41,
    XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED = -42,
    XR_ERROR_NAME_DUPLICATED = -44,
    XR_ERROR_NAME_INVALID = -45,
    XR_ERROR_ACTIONSET_NOT_ATTACHED = -46,
    XR_ERROR_ACTIONSETS_ALREADY_ATTACHED = -47,
    XR_ERROR_LOCALIZED_NAME_DUPLICATED = -48,
    XR_ERROR_LOCALIZED_NAME_INVALID = -49,
    XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING = -50,
    XR_ERROR_RUNTIME_UNAVAILABLE = -51,
  // Provided by XR_VERSION_1_1
    XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED = -1000710001,
  // Provided by XR_VERSION_1_1
    XR_ERROR_PERMISSION_INSUFFICIENT = -1000710000,
  // Provided by XR_KHR_android_thread_settings
    XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR = -1000003000,
  // Provided by XR_KHR_android_thread_settings
    XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR = -1000003001,
  // Provided by XR_MSFT_spatial_anchor
    XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT = -1000039001,
  // Provided by XR_MSFT_secondary_view_configuration
    XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT = -1000053000,
  // Provided by XR_MSFT_controller_model
    XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT = -1000055000,
  // Provided by XR_MSFT_composition_layer_reprojection
    XR_ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT = -1000066000,
  // Provided by XR_MSFT_scene_understanding
    XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT = -1000097000,
  // Provided by XR_MSFT_scene_understanding
    XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT = -1000097001,
  // Provided by XR_MSFT_scene_understanding
    XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT = -1000097002,
  // Provided by XR_MSFT_scene_understanding
    XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT = -1000097003,
  // Provided by XR_MSFT_scene_understanding
    XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT = -1000097004,
  // Provided by XR_MSFT_scene_understanding
    XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT = -1000097005,
  // Provided by XR_FB_display_refresh_rate
    XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB = -1000101000,
  // Provided by XR_FB_color_space
    XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB = -1000108000,
  // Provided by XR_FB_spatial_entity
    XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB = -1000113000,
  // Provided by XR_FB_spatial_entity
    XR_ERROR_SPACE_COMPONENT_NOT_ENABLED_FB = -1000113001,
  // Provided by XR_FB_spatial_entity
    XR_ERROR_SPACE_COMPONENT_STATUS_PENDING_FB = -1000113002,
  // Provided by XR_FB_spatial_entity
    XR_ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB = -1000113003,
  // Provided by XR_FB_passthrough
    XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB = -1000118000,
  // Provided by XR_FB_passthrough
    XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB = -1000118001,
  // Provided by XR_FB_passthrough
    XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB = -1000118002,
  // Provided by XR_FB_passthrough
    XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB = -1000118003,
  // Provided by XR_FB_passthrough
    XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB = -1000118004,
  // Provided by XR_FB_passthrough
    XR_ERROR_UNKNOWN_PASSTHROUGH_FB = -1000118050,
  // Provided by XR_FB_render_model
    XR_ERROR_RENDER_MODEL_KEY_INVALID_FB = -1000119000,
  // Provided by XR_FB_render_model
    XR_RENDER_MODEL_UNAVAILABLE_FB = 1000119020,
  // Provided by XR_VARJO_marker_tracking
    XR_ERROR_MARKER_NOT_TRACKED_VARJO = -1000124000,
  // Provided by XR_VARJO_marker_tracking
    XR_ERROR_MARKER_ID_INVALID_VARJO = -1000124001,
  // Provided by XR_ML_marker_understanding
    XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML = -1000138000,
  // Provided by XR_ML_marker_understanding
    XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML = -1000138001,
  // Provided by XR_ML_marker_understanding
    XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML = -1000138002,
  // Provided by XR_ML_marker_understanding
    XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML = -1000138003,
  // Provided by XR_ML_marker_understanding
    XR_ERROR_MARKER_INVALID_ML = -1000138004,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML = -1000139000,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML = -1000139001,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_FAIL_ML = -1000139002,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML = -1000139003,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML = -1000139004,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML = -1000139005,
  // Provided by XR_ML_localization_map
    XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML = -1000139006,
  // Provided by XR_ML_spatial_anchors
    XR_ERROR_SPATIAL_ANCHORS_PERMISSION_DENIED_ML = -1000140000,
  // Provided by XR_ML_spatial_anchors
    XR_ERROR_SPATIAL_ANCHORS_NOT_LOCALIZED_ML = -1000140001,
  // Provided by XR_ML_spatial_anchors
    XR_ERROR_SPATIAL_ANCHORS_OUT_OF_MAP_BOUNDS_ML = -1000140002,
  // Provided by XR_ML_spatial_anchors
    XR_ERROR_SPATIAL_ANCHORS_SPACE_NOT_LOCATABLE_ML = -1000140003,
  // Provided by XR_ML_spatial_anchors_storage
    XR_ERROR_SPATIAL_ANCHORS_ANCHOR_NOT_FOUND_ML = -1000141000,
  // Provided by XR_MSFT_spatial_anchor_persistence
    XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT = -1000142001,
  // Provided by XR_MSFT_spatial_anchor_persistence
    XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT = -1000142002,
  // Provided by XR_MSFT_scene_marker
    XR_SCENE_MARKER_DATA_NOT_STRING_MSFT = 1000147000,
  // Provided by XR_FB_spatial_entity_sharing
    XR_ERROR_SPACE_MAPPING_INSUFFICIENT_FB = -1000169000,
  // Provided by XR_FB_spatial_entity_sharing
    XR_ERROR_SPACE_LOCALIZATION_FAILED_FB = -1000169001,
  // Provided by XR_FB_spatial_entity_sharing
    XR_ERROR_SPACE_NETWORK_TIMEOUT_FB = -1000169002,
  // Provided by XR_FB_spatial_entity_sharing
    XR_ERROR_SPACE_NETWORK_REQUEST_FAILED_FB = -1000169003,
  // Provided by XR_FB_spatial_entity_sharing
    XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB = -1000169004,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_INSUFFICIENT_RESOURCES_META = -1000259000,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_STORAGE_AT_CAPACITY_META = -1000259001,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_INSUFFICIENT_VIEW_META = -1000259002,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_PERMISSION_INSUFFICIENT_META = -1000259003,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_RATE_LIMITED_META = -1000259004,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_TOO_DARK_META = -1000259005,
  // Provided by XR_META_spatial_entity_persistence
    XR_ERROR_SPACE_TOO_BRIGHT_META = -1000259006,
  // Provided by XR_META_passthrough_color_lut
    XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META = -1000266000,
  // Provided by XR_META_environment_depth
    XR_ENVIRONMENT_DEPTH_NOT_AVAILABLE_META = 1000291000,
  // Provided by XR_EXT_render_model
    XR_ERROR_RENDER_MODEL_ID_INVALID_EXT = -1000300000,
  // Provided by XR_EXT_render_model
    XR_ERROR_RENDER_MODEL_ASSET_UNAVAILABLE_EXT = -1000300001,
  // Provided by XR_EXT_render_model
    XR_ERROR_RENDER_MODEL_GLTF_EXTENSION_REQUIRED_EXT = -1000300002,
  // Provided by XR_EXT_interaction_render_model
    XR_ERROR_NOT_INTERACTION_RENDER_MODEL_EXT = -1000301000,
  // Provided by XR_QCOM_tracking_optimization_settings
    XR_ERROR_HINT_ALREADY_SET_QCOM = -1000306000,
  // Provided by XR_HTC_anchor
    XR_ERROR_NOT_AN_ANCHOR_HTC = -1000319000,
  // Provided by XR_BD_spatial_sensing
    XR_ERROR_SPATIAL_ENTITY_ID_INVALID_BD = -1000389000,
  // Provided by XR_BD_spatial_sensing
    XR_ERROR_SPATIAL_SENSING_SERVICE_UNAVAILABLE_BD = -1000389001,
  // Provided by XR_BD_spatial_sensing
    XR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_ENTITY_BD = -1000389002,
  // Provided by XR_BD_spatial_anchor
    XR_ERROR_SPATIAL_ANCHOR_NOT_FOUND_BD = -1000390000,
  // Provided by XR_BD_spatial_anchor_sharing
    XR_ERROR_SPATIAL_ANCHOR_SHARING_NETWORK_TIMEOUT_BD = -1000391000,
  // Provided by XR_BD_spatial_anchor_sharing
    XR_ERROR_SPATIAL_ANCHOR_SHARING_AUTHENTICATION_FAILURE_BD = -1000391001,
  // Provided by XR_BD_spatial_anchor_sharing
    XR_ERROR_SPATIAL_ANCHOR_SHARING_NETWORK_FAILURE_BD = -1000391002,
  // Provided by XR_BD_spatial_anchor_sharing
    XR_ERROR_SPATIAL_ANCHOR_SHARING_LOCALIZATION_FAIL_BD = -1000391003,
  // Provided by XR_BD_spatial_anchor_sharing
    XR_ERROR_SPATIAL_ANCHOR_SHARING_MAP_INSUFFICIENT_BD = -1000391004,
  // Provided by XR_BD_spatial_scene
    XR_ERROR_SCENE_CAPTURE_FAILURE_BD = -1000392000,
  // Provided by XR_EXT_plane_detection
    XR_ERROR_SPACE_NOT_LOCATABLE_EXT = -1000429000,
  // Provided by XR_EXT_plane_detection
    XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT = -1000429001,
  // Provided by XR_ANDROID_trackables
    XR_ERROR_MISMATCHING_TRACKABLE_TYPE_ANDROID = -1000455000,
  // Provided by XR_ANDROID_trackables
    XR_ERROR_TRACKABLE_TYPE_NOT_SUPPORTED_ANDROID = -1000455001,
  // Provided by XR_ANDROID_device_anchor_persistence
    XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID = -1000457000,
  // Provided by XR_ANDROID_device_anchor_persistence
    XR_ERROR_ANCHOR_ALREADY_PERSISTED_ANDROID = -1000457001,
  // Provided by XR_ANDROID_device_anchor_persistence
    XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID = -1000457002,
  // Provided by XR_ANDROID_device_anchor_persistence
    XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID = -1000457003,
  // Provided by XR_ANDROID_face_tracking
    XR_ERROR_SERVICE_NOT_READY_ANDROID = -1000458000,
  // Provided by XR_EXT_future
    XR_ERROR_FUTURE_PENDING_EXT = -1000469001,
  // Provided by XR_EXT_future
    XR_ERROR_FUTURE_INVALID_EXT = -1000469002,
  // Provided by XR_ML_system_notifications
    XR_ERROR_SYSTEM_NOTIFICATION_PERMISSION_DENIED_ML = -1000473000,
  // Provided by XR_ML_system_notifications
    XR_ERROR_SYSTEM_NOTIFICATION_INCOMPATIBLE_SKU_ML = -1000473001,
  // Provided by XR_ML_world_mesh_detection
    XR_ERROR_WORLD_MESH_DETECTOR_PERMISSION_DENIED_ML = -1000474000,
  // Provided by XR_ML_world_mesh_detection
    XR_ERROR_WORLD_MESH_DETECTOR_SPACE_NOT_LOCATABLE_ML = -1000474001,
  // Provided by XR_ML_facial_expression
    XR_ERROR_FACIAL_EXPRESSION_PERMISSION_DENIED_ML = 1000482000,
  // Provided by XR_META_colocation_discovery
    XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META = -1000571001,
  // Provided by XR_META_colocation_discovery
    XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META = -1000571002,
  // Provided by XR_META_colocation_discovery
    XR_COLOCATION_DISCOVERY_ALREADY_ADVERTISING_META = 1000571003,
  // Provided by XR_META_colocation_discovery
    XR_COLOCATION_DISCOVERY_ALREADY_DISCOVERING_META = 1000571004,
  // Provided by XR_META_spatial_entity_group_sharing
    XR_ERROR_SPACE_GROUP_NOT_FOUND_META = -1000572002,
  // Provided by XR_ANDROID_anchor_sharing_export
    XR_ERROR_ANCHOR_NOT_OWNED_BY_CALLER_ANDROID = -1000701000,
  // Provided by XR_EXT_spatial_entity
    XR_ERROR_SPATIAL_CAPABILITY_UNSUPPORTED_EXT = -1000740001,
  // Provided by XR_EXT_spatial_entity
    XR_ERROR_SPATIAL_ENTITY_ID_INVALID_EXT = -1000740002,
  // Provided by XR_EXT_spatial_entity
    XR_ERROR_SPATIAL_BUFFER_ID_INVALID_EXT = -1000740003,
  // Provided by XR_EXT_spatial_entity
    XR_ERROR_SPATIAL_COMPONENT_UNSUPPORTED_FOR_CAPABILITY_EXT = -1000740004,
  // Provided by XR_EXT_spatial_entity
    XR_ERROR_SPATIAL_CAPABILITY_CONFIGURATION_INVALID_EXT = -1000740005,
  // Provided by XR_EXT_spatial_entity
    XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT = -1000740006,
  // Provided by XR_EXT_spatial_persistence
    XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_UNSUPPORTED_EXT = -1000763001,
  // Provided by XR_EXT_spatial_persistence_operations
    XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_INCOMPATIBLE_EXT = -1000781001,
  // Provided by XR_KHR_maintenance1
    XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED_KHR = XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED,
  // Provided by XR_KHR_maintenance1
    XR_ERROR_PERMISSION_INSUFFICIENT_KHR = XR_ERROR_PERMISSION_INSUFFICIENT,
    XR_RESULT_MAX_ENUM = 0x7FFFFFFF
} XrResult;

Description

All return codes in the API are reported via XrResult return values.

The following are common suffixes shared across many of the return codes:

  • _INVALID: The specified handle, atom, or value is formatted incorrectly, or the specified handle was never created or has been destroyed.

  • _UNSUPPORTED: The specified handle, atom, enumerant, or value is formatted correctly but cannot be used for the lifetime of this function’s parent handle.

  • _UNAVAILABLE: The specified handle, atom, enumerant, or value is supported by the handle taken by this function, but is not usable at this moment.

Success Codes

Enum Description

XR_SUCCESS

Function successfully completed.

XR_TIMEOUT_EXPIRED

The specified timeout time occurred before the operation could complete.

XR_SESSION_LOSS_PENDING

The session will be lost soon.

XR_EVENT_UNAVAILABLE

No event was available.

XR_SPACE_BOUNDS_UNAVAILABLE

The space’s bounds are not known at the moment.

XR_SESSION_NOT_FOCUSED

The session is not in the focused state.

XR_FRAME_DISCARDED

A frame has been discarded from composition.

XR_RENDER_MODEL_UNAVAILABLE_FB

The model is unavailable. (Added by the XR_FB_render_model extension)

XR_SCENE_MARKER_DATA_NOT_STRING_MSFT

Marker does not encode a string. (Added by the XR_MSFT_scene_marker extension)

XR_ENVIRONMENT_DEPTH_NOT_AVAILABLE_META

Warning: The requested depth image is not yet available. (Added by the XR_META_environment_depth extension)

XR_ERROR_FACIAL_EXPRESSION_PERMISSION_DENIED_ML

Permission to track facial expressions was not granted (Added by the XR_ML_facial_expression extension)

XR_COLOCATION_DISCOVERY_ALREADY_ADVERTISING_META

Colocation advertisement has already been enabled (Added by the XR_META_colocation_discovery extension)

XR_COLOCATION_DISCOVERY_ALREADY_DISCOVERING_META

Colocation discovery has already been enabled (Added by the XR_META_colocation_discovery extension)

Error Codes

Enum Description

XR_ERROR_VALIDATION_FAILURE

The function usage was invalid in some way.

XR_ERROR_RUNTIME_FAILURE

The runtime failed to handle the function in an unexpected way that is not covered by another error result.

XR_ERROR_OUT_OF_MEMORY

A memory allocation has failed.

XR_ERROR_API_VERSION_UNSUPPORTED

The runtime does not support the requested API version.

XR_ERROR_INITIALIZATION_FAILED

Initialization of object could not be completed.

XR_ERROR_FUNCTION_UNSUPPORTED

The requested function was not found or is otherwise unsupported.

XR_ERROR_FEATURE_UNSUPPORTED

The requested feature is not supported.

XR_ERROR_EXTENSION_NOT_PRESENT

A requested extension is not supported.

XR_ERROR_LIMIT_REACHED

The runtime supports no more of the requested resource.

XR_ERROR_SIZE_INSUFFICIENT

The supplied size was smaller than required.

XR_ERROR_HANDLE_INVALID

A supplied object handle was invalid.

XR_ERROR_INSTANCE_LOST

The XrInstance was lost or could not be found. It will need to be destroyed and optionally recreated.

XR_ERROR_SESSION_RUNNING

The session is already running.

XR_ERROR_SESSION_NOT_RUNNING

The session is not yet running.

XR_ERROR_SESSION_LOST

The XrSession was lost. It will need to be destroyed and optionally recreated.

XR_ERROR_SYSTEM_INVALID

The provided XrSystemId was invalid.

XR_ERROR_PATH_INVALID

The provided XrPath was not valid.

XR_ERROR_PATH_COUNT_EXCEEDED

The maximum number of supported semantic paths has been reached.

XR_ERROR_PATH_FORMAT_INVALID

The semantic path character format is invalid.

XR_ERROR_PATH_UNSUPPORTED

The semantic path is unsupported.

XR_ERROR_LAYER_INVALID

The layer was NULL or otherwise invalid.

XR_ERROR_LAYER_LIMIT_EXCEEDED

The number of specified layers is greater than the supported number.

XR_ERROR_SWAPCHAIN_RECT_INVALID

The image rect was negatively sized or otherwise invalid.

XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED

The image format is not supported by the runtime or platform.

XR_ERROR_ACTION_TYPE_MISMATCH

The API used to retrieve an action’s state does not match the action’s type.

XR_ERROR_SESSION_NOT_READY

The session is not in the ready state.

XR_ERROR_SESSION_NOT_STOPPING

The session is not in the stopping state.

XR_ERROR_TIME_INVALID

The provided XrTime was zero, negative, or out of range.

XR_ERROR_REFERENCE_SPACE_UNSUPPORTED

The specified reference space is not supported by the runtime or system.

XR_ERROR_FILE_ACCESS_ERROR

The file could not be accessed.

XR_ERROR_FILE_CONTENTS_INVALID

The file’s contents were invalid.

XR_ERROR_FORM_FACTOR_UNSUPPORTED

The specified form factor is not supported by the current runtime or platform.

XR_ERROR_FORM_FACTOR_UNAVAILABLE

The specified form factor is supported, but the device is currently not available, e.g. not plugged in or powered off.

XR_ERROR_API_LAYER_NOT_PRESENT

A requested API layer is not present or could not be loaded.

XR_ERROR_CALL_ORDER_INVALID

The call was made without having made a previously required call.

XR_ERROR_GRAPHICS_DEVICE_INVALID

The given graphics device is not in a valid state. The graphics device could be lost or initialized without meeting graphics requirements.

XR_ERROR_POSE_INVALID

The supplied pose was invalid with respect to the requirements.

XR_ERROR_INDEX_OUT_OF_RANGE

The supplied index was outside the range of valid indices.

XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED

The specified view configuration type is not supported by the runtime or platform.

XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED

The specified environment blend mode is not supported by the runtime or platform.

XR_ERROR_NAME_DUPLICATED

The name provided was a duplicate of an already-existing resource.

XR_ERROR_NAME_INVALID

The name provided was invalid.

XR_ERROR_ACTIONSET_NOT_ATTACHED

A referenced action set is not attached to the session.

XR_ERROR_ACTIONSETS_ALREADY_ATTACHED

The session already has attached action sets.

XR_ERROR_LOCALIZED_NAME_DUPLICATED

The localized name provided was a duplicate of an already-existing resource.

XR_ERROR_LOCALIZED_NAME_INVALID

The localized name provided was invalid.

XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING

The xrGet*GraphicsRequirements call was not made before calling xrCreateSession.

XR_ERROR_RUNTIME_UNAVAILABLE

The loader was unable to find or load a runtime.

XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED

One or more of the extensions being enabled has dependency on extensions that are not enabled.

XR_ERROR_PERMISSION_INSUFFICIENT

Insufficient permissions. This error is included for use by vendor extensions. The precise definition of XR_ERROR_PERMISSION_INSUFFICIENT and actions possible by the developer or user to resolve it can vary by platform, extension or function. The developer should refer to the documentation of the function that returned the error code and extension it was defined.

XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR

xrSetAndroidApplicationThreadKHR failed as thread id is invalid. (Added by the XR_KHR_android_thread_settings extension)

XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR

xrSetAndroidApplicationThreadKHR failed setting the thread attributes/priority. (Added by the XR_KHR_android_thread_settings extension)

XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT

Spatial anchor could not be created at that location. (Added by the XR_MSFT_spatial_anchor extension)

XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT

The secondary view configuration was not enabled when creating the session. (Added by the XR_MSFT_secondary_view_configuration extension)

XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT

The controller model key is invalid. (Added by the XR_MSFT_controller_model extension)

XR_ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT

The reprojection mode is not supported. (Added by the XR_MSFT_composition_layer_reprojection extension)

XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT

Compute new scene not completed. (Added by the XR_MSFT_scene_understanding extension)

XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT

Scene component id invalid. (Added by the XR_MSFT_scene_understanding extension)

XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT

Scene component type mismatch. (Added by the XR_MSFT_scene_understanding extension)

XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT

Scene mesh buffer id invalid. (Added by the XR_MSFT_scene_understanding extension)

XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT

Scene compute feature incompatible. (Added by the XR_MSFT_scene_understanding extension)

XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT

Scene compute consistency mismatch. (Added by the XR_MSFT_scene_understanding extension)

XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB

The display refresh rate is not supported by the platform. (Added by the XR_FB_display_refresh_rate extension)

XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB

The color space is not supported by the runtime. (Added by the XR_FB_color_space extension)

XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB

The component type is not supported for this space. (Added by the XR_FB_spatial_entity extension)

XR_ERROR_SPACE_COMPONENT_NOT_ENABLED_FB

The required component is not enabled for this space. (Added by the XR_FB_spatial_entity extension)

XR_ERROR_SPACE_COMPONENT_STATUS_PENDING_FB

A request to set the component’s status is currently pending. (Added by the XR_FB_spatial_entity extension)

XR_ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB

The component is already set to the requested value. (Added by the XR_FB_spatial_entity extension)

XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB

The object state is unexpected for the issued command. (Added by the XR_FB_passthrough extension)

XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB

Trying to create an MR feature when one was already created and only one instance is allowed. (Added by the XR_FB_passthrough extension)

XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB

Requested functionality requires a feature to be created first. (Added by the XR_FB_passthrough extension)

XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB

Requested functionality is not permitted - application is not allowed to perform the requested operation. (Added by the XR_FB_passthrough extension)

XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB

There were insufficient resources available to perform an operation. (Added by the XR_FB_passthrough extension)

XR_ERROR_UNKNOWN_PASSTHROUGH_FB

Unknown Passthrough error (no further details provided). (Added by the XR_FB_passthrough extension)

XR_ERROR_RENDER_MODEL_KEY_INVALID_FB

The model key is invalid. (Added by the XR_FB_render_model extension)

XR_ERROR_MARKER_NOT_TRACKED_VARJO

Marker tracking is disabled or the specified marker is not currently tracked. (Added by the XR_VARJO_marker_tracking extension)

XR_ERROR_MARKER_ID_INVALID_VARJO

The specified marker ID is not valid. (Added by the XR_VARJO_marker_tracking extension)

XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML

The com.magicleap.permission.MARKER_TRACKING permission was denied. (Added by the XR_ML_marker_understanding extension)

XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML

The specified marker could not be located spatially. (Added by the XR_ML_marker_understanding extension)

XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML

The marker queried does not contain data of the requested type. (Added by the XR_ML_marker_understanding extension)

XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML

createInfo contains mutually exclusive parameters, such as setting XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_APRIL_TAG_ML with XR_MARKER_TYPE_ARUCO_ML. (Added by the XR_ML_marker_understanding extension)

XR_ERROR_MARKER_INVALID_ML

The marker id passed to the function was invalid. (Added by the XR_ML_marker_understanding extension)

XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML

The localization map being imported is not compatible with current OS or mode. (Added by the XR_ML_localization_map extension)

XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML

The localization map requested is not available. (Added by the XR_ML_localization_map extension)

XR_ERROR_LOCALIZATION_MAP_FAIL_ML

The map localization service failed to fulfill the request, retry later. (Added by the XR_ML_localization_map extension)

XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML

The com.magicleap.permission.SPACE_IMPORT_EXPORT permission was denied. (Added by the XR_ML_localization_map extension)

XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML

The com.magicleap.permission.SPACE_MANAGER permission was denied. (Added by the XR_ML_localization_map extension)

XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML

The map being imported already exists in the system. (Added by the XR_ML_localization_map extension)

XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML

The map localization service cannot export cloud based maps. (Added by the XR_ML_localization_map extension)

XR_ERROR_SPATIAL_ANCHORS_PERMISSION_DENIED_ML

The com.magicleap.permission.SPATIAL_ANCHOR permission was not granted. (Added by the XR_ML_spatial_anchors extension)

XR_ERROR_SPATIAL_ANCHORS_NOT_LOCALIZED_ML

Operation failed because the system is not localized into a localization map. (Added by the XR_ML_spatial_anchors extension)

XR_ERROR_SPATIAL_ANCHORS_OUT_OF_MAP_BOUNDS_ML

Operation failed because it is performed outside of the localization map. (Added by the XR_ML_spatial_anchors extension)

XR_ERROR_SPATIAL_ANCHORS_SPACE_NOT_LOCATABLE_ML

Operation failed because the space referenced cannot be located. (Added by the XR_ML_spatial_anchors extension)

XR_ERROR_SPATIAL_ANCHORS_ANCHOR_NOT_FOUND_ML

The anchor references was not found. (Added by the XR_ML_spatial_anchors_storage extension)

XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT

A spatial anchor was not found associated with the spatial anchor name provided (Added by the XR_MSFT_spatial_anchor_persistence extension)

XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT

The spatial anchor name provided was not valid (Added by the XR_MSFT_spatial_anchor_persistence extension)

XR_ERROR_SPACE_MAPPING_INSUFFICIENT_FB

Anchor import from cloud or export from device failed. (Added by the XR_FB_spatial_entity_sharing extension)

XR_ERROR_SPACE_LOCALIZATION_FAILED_FB

Anchors were downloaded from the cloud but failed to be imported/aligned on the device. (Added by the XR_FB_spatial_entity_sharing extension)

XR_ERROR_SPACE_NETWORK_TIMEOUT_FB

Timeout occurred while waiting for network request to complete. (Added by the XR_FB_spatial_entity_sharing extension)

XR_ERROR_SPACE_NETWORK_REQUEST_FAILED_FB

The network request failed. (Added by the XR_FB_spatial_entity_sharing extension)

XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB

Cloud storage is required for this operation but is currently disabled. (Added by the XR_FB_spatial_entity_sharing extension)

XR_ERROR_SPACE_INSUFFICIENT_RESOURCES_META

Resource limitation prevented this operation from executing. Recommend retrying, perhaps after a short delay and/or reducing memory consumption. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_SPACE_STORAGE_AT_CAPACITY_META

Operation could not be completed until resources used are reduced or storage expanded. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_SPACE_INSUFFICIENT_VIEW_META

Look around the environment more for space tracking to function. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_SPACE_PERMISSION_INSUFFICIENT_META

Space operation permission insufficient. Recommend confirming the status of the required permissions needed for using Space APIs. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_SPACE_RATE_LIMITED_META

Operation cancelled due to rate limiting. Recommend retrying after a short delay. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_SPACE_TOO_DARK_META

Environment too dark for tracking to complete operation. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_SPACE_TOO_BRIGHT_META

Environment too bright for tracking to complete operation. (Added by the XR_META_spatial_entity_persistence extension)

XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META

The provided data buffer did not match the required size. (Added by the XR_META_passthrough_color_lut extension)

XR_ERROR_RENDER_MODEL_ID_INVALID_EXT

The render model ID is invalid. (Added by the XR_EXT_render_model extension)

XR_ERROR_RENDER_MODEL_ASSET_UNAVAILABLE_EXT

The render model asset is unavailable. (Added by the XR_EXT_render_model extension)

XR_ERROR_RENDER_MODEL_GLTF_EXTENSION_REQUIRED_EXT

A glTF extension is required. (Added by the XR_EXT_render_model extension)

XR_ERROR_NOT_INTERACTION_RENDER_MODEL_EXT

The provided XrRenderModelEXT was not created from a XrRenderModelIdEXT from [XR_EXT_interaction_render_model] (Added by the XR_EXT_interaction_render_model extension)

XR_ERROR_HINT_ALREADY_SET_QCOM

Tracking optimization hint is already set for the domain. (Added by the XR_QCOM_tracking_optimization_settings extension)

XR_ERROR_NOT_AN_ANCHOR_HTC

The provided space is valid but not an anchor. (Added by the XR_HTC_anchor extension)

XR_ERROR_SPATIAL_ENTITY_ID_INVALID_BD

The spatial entity id is invalid. (Added by the XR_BD_spatial_sensing extension)

XR_ERROR_SPATIAL_SENSING_SERVICE_UNAVAILABLE_BD

The spatial sensing service is unavailable. (Added by the XR_BD_spatial_sensing extension)

XR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_ENTITY_BD

The spatial entity does not support anchor. (Added by the XR_BD_spatial_sensing extension)

XR_ERROR_SPATIAL_ANCHOR_NOT_FOUND_BD

The spatial anchor is not found. (Added by the XR_BD_spatial_anchor extension)

XR_ERROR_SPATIAL_ANCHOR_SHARING_NETWORK_TIMEOUT_BD

The network transmission timeout. (Added by the XR_BD_spatial_anchor_sharing extension)

XR_ERROR_SPATIAL_ANCHOR_SHARING_AUTHENTICATION_FAILURE_BD

The authentication for the user account failed. (Added by the XR_BD_spatial_anchor_sharing extension)

XR_ERROR_SPATIAL_ANCHOR_SHARING_NETWORK_FAILURE_BD

The network connection failed, e.g. the connection is unstable or disconnected. (Added by the XR_BD_spatial_anchor_sharing extension)

XR_ERROR_SPATIAL_ANCHOR_SHARING_LOCALIZATION_FAIL_BD

The spatial anchor localization failed. (Added by the XR_BD_spatial_anchor_sharing extension)

XR_ERROR_SPATIAL_ANCHOR_SHARING_MAP_INSUFFICIENT_BD

The feature points of spatial anchor map are insufficient. (Added by the XR_BD_spatial_anchor_sharing extension)

XR_ERROR_SCENE_CAPTURE_FAILURE_BD

The scene capture is failed, for example exiting abnormally. (Added by the XR_BD_spatial_scene extension)

XR_ERROR_SPACE_NOT_LOCATABLE_EXT

The space passed to the function was not locatable. (Added by the XR_EXT_plane_detection extension)

XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT

The permission for this resource was not granted. (Added by the XR_EXT_plane_detection extension)

XR_ERROR_MISMATCHING_TRACKABLE_TYPE_ANDROID

Indicates that the parameters contains multiple trackable types. (Added by the XR_ANDROID_trackables extension)

XR_ERROR_TRACKABLE_TYPE_NOT_SUPPORTED_ANDROID

Indicates that the function is not supported by the given trackable type. (Added by the XR_ANDROID_trackables extension)

XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID

XrUuidExt passed to the function was not found to be a persisted anchor. (Added by the XR_ANDROID_device_anchor_persistence extension)

XR_ERROR_ANCHOR_ALREADY_PERSISTED_ANDROID

XrUuidExt passed to the function was already marked to be persisted. (Added by the XR_ANDROID_device_anchor_persistence extension)

XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID

ANchor cannot be persisted because it is not tracking. (Added by the XR_ANDROID_device_anchor_persistence extension)

XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID

Persisted data stored by this app has not been loaded yet. (Added by the XR_ANDROID_device_anchor_persistence extension)

XR_ERROR_SERVICE_NOT_READY_ANDROID

The underlying tracking service is not yet ready. (Added by the XR_ANDROID_face_tracking extension)

XR_ERROR_FUTURE_PENDING_EXT

Returned by completion function to indicate future is not ready. (Added by the XR_EXT_future extension)

XR_ERROR_FUTURE_INVALID_EXT

Returned by completion function to indicate future is not valid. (Added by the XR_EXT_future extension)

XR_ERROR_SYSTEM_NOTIFICATION_PERMISSION_DENIED_ML

The com.magicleap.permission.SYSTEM_NOTIFICATION permission was not granted. (Added by the XR_ML_system_notifications extension)

XR_ERROR_SYSTEM_NOTIFICATION_INCOMPATIBLE_SKU_ML

Incompatible SKU detected. (Added by the XR_ML_system_notifications extension)

XR_ERROR_WORLD_MESH_DETECTOR_PERMISSION_DENIED_ML

The world mesh detector permission was not granted. (Added by the XR_ML_world_mesh_detection extension)

XR_ERROR_WORLD_MESH_DETECTOR_SPACE_NOT_LOCATABLE_ML

At the time of the call the runtime was unable to locate the space and cannot fulfill your request. (Added by the XR_ML_world_mesh_detection extension)

XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META

The network request failed. (Added by the XR_META_colocation_discovery extension)

XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META

The runtime does not have any methods available to perform discovery. (Added by the XR_META_colocation_discovery extension)

XR_ERROR_SPACE_GROUP_NOT_FOUND_META

The group UUID was not found within the runtime (Added by the XR_META_spatial_entity_group_sharing extension)

XR_ERROR_ANCHOR_NOT_OWNED_BY_CALLER_ANDROID

Operation not allowed because anchor is not owned by the XrSession in which the function is being called. (Added by the XR_ANDROID_anchor_sharing_export extension)

XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED_KHR

Alias for XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED (Added by the XR_KHR_maintenance1 extension)

XR_ERROR_PERMISSION_INSUFFICIENT_KHR

Alias for XR_ERROR_PERMISSION_INSUFFICIENT (Added by the XR_KHR_maintenance1 extension)

XR_ERROR_SPATIAL_CAPABILITY_UNSUPPORTED_EXT

The specified spatial capability is not supported by the runtime or the system. (Added by the XR_EXT_spatial_entity extension)

XR_ERROR_SPATIAL_ENTITY_ID_INVALID_EXT

The specified spatial entity id is invalid or an entity with that id does not exist in the environment. (Added by the XR_EXT_spatial_entity extension)

XR_ERROR_SPATIAL_BUFFER_ID_INVALID_EXT

The specified spatial buffer id is invalid or does not exist in the spatial snapshot being used to query for the buffer data. (Added by the XR_EXT_spatial_entity extension)

XR_ERROR_SPATIAL_COMPONENT_UNSUPPORTED_FOR_CAPABILITY_EXT

The specified spatial component is not supported by the runtime or the system for the given capability. (Added by the XR_EXT_spatial_entity extension)

XR_ERROR_SPATIAL_CAPABILITY_CONFIGURATION_INVALID_EXT

The specified spatial capability configuration is invalid. (Added by the XR_EXT_spatial_entity extension)

XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT

The specified spatial component is not enabled for the spatial context. (Added by the XR_EXT_spatial_entity extension)

XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_UNSUPPORTED_EXT

The specified spatial persistence scope is not supported by the runtime or the system. (Added by the XR_EXT_spatial_persistence extension)

XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_INCOMPATIBLE_EXT

The scope configured for the persistence context is incompatible for the current spatial entity. (Added by the XR_EXT_spatial_persistence_operations extension)

See Also

Document Notes

For more information, see the OpenXR Specification

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2025 The Khronos Group Inc.