You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DevTools Performance page fails to load + other issues on Flutter master when 'version' file is missing #5226
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.
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.
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.
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
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).
Activity
DanTup commentedon Aug 21, 2024
I'm not able to reproduce this:
Looking at the code, the only place that ID appears is here:
Dart-Code/src/shared/constants.ts
Line 176 in cecd4b5
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
versionfile 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/mainand still seeing this and have confirmed there is aversionfile in your repo, then it may be something else.kenzieschmoll commentedon Aug 21, 2024
This was likely the issue. I have the version file now, but when I pulled from master again and then ran
cat versionthe 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.
DanTup commentedon Aug 21, 2024
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.
[-]Cannot open DevTools Performance page in VS Code[/-][+]DevTools Performance page fails to load + other issues on Flutter master when 'version' file is missing[/+]Force run `flutter --help` after initializing Flutter to try to force…
DanTup commentedon Aug 22, 2024
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 runflutter --helpimmediately afterwards, since in my testing,flutter doctorcan cause theversionfile to be deleted, andflutter --helpcauses 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).Treat a missing Flutter version file as a high version number instead…