Repository navigation
[gen-l10n] Failed to complete the generation when FLUTTER_STORAGE_BASE_URL is overridden #119593
Description
Activity
- addedc: regressionIt was better in the past than it is nowIt was better in the past than it is nowtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)
on Jan 31, 2023 cc @thkim1011 I'm going to submit a quick fix to use a warning instead of an error for the storage override.
Reacted by 友人A, Dcz, Nero Song, longyujun and ricky pangWorkaround steps:
- Change the below line to
printWarning.
_logger.printError( - Delete
flutter_tools.snapshotandflutter_tools.stampunder the${path_to_flutter_sdk}/bin/cache. - Rerun any Flutter commands.
Reacted by conghaonet- Change the below line to
Similar issue: #119435
Workaround steps:
- Change the below line to
printWarning.
_logger.printError( - Delete
flutter_tools.snapshotandflutter_tools.stampunder the${path_to_flutter_sdk}/bin/cache. - Rerun any Flutter commands.
It is worked!
- Change the below line to
- changed the title
[-][gen-l10n] Failed to complete the generation is `FLUTTER_STORAGE_BASE_URL` is overridden[/-][+][gen-l10n] Failed to complete the generation when `FLUTTER_STORAGE_BASE_URL` is overridden[/+]on Jan 31, 2023 Working on a fix right now.
Reacted by M Atheer@thkim1011 thanks so much for the quick fix! Could you also request a cherrypick to the stable channel via the issue template?
@thkim1011 thanks so much for the quick fix! Could you also request a cherrypick to the stable channel via the issue template?
@thkim1011 thanks so much for the quick fix! Could you also request a cherrypick to the stable channel via the issue template?
Thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Mar 3, 2023 - addedP0Critical issues such as a build break or regressionCritical issues such as a build break or regressionand removed
on Jun 28, 2023
The issue is breaking every user that is using localizations and a custom
FLUTTER_STORAGE_BASE_URL.This also happens with
flutter pub getif the l10n generation is synthetic.The tool will report
Found syntax errorsbut not any actual syntax errors.Related issues:
flutter gen-i10nthrowsFound syntax errors.after upgrading to 3.7.0 (mostly affecting china mirror) #119435Root cause
When
FLUTTER_STORAGE_BASE_URLis being overridden, the cache getter will try to raise an error to STDERR that the user is using a custom storage base.flutter/packages/flutter_tools/lib/src/cache.dart
Lines 523 to 526 in 5b6572f
But using an error print will cause the generate tool recognized as an exception.
flutter/packages/flutter_tools/lib/src/localizations/gen_l10n.dart
Lines 1249 to 1252 in 5b6572f
And when it's using synthetic package,
flutter pub getwill also raise exceptions.flutter/packages/flutter_tools/lib/src/dart/generate_synthetic_packages.dart
Lines 61 to 67 in 5b6572f
Steps to Reproduce
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cnin the terminal.flutter create test_l10nflutter pub getorflutter gen-l10nflutter doctor -v