Skip to content

Loading notification does not disappear after app launches in release mode (or profile mode for web) #3338

Closed

Description

@DanTup

Running in profile mode for web seems to get stuck with this notification. Split from #3206

Activity

  1. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    on May 13, 2021
  2. added this to the v3.23.0 milestone on May 13, 2021
  3. DanTup commented on May 13, 2021

    @DanTup
    MemberAuthor

    It looks like this may be because we never get an app.debugPort messages from Flutter when launching profile mode on the web.

  4. DanTup commented on May 13, 2021

    @DanTup
    MemberAuthor

    @grouma @jacob314 should there be an available VM Service for a web app running with --profile? For non-web it seems there is, but for web there's no app.debugPort event from Flutter (flutter run -d ios --machine --profile will send one, but flutter run -d chrome --machine --profile will not).

  5. grouma commented on May 13, 2021

    @grouma
    Member

    I'm not familiar with the profile flag. Does that imply DDC? Note that package:dwds only works with DDC.

  6. DanTup commented on May 13, 2021

    @DanTup
    MemberAuthor

    My understanding for non-web is that Profile mode is "almost a release mode" but still has some code to enable running profiling tools etc.

    package:dwds only works with DDC.

    Ah, that's probably the issue here then. https://flutter.dev/docs/testing/build-modes says that a web app in profile mode is compiled with dart2js. In that case, Dart-Code should probably be aware that it's not going to get a VM Service URI for a web app in debug mode, and behave accordingly.

  7. jacob314 commented on May 13, 2021

    @jacob314

    Profile mode is Dart2JS. Profile mode is expected to match the characteristics of the release build app.

  8. grouma commented on May 13, 2021

    @grouma
    Member

    Yeah that sounds like the issue. Long term we want to support better debugging tools for Dart2JS but it isn't a current priority.

  9. amorenew commented on May 13, 2021

    @amorenew

    @grouma

    but it isn't a current priority

    Do you mean this issue or the debugging tools for Dart2JS in general?

  10. grouma commented on May 13, 2021

    @grouma
    Member

    Debugging tools for Dart2JS.

  11. changed the title [-]Flutter web app stuck "Compiling lib\main.dart for the Web..." when running in profile mode[/-] [+]Loading notification does not disappear after app launches in release mode (or profile mode for web)[/+] on May 17, 2021
  12. DanTup commented on May 17, 2021

    @DanTup
    MemberAuthor

    This seems to affect Release mode for all platforms too - because we use the VM service as a signal for the app having finished loading, anything without a VM service will leave the loading toast visible.

  13. DanTup commented on May 17, 2021

    @DanTup
    MemberAuthor

    @grouma @jonahwilliams I've fixed this by not expecting to get a VM Service (app.debugPort from flutter run --machine) for all release mode runs, or for profile mode on the web. However it meant Dart-Code now has to know whether:

    • Web profile mode will have a VM Service
    • Which devices are web devices

    This doesn't seem ideal (although it may be slightly simpler if/when the debug adapter moves into flutter_tools), but I'm not sure there's an easy alternative. We may need to update this if either of those things change in future.

  14. amr-eniou-3r commented on May 17, 2021

    @amr-eniou-3r

    @DanTup By this fix, Do I will be able to connect profile mode to Dev tools for Flutter web?

  15. DanTup commented on May 17, 2021

    @DanTup
    MemberAuthor

    @amr-eniou-3r not when running on web - my understanding from @grouma's comments above it that profile-mode on Web does not support the VM Service and therefore is not currently usable with DevTools. Profile mode for non-web should work though.

    This fix just prevents the loading notification from hanging around after the app launches (since it was previously waiting for a debugger connection that would never happen).

  16. amr-eniou-3r commented on May 17, 2021

    @amr-eniou-3r

    @grouma @DanTup I wonder if you could give me the link for the issue of profile mode for Flutter web which I should subscribe to?

  17. grouma commented on May 17, 2021

    @grouma
    Member

    @grouma @DanTup I wonder if you could give me the link for the issue of profile mode for Flutter web which I should subscribe to?

    I'm not sure if we have a canonical one. @nshahan may know?

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

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions