perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

[ui] Clicking "Show Debug Track" causes crash if no trace is open

Open cphlipot1 opened this issue 4 years ago • 3 comments

If we click "Show Debug Track" when no trace is currently open, it prints a stack trace and prompts the user to file a bug:

Viewed on: https://ui.perfetto.dev

Uncaught Error: Value doesn't exist
Error: Value doesn't exist
    at assertExists (https://ui.perfetto.dev/v25.0-d55a1685a/frontend_bundle.js:2180:15)
    at HTMLAnchorElement.<anonymous> (https://ui.perfetto.dev/v25.0-d55a1685a/frontend_bundle.js:113268:48)
    at EventDict.handleEvent (https://ui.perfetto.dev/v25.0-d55a1685a/frontend_bundle.js:1244:55)

If the user continues to navigate the UI after dismissing the message, they will see more crashes.

How to reproduce

  1. navigate to https://ui.perfetto.dev (issue current reproduces on stable, canary, and autopush)
  2. expand the "sample queries" in the bottom left
  3. click on "Show Debug Track"
  4. Observe the "Oops, something went wrong. Please file a bug." message

cphlipot1 avatar Jun 03 '22 22:06 cphlipot1

@octaviantu

LalitMaganti avatar Jun 13 '22 17:06 LalitMaganti

Thanks for filing! Will send a fix.

octaviantu avatar Jul 15 '22 15:07 octaviantu

The fix is on the autopush channel. It will be promoted to canary and stable in the following weeks.

octaviantu avatar Sep 15 '22 15:09 octaviantu