I’m running Appium tests written in JavaScript (WebdriverIO) against an Amazon emulator and physical device, but the app isn’t launching and JSON-RPC calls fail with a "socket hang up" error. Also, vdcm list-methods only shows the usage message instead of listing available RPC methods.
Environment:
-
macOS (local dev machine)
-
Node.js v20.15.1
-
Appium Server 2.12.1 (local)
-
WebdriverIO client (JavaScript)
-
Emulator: emulator-5554
-
Physical device: Fire TV Stick 4K (connected via adb)
-
Command: vda -s emulator-5554 shell "vdcm list-methods"
-
VDA Version:
Vega Device Adapter version 2.1.0
Server Version 41
Platform Version 34.0.4
-
Appium driver:
-
@amzn/appium-kepler-driver@3.30.0 (installed via NPM)
-
Verified in Appium manifest:
automationName: automation-toolkit/JSON-RPC
platformNames: ["Kepler"]
mainClass: KeplerDriver
Capabilities:
const capabilities = {
platformName: 'Kepler',
'appium:automationName': 'automation-toolkit/JSON-RPC',
'kepler:device': 'vda://emulator-5554',
'appium:appURL': 'com.amazon.keplervideoapp.main'
};
Expected Behavior:
-
The emulator or device should launch the specified app successfully.
-
JSON-RPC calls such as:
await driver.execute('jsonrpc: injectInputKeyEvent', { inputKeyEvent: '108', holdDuration: 1000 });
-
should execute without socket or session errors.
-
Running vda -s emulator-5554 shell "vdcm list-methods" should list available methods (injectInputKeyEvent, captureScreenshot, etc.).
Actual Behavior:
-
App does not launch.
-
Test script fails with:
WebDriverError: An unknown server-side error occurred while processing the command.
Original error: socket hang up when running "execute/sync" with method "POST" and args "jsonrpc: injectInputKeyEvent"
-
vdcm list-methods output:
Device Config Manager Tool
Usage:
vdcm get <key>
vdcm set <key> <value>
vdcm --help
vdcm --version
Arguments did not match expected patterns%
-
No RPC methods are shown.
-
Same behavior after retries, app relaunches, or emulator/device restarts.
What I already tried:
-
Verified Appium–WebdriverIO compatibility.
-
Reinstalled Kepler driver (v3.30.0).
-
Confirmed device detection:
vda devices
emulator-5554 device
-
Checked network access and Appium endpoint (localhost:4723).
-
Tried multiple apps including com.amazon.keplervideoapp.main.
-
Restarted emulator and Appium server.
-
Tried with both emulator and physical device.
Hey @Thimmanna
Welcome to Amazon Developer Community !
Thanks for writing in, please allow me some time to look into this and I will update you as soon as I have something.
Warm regards,
Ivy
Hi @Thimmanna,
Thank you for contacting us and sharing about your experience while working with Appium. What I can tell from your description is that automation-toolkit.service may not be running. Service requires a file activation as explained on Set Up Testing with Appium | Design and Develop Vega Apps
touch /tmp/automation-toolkit.enable
Could you please first run the command above on your FireTV and/or Vega Virtual Device and try again? Please let me know if this solves your problem.
Thanks,
Carlos.
device is connected, I did run the shared command, now i see the above message. I tried connecting the device multiple times.
Hi @Thimmanna ,
I see from your previous post that you were testing on the Vega Virtual Device and this last screenshot is now from the FireTV. Also note that from the developer shell it’s not possible to use systemctl, hence the “error message”, so this may be a false positive.
Can you confirm if once following the file activation mechanism, did you attempted to use Appium?
Thanks,
Carlos.
Hi @Carlos_Salas ,
I was testing on both the Vega Virtual Device and a Fire TV—apologies for the confusion earlier. I’ve been following the file activation steps as described in the documentation linked below.
Please find the screen shot of the Vega Virtual device.
Please find my basic DPAD navigation script.
const { remote } = require('webdriverio');
const capabilities = {
platformName: 'Kepler',
'appium:automationName': 'automation-toolkit/JSON-RPC',
'kepler:device': 'vda://emulator-5554',
'appium:appURL': 'com.amazon.keplervideoapp.main',
};
const opts = {
hostname: 'localhost',
port: 4723,
path: '/',
logLevel: 'info',
capabilities,
};
const test = async () => {
const driver = await remote(opts);
try {
console.log('✅ App launched successfully!');
await driver.executeScript('jsonrpc: injectInputKeyEvent', [
{
inputKeyEvent: {
keyCode: 108,
holdDuration: 1000,
},
},
]);
} finally {
await driver.deleteSession();
}
};
test().catch(console.error);
The error i’m getting now is bit different.
Can you please tell me what’s the problem in my script or am i missing something?
Thank you!
Hello @Thimmanna
Maybe you do not need to pass the duration parameter.
As python method
it does not need duration parameter.
Hi @Wenguang_Hu ,
That didn’t solve the issue. Can anyone please share a working example of DAP navigation?
Hello @Thimmanna
Do you have physical Fire TV Stick connected while using the emulator?
Could you try to use emulator only or physical Fire TV only?
We have a example by python