Open jmagman opened 2 years ago
@jonasfj do you know who can take a look at this? We're hitting 23% flaky rates. https://github.com/flutter/flutter/issues/105609#issuecomment-1156665257
hmm, I'm guessing something is eating the error message.
Maybe, in flutter_tools
it's pretty hard to follow what messages are filtered and not.
Do we have a pubspec.yaml
, then maybe we can reproduce on a m1 locally? Though I suspect this is something else, or maybe a dirty exit or something.
Could it be a VM thing? I cannot off hand think of anything in pub that should be architecture specific...
Do we know if this started at some point - or was it always like that on M1?
@jmagman is there a way to run dart pub get
with FLUTTER_ROOT=/path/to/flutter
?
Looking at other error messages, I suspect that this might be flutter_tools
eating error messages.
I'm not sure https://github.com/dart-lang/pub/issues/3463 is related, but the error message detected by flutter is just .
.
@jmagman is there a way to run dart pub get with FLUTTER_ROOT=/path/to/flutter?
Alternatively to run flutter pub get --verbose
I ran flutter pub get
on flutter_tools
(each time removing the pubspec.lock
) 100 times on a M1-pro machine - and observed no flakyness - so it doesn't seem to be a universal problem for pub on M1.
I think there must be something more going on here in this specific instance.
There's no filtering in the tool AFAICT. (There's no filter
argument passed to batch
here: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/dart/pub.dart#L256).
I think pub is throwing an uncaught exception - that somehow makes 'dartdev' print a single '.' - why that is I'm still not sure - but I can reproduce by inserting an uncaught throw here: https://github.com/dart-lang/sdk/blob/main/pkg/dartdev/lib/dartdev.dart#L44.
I have no clue why that would happen flakily and why on a specific architecture.
It would probably clarify things immensely to run pub in --verbose
mode during the flake.
From the logs linked above, pub
is invoked as:
dart __deprecated_pub --verbose get --no-precompile
From the logs linked above,
pub
is invoked as:dart __deprecated_pub --verbose get --no-precompile
Hmm.
Then I think we want to modify the script try running dart pub get --verbose
instead of flutter pub get
to get more information.
It looks like dart __deprecated_pub
came from https://github.com/flutter/flutter/pull/89032.
So I'm exploring migrating from dart __deprecated_pub
to dart pub
in https://github.com/flutter/flutter/pull/106969. More details on blockers in that PR.
@rmacnak-google can you elaborate more on why you think this may have the same root cause as https://github.com/dart-lang/sdk/issues/49437? Do you think your patch may have fixed it?
Environment
Seen in Flutter CI
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_ios%20build_ios_framework_module_test/802/overview
Problem
pub get
is flaky on Flutter M1 Mac builders and is failing without a helpful error message. The same test is not flaking on x64 Macs.Tracked in https://github.com/flutter/flutter/issues/105609.
The test runs three times in https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8811953967788831233/+/u/run_build_ios_framework_module_test/test_stdout and the first two times fails.
Expected behavior
Actual behavior
Exit 255, error message is just a
.
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8811953967788831233/+/u/run_build_ios_framework_module_test/test_stdout