-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[localization][tests]: use-deferred-loading: true
throws _WidgetTypeFinder:<zero widgets with type "Scaffold"
exception
#90079
Comments
@cedvdb
Same with other one as well:
Also checked by directly running I verified this on latest stable (2.5.0) |
In the first branch Note: this is not a performance issue, this was mislabeled |
Actually I found a nice find to help debug this: When using the second repository (arb) which was working, if I use |
Thanks for the details. From console error log
From the same test file, if I comment out below snippet and run again, the same tests passes properly:
Is this a correct interpretation of the issue ? |
That is correct for the For the In any case, this shows something is wrong with the deferred file loading, be it manual or with generated files by flutter. |
use-deferred-loading: true
throws _WidgetTypeFinder:<zero widgets with type "Scaffold"
exception
Details
We have a simple unit test that's failing when it is copy pasted and tested twice.
EG:
We pinpointed the issue to the custom localization delegate used by the library. More specifically the deferred loading
Both test pass when using arb files with flutter --gen-l10n, one of two test pass when using
use-deferred-loading: true
One of the two test fail when loading a json for localization instead. So maybe
rootBundle.loadString
is at cause here.reproduce
We have two branch here that have been reduced to the minimum to reproduce the issue (at least in the test files);
This one fails when the second test is uncommented. The test is the only one remaining and is in test/_country_selector_test.dart
This one works with
use-deferred-loading: false
(or not specified) and does not work with it set to true. This can be set in l10n.yamlVersion:
flutter --version
Flutter 2.6.0-0.0.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision 83b9e99 (3 weeks ago) • 2021-08-23 19:03:21 +0200
Engine • revision d5adde0
Tools • Dart 2.15.0 (build 2.15.0-42.0.dev)
but I believe it happens on versions anterior to this one.
The text was updated successfully, but these errors were encountered: