Environment:A9T9 RPA Desktop Automation XModule2
| Knowledge Sources | |
|---|---|
| Domains | Desktop_Automation, Computer_Vision, RPA |
| Last Updated | 2026-10-22 17:48 GMT |
Overview
Native messaging host (XModule2 / "Desktop Automation") providing real OS mouse/keyboard input, desktop screenshot capture, template matching, and local OCR via a single-exe native application on Windows, macOS, and Linux.
Description
The XModule2 native host (com.a9t9.uivision.xmodule2) is a single executable that replaces the legacy multi-host XModules generation. It connects to the browser extension via the Chrome/Firefox native messaging protocol and provides the union of all native method families: XY (real mouse/keyboard input), CV (desktop image search/template matching), OCR (local ocrs engine), file access, and process execution. The host runs as a separate OS process, communicates via JSON over stdin/stdout, and requires OS-level permissions (accessibility on macOS, screen recording on macOS). Minimum required version is 2.1.30.
Usage
Use this environment for any desktop-scope RPA commands: uiv.desktop.* (real OS mouse/keyboard), desktop image search (CV), desktop screenshot capture, local OCR via the ocrs engine, and the classic X commands (XClick, XType, XMove). When not installed, desktop-scope commands fail with an install hint. Browser-scope commands work without this environment.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Windows, macOS, or Linux | Single exe per platform |
| Hardware | Standard desktop | Screen capture requires a display; OCR benefits from CPU SIMD |
| Disk | ~50MB | Native app + OCR language models |
| Permissions | macOS: Accessibility + Screen Recording | Must grant via System Preferences; new processes need restart |
Dependencies
System Packages
- Ui.Vision Desktop Automation app (XModule2) >= 2.1.30
- Native messaging host registration (auto-installed by the Desktop Automation installer)
Native Messaging Host
- Host name:
com.a9t9.uivision.xmodule2 - Connection:
chrome.runtime.connectNative()via thenativeMessagingpermission - Protocol: JSON messages over stdin/stdout (length-prefixed)
API Methods
get_version— host version stringget_permission_status— accessibility / screen recording statusrequest_permission/open_permission_pane— OS permission dialogs (macOS)ocr_image— local OCR viaocrsengineocr_language_list— available OCR languagesrun_process— execute OS processessearch_relative— desktop template matchingcapture_desktop— desktop screenshot captureselect_region— native area picker (host 2.1.27+)get_clipboard_sequence/read_clipboard_image— clipboard methods (host 2.0.13+)get_display_list— multi-monitor display enumeration
Credentials
No API keys required — the XModule2 host is a local native application. OS-level permissions (macOS Accessibility, Screen Recording) must be granted through the OS, not credentials.
Quick Install
# Download the Desktop Automation app from Ui.Vision
# https://go.ui.vision/?help=desktop_win (Windows)
# https://go.ui.vision/?help=desktop_mac (macOS)
# https://go.ui.vision/?help=desktop_linux (Linux)
# After install, fully quit and reopen the browser
# Verify in Settings > Desktop Automation or via the self-test
Code Evidence
XModule2 host name and connection from src/services/xmodules2/native.ts:8-14:
export const XMODULE2_HOST_NAME = 'com.a9t9.uivision.xmodule2'
class XModule2Host extends NativeMessagingHost {
constructor () {
super(XMODULE2_HOST_NAME)
}
}
Minimum version check from src/services/xmodules2/routing.ts:66:
export const MIN_XMODULE2_VERSION = '2.1.30'
export function xmoduleVersionOutdated (version: string = hostVersion): boolean {
return !!version && olderThan(version, MIN_XMODULE2_VERSION)
}
Native messaging connection and service worker keep-alive from src/services/native_host/index.ts:103-121:
connectAsync(): Promise<string> {
// Commented out the following line to keep the connection to native messaging
// to keep the service worker always alive
// note that it only applies to Chrome 100+
if (this.port) {
return this.invokeAsync("get_version", undefined);
}
this.port = chrome.runtime.connectNative(this.hostName);
this.port.onMessage.addListener(this.handleMessage);
this.port.onDisconnect.addListener(this.handleDisconnect);
return this.invokeAsync("get_version", undefined);
}
Host connect error diagnosis from src/services/xmodules2/native.ts:70-89:
export function diagnoseHostConnectError (raw: string, os: 'win' | 'mac' | 'linux'): HostConnectDiagnosis {
const msg = (raw || '').toLowerCase()
// Chrome/Edge: "Specified native messaging host not found."
// Firefox: "No such native application com.a9t9.uivision.xmodule2"
if (msg.indexOf('not found') >= 0 || msg.indexOf('no such native application') >= 0) {
return {
title: 'Native host not registered with this browser',
detail: 'The Desktop Automation app is not installed — or it is installed but this browser cannot see it...'
}
}
}
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
Specified native messaging host not found / No such native application |
XModule2 not installed or not registered with this browser | Install the Desktop Automation app and fully restart the browser (all windows) |
Access to the specified native messaging host is forbidden |
Extension ID not in host's allowed_origins | Reinstall the latest Desktop Automation app (updates the allowlist) |
Failed to start native messaging host |
Exe missing (AV quarantine) or policy-blocked | Check exe exists; reinstall; check chrome://policy for native messaging blocks |
UPDATE NEEDED: ... needs at least v2.1.30 |
Host version below minimum | Download and install the latest Desktop Automation app |
E347: green/pink pattern not supported |
Relative (green/pink) patterns dropped in V10 | Re-capture as plain image or convert to JS macro with anchor+offset |
Compatibility Notes
- macOS Permissions: Accessibility and Screen Recording permissions must be granted. A fresh "Allow" only applies to new processes —
reconnect()and re-check is required after granting. - Windows Multi-Display Scaling: When displays run different scaling (e.g., 125% + 175%), per-display DIP-to-physical coordinate conversion uses a window anchor, not a single scaling factor.
- Windows Username Encoding: Installers before 2.1.31 wrote unreadable registration files when the Windows username contained non-ASCII characters. Install 2.1.31+ to fix.
- Linux: GNOME-Wayland browsers may self-scale (dpr 1.25 on a 96-dpi display); DIP conversion accounts for this.
- Green/Pink Patterns: Relative (green/pink) visual patterns from Version 9 are not supported. Migrate to plain images or anchor+offset JS macros.
- Idle Disconnect: The native messaging port is intentionally kept alive (commented-out idle disconnect) to keep the MV3 service worker alive on Chrome 100+.