google / google/perfetto

Improve handling of connecting to localhost

Open
#7,425 2 comments 0 reactions 0 assignees View on GitHub
ui
Dominant language
C++
Stars
6.5k
Forks
868
Avg merge
2d 1h
Merged PRs (30d)
218

Description

Connecting to localhost from the UI unfortunately triggers Chrome's "Access other apps and services on this device" dialog. This has been happening for the past few months or so.

The problem with this dialog is manyfold:
1) We probe localhost:9001/status on UI startup to try and connect to the native accelerator. However, we do *not* explain to the user about this meaning that the dialog is *very* confusing and seems like we are unnecessarily asking the user for permission
2) When this permission is rejected (often because the user does not understand *why* permission is requiested), connections to locahost start failing silently and mysteriously so if you then want to open a trace from localhost:9001, things start failing without warning
3) If the above happens, it's very difficult for a user to understand how to actually recover this and be able to start using either the native accelerator or fetching traces from localhost:9001.

We should ideally design it such that:
1) The native accelerator probe is well understood and clear as to why it's needed (potentially we make it opt-in or something as well or show on nth startup etc)
2) If permission is rejected, the next time we probe, it becomes clear *why* nothing is happening and how to fix it

Contributor guide

Open the contributing guide

Research direction

Start by tracing the UI startup probe to localhost:9001/status and the code path used to open traces from localhost:9001. Review the issue discussion for context on the Chrome permission behavior. Done means the probe is clearly explained or appropriately gated, rejected permission produces actionable feedback, and users can recover accelerator and trace connections.

Written by the indexing model from the issue text.

Assessment

Domain
frontend, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.