Summary
On the Vega Virtual Device shipped with SDK 0.24.x, the Appium GET /session/:id/screenshot command (automation-toolkit JSON-RPC takeScreenshot) never succeeds. Each call resets the connection, and the toolkit process is restarted by systemd. After 3 crashes in a short window the service stops being restarted and every JSON-RPC method (including getPageSource and injectInputKeyEvent) is dead until the VVD is rebooted. Re-touching /tmp/automation-toolkit.enable does not recover it.
The same host setup against the SDK 0.23.8358 VVD works fine (screenshots and continuous ~7 fps screenshot polling for minutes).
Environment
| Item | Value |
|---|---|
| Vega SDK | 0.24.9914 (also 0.24.9785 and 0.24.9859 – see below) |
| Vega CLI | 1.2.18 |
| Host | macOS 15 (Apple Silicon) |
| Appium | 3.7.0 (also reproduced with the recommended driver) |
| @amazon-devices/appium-kepler-driver | 3.30.0 |
| automation-toolkit on device | /usr/bin/automationToolkitServer from the 0.24 system image (763,056 bytes, md5 120bc35a…) |
| Device | VVD only (not tested on a physical Fire TV) |
Steps to reproduce
vega virtual-device start(SDK 0.24.9914), thenvega exec vda shell 'touch /tmp/automation-toolkit.enable'.vega device start-port-forwarding --port 8383 --forward true.- Alternate
getPageSourceandtakeScreenshotagainsthttp://127.0.0.1:8383/jsonrpcwithparams: {}.
Observed (VVD freshly booted, launcher in foreground, no app needed):
| Call | Result |
|---|---|
getPageSource |
200, element tree returned |
takeScreenshot #1 |
connection reset after ~0.25 s; 3 s later getPageSource works again (service restarted) |
takeScreenshot #2 |
same |
takeScreenshot #3 |
connection reset; from now on getPageSource is refused instantly |
wait 75 s / rm + touch /tmp/automation-toolkit.enable |
still refused; only a VVD reboot recovers |
Through Appium the same shows up as:
GET /session/:id/screenshot -> 500 "getScreenshot: There was an error while fetching screenshot data"
Failed to take screenshot AxiosError: socket hang up (code: ECONNRESET)
The Kepler driver retries once on a fresh port-forward, so a single Appium screenshot call costs two toolkit crashes. Anything that polls screenshots (video recording helpers, Appium Inspector) kills the toolkit within a second.
What changed between 0.23 and 0.24
Extracting /usr/bin/automationToolkitServer from vvd/images/tv/image_files/system.ext4 of each SDK:
| SDK | size | notes |
|---|---|---|
| 0.23.8128 / 0.23.8358 | 523,728 B (identical) | links libwayland-server.so.0; screenshot works on VVD |
| 0.24.9785 / 0.24.9859 / 0.24.9914 | 763,056 B (identical; the whole system.ext4 is byte-identical across the three) |
new build (VegaUIAutomator-1.0.53564.0), no wayland dependency; screenshot now goes through com.amazon.kepler.graphics.IScreenshotManager2 / requestScreenShot2; contains the string Failed to take screenshot. Reason: |
So the toolkit’s screenshot implementation was moved to the Kepler graphics screenshot manager in 0.24, and on the VVD that path crashes the process. No crash dump is written to SYSTEM_TOMBSTONE/acr, and nothing toolkit-related appears in loggingctl log.
Questions
- Is the VVD in 0.24 expected to support
IScreenshotManager2? If not, could the toolkit return a JSON-RPC error instead of crashing (the crash also takes downgetPageSource/key injection after the systemd start limit)? - Is there a way to restart
automation-toolkit.servicefrom the developer shell without rebooting the VVD? - Is a fixed VVD image planned for a 0.24.x patch?
Related but different threads: #28630 (real device, DRM, {"value": null}), #25113 (real device, “Buffer is null”).