KPI Visualizer fails to launch app

:backhand_index_pointing_right: Bug Description


1. Summary

KPI Visualizer (vega exec perf kpi-visualizer) fails to launch the test app on every iteration with “App launching failed, trying again…” error. Manual app launch via vega device launch-app works correctly on the same device and firmware.

App Name: (Confidential)
App Link on Amazon Appstore (found through Developer Console → Actions column in App List → View on Amazon.com): N/A (not yet published)

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. Connect a Callie device with firmware callie-user-external OS 1.1 (TV Ship day60/4460)
  2. Install a React Native for Vega app on the device
  3. Confirm the app is installed: vega device is-app-installed --appName returns installed
  4. Run KPI Visualizer:
    vega exec perf kpi-visualizer --kpi=cool-start-latency --app-name= --iterations=1 --test-duration=10
  5. Observe “App launching failed, trying again …” on every iteration

3. Observed Behavior

  • KPI Visualizer reports “App launching failed, trying again …” for every iteration
  • After retry, it reports “App is not running, skipping this iteration.” with PID=None
  • KPI report file is generated but contains no valid data
  • Opening the KPI report in VS Code Vega Extension shows “Failed to open performance data file. Invalid KPI Report File!”
  • The issue is 100% reproducible — not intermittent

4. Expected Behavior

KPI Visualizer should be able to launch the app and collect KPI data on this firmware version, as vega device launch-app can successfully launch the same
app on the same device.

4.a Possible Root Cause & Temporary Workaround

Possible Root Cause: KPI Visualizer’s internal app launch mechanism is incompatible with this firmware. The exact internal launch method is unknown, but
we note that the device-level vlcm launch-app command is also deprecated on this firmware:

$ vega exec vda -s  shell 'vlcm launch-app'
Please migrate to vmsgr send command.
CLI: Failed to launch (-1): 

It is unclear whether KPI Visualizer uses vlcm internally, but this may be related.

In contrast, vega device launch-app works correctly — it appears to use a different launch path that is compatible with the current firmware.

Workaround: None known. The app launch is handled internally by the KPI Visualizer and cannot be overridden by the user.

5. Logs or crash report

KPI Visualizer output:

Perf CLI Version: 0.22.0
Device: Callie Firmware: callie-user-external OS 1.1 (TV Ship day60/4460)
Using filtered Perfetto config, disabling CPU scheduling events (ftrace)
Installed KSPTService successfully
Waiting for trace daemons
Waiting 10/10…

Iteration 1…
Starting trace…
Starting test app…
App launching failed, trying again …
App is not running, skipping this iteration.
Please ensure that app '<app-component-id>' is installed on the device
Selecting PID=None appname=<app-component-id>
Missing app_pid
Running test…

Verification that the app launches correctly via other methods:

$ vega device launch-app --appName <app-component-id>                                                                                                     
Sending: pkg://<app-component-id>                      

App launches successfully

Verification that the app is installed:

$ vega device is-app-installed --appName <app-component-id>                                                                                               
<app-component-id> is installed on <device-serial>

Device-level vlcm command (for reference):

$ vega exec vda -s <device-serial> shell 'vlcm launch-app <app-component-id>'                                                                             
Please migrate to `vmsgr send` command. If you need to pass extra params     
in addition to the URI please get in touch.                                                                                                               
CLI: Failed to launch (-1): <app-component-id>

6. Environment

SDK Version:

  • Vega SDK: 0.22.5600
  • Perf CLI: 0.22.0
  • Appium: 2.2.2
  • Kepler Appium Driver: @amazon-devices/appium-kepler-driver@3.30.0

App State: Foreground

OS Information:

  • Device: Fire TV Stick 4K Select (Callie)
  • Firmware: callie-user-external OS 1.1 (TV Ship day60/4460)
  • Vega OS Version: 1.1

7. Example Code Snippet / Screenshots / Screengrabs


N/A — This is not an app code issue. The bug is in the KPI Visualizer tool’s internal app launch mechanism.

:backhand_index_pointing_right: Playback Issues


N/A

:backhand_index_pointing_right: Additional Context


  • vega exec perf doctor reports a false positive for the Network check (! Network: Not connected) even though the device has working internet connectivity
    (confirmed via ping -c 3 8.8.8.8 from device shell with 0% packet loss).
  • All other doctor checks pass (Appium, disk space, CPU, memory, app installation).
  • VDA can detect the device: vega exec vda devices returns the device correctly.

Hi @ishijima_tatsuki_1,

Thank you for the detailed bug report on the KPI Visualizer app launch issue.

Our team is investigating this issue and will provide an update as soon as we have more information.

To help us investigate further, could you please share your app’s vpkg file with your Amazon point of contact? This will help our team reproduce and diagnose the issue more effectively.

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya

Hi, @amen

I have conducted further investigation into the app launch failure and believe I have identified the root cause. I would like to share my findings and ask a specific question regarding the tool’s requirements.

Investigation Update

Through further testing, it has been identified that the KPI Visualizer’s launch failure is strictly dependent on the naming convention of the component.interactive.id in the manifest.toml.

  • Successful Case:
    • When component.interactive.id is defined as <packageId>.main. → KPI Visualizer successfully launches the app and collects performance data.
  • Failure Case:
    • When component.interactive.id is anything other than <packageId>.main (e.g., <packageId>.component). → The tool reports App launching failed, trying again ... and fails every iteration.

Analysis

KPI Visualizer’s internal implementation may be hardcoded to look for a component ending in .main, or it is implicitly appending .main when constructing the launch command.

Question

  1. Specification Confirmation:
    • Is there an inherent tool constraint or specification requiring the primary component ID to end in .main for the KPI Visualizer to function?

Temporary Workaround

If your app uses a custom component ID, you can enable KPI Visualizer measurements by temporarily renaming the component.interactive.id to <packageId>.main in your manifest.toml.

Warm regards,

Tatsuki

Hi @ishijima_tatsuki_1,

We’ve identified and fixed the KPI Visualizer app launch issue. The fix will be available in an upcoming release.

Thanks,
Aishwarya