KPI Visualizer does not working

:warning: Before you continue


Before submitting a bug report, please review our troubleshooting documentation at Troubleshoot Issues | Vega Troubleshooting

If you still want to file a bug report, please make sure to fill in all the details below and provide the necessary information.

NOTE: PLEASE ONLY REPORT A SINGLE BUG USING THIS TEMPLATE.
If you’re experiencing multiple issues, please file a separate report for each.


:backhand_index_pointing_right: Bug Description


1. Summary

Provide a brief description of the bug in the SDK and its impact on app functionality.

App Name: HJ Video app
App Link on Amazon Appstore (found through Developer Console → Actions column in App List → View on Amazon.com):

Bug Severity
Select one that applies

  • Impacts operation of app
  • Blocks current development
  • Improvement suggestion
  • Issue with documentation (If selected, please share the doc link and describe the issue)
  • Other

2. Steps to Reproduce

  1. make release build
    
  2. install and launch app
  3. Open VSCode
    
  4. Open Vega Launch App KPI Visualizer -> Application UI fluidity Test[check] -> Record CPU Profiler[check] -> Ignore trace loss[without check] -> Number of Iterations[3] -> For Application UI fluidity Test, do you want to use custom test scenario[No]
    
  5. kpi visualizer does not start

3. Observed Behavior

kpi visualizer does not start

kpi-visualizer started. Command: kpi-visualizer --kpi=ui-fluidity --output-dir=/Users/tabuchinobuyuki/IdeaProjects/hulu-kepler/generated --grpc-port=50051 --app-name=jp.happyon.android.main --device-serial-number=GT533M06507715E2  --record-cpu-profiling --sourcemap-file-path=/Users/tabuchinobuyuki/IdeaProjects/hulu-kepler/build/debugging/Release/srcmap/b6debc724b9c60c270956dc5bc6f293f6307d6a2e08078c4d5a3b669b09f3272.bundle.map --iterations=3
Running Command: Application UI fluidity Test
kpi-visualizer: Data successfully appended to file

kpi-visualizer: Perf CLI Version: 0.22.0

kpi-visualizer: Device: Callie Firmware: callie-user OS 1.1 (TV Ship day60/91)

kpi-visualizer: Using filtered Perfetto config, disabling CPU scheduling events (ftrace)

kpi-visualizer: Installed KSPTService successfully

kpi-visualizer: Waiting for trace daemons

kpi-visualizer: 
Waiting 1/10...
kpi-visualizer: 
Waiting 2/10...
kpi-visualizer: 
Waiting 3/10...
kpi-visualizer: 
Waiting 4/10...
kpi-visualizer: 
Waiting 5/10...
kpi-visualizer: 
Waiting 6/10...
kpi-visualizer: 
Waiting 7/10...
kpi-visualizer: 
Waiting 8/10...
kpi-visualizer: 
Waiting 9/10...
kpi-visualizer: 
Waiting 10/10...
kpi-visualizer: 
Error: Appium Kepler Driver is not found in the platform. Please follow instruction in https://developer.amazon.com/docs/kepler/appium-install.html#install-appium to install Appium Kepler Driver. 

kpi-visualizer exited
kpi-visualizer closed

4. Expected Behavior

kpi visualizer start

4.a Possible Root Cause & Temporary Workaround

check appium path

% which appium  
/Users/tabuchinobuyuki/.nodenv/shims/appium
% vega exec appium --version
dbug Appium Parsed manifest file at /Users/tabuchinobuyuki/.appium/node_modules/.cache/appium/extensions.yaml: {
dbug Appium   "drivers": {
dbug Appium     "kepler": {
dbug Appium       "pkgName": "@amazon-devices/appium-kepler-driver",
dbug Appium       "version": "3.30.0",
dbug Appium       "installType": "npm",
dbug Appium       "installSpec": "@amazon-devices/appium-kepler-driver@3.30.0",
dbug Appium       "installPath": "/Users/tabuchinobuyuki/.appium/node_modules/@amazon-devices/appium-kepler-driver",
dbug Appium       "appiumVersion": "^2.2.2",
dbug Appium       "automationName": "automation-toolkit/JSON-RPC",
dbug Appium       "platformNames": [
dbug Appium         "Kepler"
dbug Appium       ],
dbug Appium       "mainClass": "KeplerDriver"
dbug Appium     }
dbug Appium   },
dbug Appium   "plugins": {},
dbug Appium   "schemaRev": 4
dbug Appium }
2.2.2

check appium version and drivers

% appium --version
dbug Appium Parsed manifest file at /Users/tabuchinobuyuki/.appium/node_modules/.cache/appium/extensions.yaml: {
dbug Appium   "drivers": {
dbug Appium     "kepler": {
dbug Appium       "pkgName": "@amazon-devices/appium-kepler-driver",
dbug Appium       "version": "3.30.0",
dbug Appium       "installType": "npm",
dbug Appium       "installSpec": "@amazon-devices/appium-kepler-driver@3.30.0",
dbug Appium       "installPath": "/Users/tabuchinobuyuki/.appium/node_modules/@amazon-devices/appium-kepler-driver",
dbug Appium       "appiumVersion": "^2.2.2",
dbug Appium       "automationName": "automation-toolkit/JSON-RPC",
dbug Appium       "platformNames": [
dbug Appium         "Kepler"
dbug Appium       ],
dbug Appium       "mainClass": "KeplerDriver"
dbug Appium     }
dbug Appium   },
dbug Appium   "plugins": {},
dbug Appium   "schemaRev": 4
dbug Appium }
2.2.2

check performance doctor

% vega exec perf doctor --app-name=jp.happyon.android
Spawning /Users/tabuchinobuyuki/vega/sdk/vega-sdk/main/0.22.5875/state/kepler-telemetry/telemetry with args: ['-baseDir', '/Users/tabuchinobuyuki/vega/sdk/vega-sdk/main/0.22.5875/state/kepler-telemetry', '-sendLogsToFile']
Telemetry service started with PID: 29214
Data successfully appended to file

 √ Firmware: Stable build (callie-user OS 1.1 (TV Ship day60/91)).
 ! Network: Not connected. Please check Wi-Fi settings on the target device
 √ Free disk space: 11.99 GB available.
 √ Appium: Installed (version 2.2.2)
 √ Appium driver for Kepler: Installed - kepler@3.30.0 [installed (npm)]
 √ jp.happyon.android is installed.

Collecting CPU (4 cores) and Memory data...
 √ Max User CPU usage at 81.20%
 √ Max System CPU usage at 31.60%
 √ Average User CPU usage at 17.28%
 √ Average System CPU usage at 9.20%
 √ Min memory available at 65.22%
 √ Average memory available at 66.17%

 ! Device: Not ready for performance testing. Please review lines with X (error) and ! (warnings) symbols.

check adb path

% adb --help
Android Debug Bridge version 1.0.41
Version 36.0.2-14143358
Installed as /opt/homebrew/bin/adb
Running on Darwin 25.3.0 (arm64)

5. Logs or crash report

(Please make sure to provide relevant logs as attachment)

  • i don’t find ExtensionLogs

    % less ~/.vscode/extensions/amazon-devices.kepler-studio-0.22.2-darwin-arm64/
    ExtensionLogs
    /Users/tabuchinobuyuki/.vscode/extensions/amazon-devices.kepler-studio-0.22.2-darwin-arm64/ExtensionLogs: No such file or directory
    

6. Environment

Please fill out the fields related to your bug below:

  • SDK Version: Active SDK Version: 0.22.5875Vega CLI Version: 1.2.18 (also 0.22.5600, 0.22.6006 not working)

  • App State: [Foreground]

  • OS Information: Please ssh into the device via vega exec vda shell (or kepler exec vda shell for v0.21 and earlier) and copy the output from cat /etc/os-release into the answer section below. Note, if you don’t have a simulator running or device attached, the command will respond with vda: no devices/emulators found

    $ cat /etc/os-release
    NAME="OS"
    OE_VERSION="4.0.0"
    OS_MAJOR_VERSION="1"
    OS_MINOR_VERSION="1"
    RELEASE_ID="14"
    OS_VERSION="1.1"
    BRANCH_CODE="TV Ship day60"
    BUILD_DESC="OS 1.1 (TV Ship day60/91)"
    BUILD_FINGERPRINT="4.0.216859.0(3072cab629675a74)/91N:user/release-keys"
    BUILD_VARIANT="user"
    BUILD_TAGS="release-keys"
    BUILD_DATE="Wed Jan 28 22:43:49 UTC 2026"
    BUILD_TIMESTAMP="1769640229"
    VERSION_NUMBER="1401010009120"
    

:backhand_index_pointing_right: Additional Context


Any Additional Context you would like to provide?
Add any other relevant information, such as recent updates to the SDK, dependencies, or device OS that may affect the bug.

It works on an Intel-based Mac, but it did not work on an Apple silicon (M1/M2/M3) Mac.

Hello @nobuyuki.tabuchi

I’m looking into this issue and will circle back to you for more information or with updates.

Warm regards,
Ivy

Hi @nobuyuki.tabuchi ,

The KPI Visualizer error is coming from here:

 if not _KEPLER_DRIVER_INSTALL_PATTERN.findall(
            re.sub(_KEPLER_DRIVER_LIST_STDOUT_ANSI_CODE, "", drivers_installed.stderr)):
            raise FatalError(
                f"Appium Kepler Driver is not found in the platform. Please follow instruction "
                f"in {DOC_KEPLER_APPIUM_URL} to "
                f"install Appium Kepler Driver.") 

Looking at 4.a. that you have shared above:

% which appium  
/Users/tabuchinobuyuki/.nodenv/shims/appium 

The command that is executed by KPI Visualizer that is failing is:
<appium path> driver list

Can you please run which appium and then use the output of that and add driver list ?

Example using my machine:

shenoy@bcd07445a6be ~ % which appium
/Users/shenoy/.nvm/versions/node/v22.22.0/bin/appium
# Note: Use full path of `which appium`
shenoy@bcd07445a6be ~ % /Users/shenoy/.nvm/versions/node/v22.22.0/bin/appium driver list
dbug Appium Parsed manifest file at /Users/shenoy/.appium/node_modules/.cache/appium/extensions.yaml: {
dbug Appium   "drivers": {
dbug Appium     "kepler": {
dbug Appium       "pkgName": "@amzn/appium-kepler-driver",
dbug Appium       "version": "3.31.0",
dbug Appium       "installType": "local",
dbug Appium       "installSpec": "/Users/shenoy/.kepler_appium/AKDInstallation/src/AppiumKeplerDriver",
dbug Appium       "installPath": "/Users/shenoy/.kepler_appium/AKDInstallation/src/AppiumKeplerDriver",
dbug Appium       "appiumVersion": "^2.2.2",
dbug Appium       "automationName": "automation-toolkit/JSON-RPC",
dbug Appium       "platformNames": [
dbug Appium         "Kepler"
dbug Appium       ],
dbug Appium       "mainClass": "KeplerDriver"
dbug Appium     }
dbug Appium   },
dbug Appium   "plugins": {},
dbug Appium   "schemaRev": 4
dbug Appium }
✔ Listing available drivers
- kepler@3.31.0 [installed (linked from /Users/shenoy/.kepler_appium/AKDInstallation/src/AppiumKeplerDriver)]
- uiautomator2 [not installed]
- xcuitest [not installed]
- mac2 [not installed]
- espresso [not installed]
- safari [not installed]
- gecko [not installed]
- chromium [not installed] 

You should also use the full path of appium in the command as shown below, since you have run appium --version.

which appium
<full path of appium> --version version

Example

shenoy@bcd07445a6be ~ % /Users/shenoy/.nvm/versions/node/v22.22.0/bin/appium --version
dbug Appium Parsed manifest file at /Users/shenoy/.appium/node_modules/.cache/appium/extensions.yaml: {
dbug Appium   "drivers": {
dbug Appium     "kepler": {
dbug Appium       "pkgName": "@amzn/appium-kepler-driver",
dbug Appium       "version": "3.31.0",
dbug Appium       "installType": "local",
dbug Appium       "installSpec": "/Users/shenoy/.kepler_appium/AKDInstallation/src/AppiumKeplerDriver",
dbug Appium       "installPath": "/Users/shenoy/.kepler_appium/AKDInstallation/src/AppiumKeplerDriver",
dbug Appium       "appiumVersion": "^2.2.2",
dbug Appium       "automationName": "automation-toolkit/JSON-RPC",
dbug Appium       "platformNames": [
dbug Appium         "Kepler"
dbug Appium       ],
dbug Appium       "mainClass": "KeplerDriver"
dbug Appium     }
dbug Appium   },
dbug Appium   "plugins": {},
dbug Appium   "schemaRev": 4
dbug Appium }
2.2.2

Warm regards,
Ivy

Hi, @Ivy_Mahajan

I ran the command. Could you take a look and confirm?

% which appium                                           
/Users/tabuchinobuyuki/.nodenv/shims/appium
% /Users/tabuchinobuyuki/.nodenv/shims/appium driver list
dbug Appium Parsed manifest file at /Users/tabuchinobuyuki/.appium/node_modules/.cache/appium/extensions.yaml: {
dbug Appium   "drivers": {
dbug Appium     "kepler": {
dbug Appium       "pkgName": "@amazon-devices/appium-kepler-driver",
dbug Appium       "version": "3.30.0",
dbug Appium       "installType": "npm",
dbug Appium       "installSpec": "@amazon-devices/appium-kepler-driver@3.30.0",
dbug Appium       "installPath": "/Users/tabuchinobuyuki/.appium/node_modules/@amazon-devices/appium-kepler-driver",
dbug Appium       "appiumVersion": "^2.2.2",
dbug Appium       "automationName": "automation-toolkit/JSON-RPC",
dbug Appium       "platformNames": [
dbug Appium         "Kepler"
dbug Appium       ],
dbug Appium       "mainClass": "KeplerDriver"
dbug Appium     }
dbug Appium   },
dbug Appium   "plugins": {},
dbug Appium   "schemaRev": 4
dbug Appium }
✔ Listing available drivers
- kepler@3.30.0 [installed (npm)]
- uiautomator2 [not installed]
- xcuitest [not installed]
- mac2 [not installed]
- espresso [not installed]
- safari [not installed]
- gecko [not installed]
- chromium [not installed]

Kind regards, Nobuyuki

Sure @nobuyuki.tabuchi , taking a look.

1 Like

Hi @nobuyuki.tabuchi

From what I can tell, the nodeenv installation could be causing issues.

The instructions for installing Node.js are here.
“Node.js: Download and install Node.js (version 18.x or later)” from this link.

So, the you should probably switch to nvm.

Here’s a short python script (attached) to diagnose.
You can run this before switching to nvm so we can get the results with nodeenv.

To run, python3 diagnose_appium.py
Here is diagnose_appium.py

#!/usr/bin/env python
"""Appium driver detection diagnostic"""
from subprocess import run
import re

# Get appium path and run driver list
appium_path = run(["which", "appium"], encoding="utf-8", capture_output=True).stdout.strip()
result = run([appium_path, "driver", "list"], encoding="utf-8", capture_output=True)

print(f"Appium path: {appium_path}\n")

# Show raw outputs
print("="*60)
print(f"STDOUT ({len(result.stdout)} chars):")
print("="*60)
print(result.stdout if result.stdout else "(empty)")

print("\n" + "="*60)
print(f"STDERR ({len(result.stderr)} chars):")
print("="*60)
print(result.stderr[:800] if result.stderr else "(empty)")  # Limit to 800 chars

# Pattern matching
ANSI = r"\x1b\[[0-9;]*m"
PATTERN = r"kepler@\d+\.\d+\.\d+ \[installed .*?\]"

stdout_cleaned = re.sub(ANSI, "", result.stdout)
stderr_cleaned = re.sub(ANSI, "", result.stderr)

stdout_match = re.findall(PATTERN, stdout_cleaned)
stderr_match = re.findall(PATTERN, stderr_cleaned)

# Results
print("\n" + "="*60)
print("RESULTS:")
print("="*60)
print(f"Driver in STDOUT: {'Yes' if stdout_match else 'No'}")
print(f"Driver in STDERR: {'Yes' if stderr_match else 'No'}")
print(f"Test: {'PASS' if (stdout_match or stderr_match) else 'FAIL'}")
if stdout_match or stderr_match:
    print(f"Found: {(stdout_match or stderr_match)[0]}")

Example:

python3 diagnose_appium.py Appium path: /Users/shenoy/.nvm/versions/node/v22.22.0/bin/appium ============================================================ STDOUT (0 chars): ============================================================ STDERR (1291 chars): ============================================================ dbug Appium Parsed manifest file at /Users/shenoy/.appium/node_modules/.cache/appium/extensions.yaml: { dbug Appium "drivers": { dbug Appium "kepler": { dbug Appium "pkgName": "@amazon-devices/appium-kepler-driver", dbug Appium "version": "3.30.0", dbug Appium "installType": "npm", dbug Appium "installSpec": "@amazon-devices/appium-kepler-driver@3.30.0", dbug Appium "installPath": "/Users/shenoy/.appium/node_modules/@amazon-devices/appium-kepler-driver", dbug Appium "appiumVersion": "^2.2.2", dbug Appium "automationName": "automation-toolkit/JSON-RPC", dbug Appium "platformNames": [ dbug Appium "Kepler" dbug Appium ], dbug Appium "mainClass": "KeplerDriver" dbug Appium } dbug Appium }, dbug Appium "plugins":============================================================ RESULTS: ============================================================ Driver in STDOUT: No Driver in STDERR: Yes Test: PASS Found: kepler@3.30.0 [installed (npm)]

Warm regards,
Ivy