Skip to content

flutter attach doesn't connect after the flutter module's VM/engine started #52975

Description

@xster

Tested via https://github.com/flutter/samples/tree/master/add_to_app/android_fullscreen and https://github.com/flutter/samples/tree/master/add_to_app/flutter_module.

Seems to occur both on master and on stable. flutter attach works on Android if started before the Flutter engine / service isolate starts. But after the engine is already running, flutter attach will way for a connection forever.

However, the observatory URL prompt was present in the 'past' logcat

13:43:57.678 30387 30553 I flutter : Observatory listening on http://127.0.0.1:37493/vtV6P-reD5I=/. The tool seems to not be picking it up.

Tested on API 29 and 30. Seems like a bug. We probably need e2e testing for this scenario.

Thanks for the heads up @redbrogdon. cc @blasten.

Activity

  1. added
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: existing-appsIntegration with existing apps via the add-to-app flow
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    on Mar 20, 2020
  2. added this to the March 2020 milestone on Mar 20, 2020
  3. xster commented on Mar 20, 2020

    @xster
    MemberAuthor

    Doing some more testing. It could be a TODAY / cherry pick candidate

  4. jonahwilliams commented on Mar 20, 2020

    @jonahwilliams
    Contributor

    Hasn't this always been the case for Android? See the old doc: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/doc/attach.md

  5. xster commented on Mar 20, 2020

    @xster
    MemberAuthor

    I think that doc should be made obsolete by a combination of #44637 and #45743

  6. blasten commented on Mar 21, 2020

    @blasten

    This is a regression. The problem is that this feature requires at least two kind of device log reader. One that doesn't filter out previous logs and one that does.

  7. xster commented on Mar 21, 2020

    @xster
    MemberAuthor

    Unusual though that it didn't seem to work on stable either. Wonder if it's due to a change from the android side too.

  8. blasten commented on Mar 21, 2020

    @blasten

    @xster it's probably due to cherrypicking some commits from master into stable.

  9. xster commented on Mar 21, 2020

    @xster
    MemberAuthor

    Good call @blasten. It was caused by #50488 which was the last commit onto the stable branch.

    We should cherry-pick a fix onto stable (and add more tests 🙂).

  10. xster commented on Mar 21, 2020

    @xster
    MemberAuthor

    Or this one more specifically #45743

  11. xster commented on Mar 21, 2020

    @xster
    MemberAuthor

    I vaguely remember that conversation now. Did we essentially break flutter attach on tot with #45743 but since we already cut stable, we merged it to fix benchmarks on head and gave us a few weeks to fix it again before the next cut but never came back to it?

  12. self-assigned this
    on Mar 24, 2020
  13. zanderso commented on Mar 24, 2020

    @zanderso
    Member

    @xster @blasten Sorry I'm having a little trouble following the discussion. My understanding is that this is something that might have worked by accident in the past. If that's not correct, do we know how it broke? Is it broken on master or just on stable following the hotfix?

    If it never worked on purpose, I'm wondering if this should be marked 'regression' and 'TODAY'.

    Thanks!

  14. xster commented on Mar 24, 2020

    @xster
    MemberAuthor

    The timeline was that it worked on 1.12.13 through hotfix 7. We broke it on master to fix #45732 since stable was already cut but didn't get back to unbreak it in master and the breaking commit got into stable in hotfix 8 as well.

  15. pcsosinski commented on Mar 24, 2020

    @pcsosinski
  16. xster commented on Mar 24, 2020

    @xster
    MemberAuthor

    I think it should be limited, since I'm changing flutter attach on Android (where the breakage is). Though I'm happy to let it sit on dev for a week too if needed.

  17. jmagman commented on Mar 25, 2020

    @jmagman
    Member

    Reopening, #53153 was reverted. flutter_attach_test_android was failing on multiple agents.

    flutter_attach_test_android_0c5ffdc_4.log

  18. lock commented on Apr 26, 2020

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  19. locked and limited conversation to collaborators on Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: existing-appsIntegration with existing apps via the add-to-app flowc: regressionIt was better in the past than it is nowcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.platform-androidAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions