Skip to content

Disable toggleable service extension buttons while waiting for a response #3199

Open

Description

@kenzieschmoll

See "Show Guidelines" and "Highlight Oversize Images" in gif. It is not these two buttons specifically. This is inconsistent and I saw this issue with all these toggle buttons at some point.
buttons-bug

CC @alexlindroos

Activity

  1. tomgilder commented on Jul 14, 2021

    @tomgilder
    Contributor

    Doesn't look like this was introduced by Alex's PR - it's happening in the current release version:

    Screen.Recording.2021-07-14.at.10.13.42.mov

    We're investigating...

  2. tomgilder commented on Jul 14, 2021

    @tomgilder
    Contributor

    This seems to be caused by a long delay in toggling the service extension, see this log from the Chrome DevTools:

    Screen.Recording.2021-07-14.at.11.05.15.mov

    Flutter seems to have taken 9 seconds to respond to the request to enable baselines. I don't know enough about the internals of service extensions to figure out what's causing the delay.

  3. tomgilder commented on Jul 14, 2021

    @tomgilder
    Contributor

    I figured out what's causing this for me, here's a consistent way of reproducing it:

    1. The Flutter app you're debugging must be a macOS app
    2. Minimise the app you're debugging
    3. Wait 30 to 40 seconds

    Then the buttons start behaving in this way - it's because macOS puts the app into App Nap mode. You can can see if the app is napping using Activity Monitor, on the Energy tab.

    It also happens without minimising, if the app is just fully covered by another window.

    So hopefully you were debugging a Mac app @kenzieschmoll? 😁

  4. kenzieschmoll commented on Jul 14, 2021

    @kenzieschmoll
    MemberAuthor

    Thanks for investigating further. I was actually debugging an iOS app I'm pretty sure. Interesting that the service extensions are taking so long to respond CC @jacob314

  5. added
    P2
    on Aug 21, 2024
  6. kenzieschmoll commented on Aug 21, 2024

    @kenzieschmoll
    MemberAuthor

    This bug applies to all service extension buttons and most likely has to do with the service extensions not getting called while the device is paused. We could at least do a better job with the service extension elements in DevTools to disable the button while we wait for a response or something like that.

  7. changed the title [-]Inspector toggle buttons inconsistently respond to clicks[/-] [+]Disable toggleable service extension buttons while waiting for a response[/+] on Apr 21, 2026
  8. hkarmoush commented on Nov 30, 2026

    @hkarmoush
    Contributor

    I'd like to pick this up. Plan is to keep it on the app side in service_extension_widgets.dart: the toggle button group, the structured errors switch, and the service extension checkboxes would all stay disabled while the setServiceExtensionState request is in flight. Right now a second click before the first response comes back sends the same request again, and the UI ends up out of sync with the app.

    If the app is paused, the control would stay disabled until the call returns. That's the honest state. Avoiding calls while paused is the broader fix tracked in #9164, and I'd leave that out of this change. Does that sound right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2devtools-inspector-screentype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions