Skip to content

DevTools Performance page fails to load + other issues on Flutter master when 'version' file is missing #5226

Closed

Description

@kenzieschmoll

Screenshot 2024-08-20 at 12 23 38 PM

Version: 1.92.1 (Universal)
Commit: eaa41d57266683296de7d118f574d0c2652e1fc4
Date: 2024-08-07T20:16:39.455Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin x64 23.6.0

Dart extension: v3.95.20240801
Flutter extension: v3.95.20240801

Activity

  1. added this to the v3.96.0 milestone on Aug 21, 2024
  2. DanTup commented on Aug 21, 2024

    @DanTup
    Member

    I'm not able to reproduce this:

    image

    Looking at the code, the only place that ID appears is here:

    routeId: (flutterVersion) => !flutterVersion || versionIsAtLeast(flutterVersion, "2.3.1" /* 2.3.0-16.0? */) ? "performance" : "legacy-performance",

    That ID is used only when there is no Flutter SDK version, or it is less than 2.3.1. This makes me think we've failed to get your Flutter SDK version (which actually will probably affect many things, because we'll treat it like the oldest version of Flutter).

    Which branch of Flutter are you on? I filed flutter/flutter#142521 a while back that sometimes Flutter's main/master branch deletes the version file and it leads to issues like this. I did some digging into why it happens (and only for main/master) and noted them in the issue, although I don't know enough to know what the correct fix is.

    If you're not on master/main and still seeing this and have confirmed there is a version file in your repo, then it may be something else.

  3. added
    awaiting infoRequires more information from the customer to progress
    on Aug 21, 2024
  4. kenzieschmoll commented on Aug 21, 2024

    @kenzieschmoll
    Author

    This was likely the issue. I have the version file now, but when I pulled from master again and then ran cat version the version file was missing.

    Instead of defaulting to 'legacy-performance' when the version is not found, can we revert to 'performance' instead? It seems enough time has gone by that it would be better to break people on a really old version of Flutter rather than people on the bleeding edge.

  5. DanTup commented on Aug 21, 2024

    @DanTup
    Member

    Instead of defaulting to 'legacy-performance' when the version is not found, can we revert to 'performance' instead?

    We can, although a lot of stuff is broken in this mode (the sidebar won't be shown, we'll use the legacy DAPs that aren't being maintained, we won't start DTD). Maybe treating a missing / 0.0.0 version as 999.999.999 would actually be the best option (it's most likely Flutter master, which probably has all of the newest stuff), although I feel like we really need to fix that issue too 😄

    I'll do some testing - if we're going to do something here in the meantime, it would be best to handle more than just this page.

  6. removed
    awaiting infoRequires more information from the customer to progress
    on Aug 22, 2024
  7. changed the title [-]Cannot open DevTools Performance page in VS Code[/-] [+]DevTools Performance page fails to load + other issues on Flutter master when 'version' file is missing[/+] on Aug 22, 2024
  8. DanTup commented on Aug 22, 2024

    @DanTup
    Member

    I pushed two fixes for this:

    The first will use a magic version number (999.999.888) when a Flutter version file is missing so that we default to enabling new functionality instead of disabling.

    The second is when we force Flutter to initialize by calling flutter doctor (because - for example - the Dart SDK is missing), we will now run flutter --help immediately afterwards, since in my testing, flutter doctor can cause the version file to be deleted, and flutter --help causes it to come back. This is a hack until flutter/flutter#142521 is fixed, but I think it will reduce the chances of hitting this (and this fix results in the correct version number, rather than us using the magic version number).

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 devtoolsRelates to integration with Dart/Flutter DevToolsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions