<p dir="auto">When Flutter is running in CI under a minimalist Docker container that bizarrely decided to use C as its locale setting, many commands blow up</p>
<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li><code class="notranslate">docker run -ti circleci/android:api-27-alpha bash</code></li>
<li><code class="notranslate">git clone https://github.com/flutter/flutter &amp;&amp; export PATH="$PATH:$PWD/flutter/bin"</code></li>
<li><code class="notranslate">flutter create foo</code></li>
</ol>
<p dir="auto">Crashes with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="## exception

ArgumentError: Invalid argument(s): Invalid locale 'C.UTF-8'

#0      Intl._throwLocaleError (package:intl/intl.dart:231)
#1      Intl.verifiedLocale (package:intl/intl.dart:225)
#2      Intl.verifiedLocale (package:intl/intl.dart:210)
#3      new NumberFormat._forPattern (package:intl/src/intl/number_format.dart:486)
#4      new NumberFormat.decimalPattern (package:intl/src/intl/number_format.dart:175)
#5      kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:103)
#6      kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:103)
#7      getElapsedAsMilliseconds (package:flutter_tools/src/base/utils.dart:111)
#8      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:217)
&lt;asynchronous suspension&gt;
#9      CommandRunner.runCommand (package:args/command_runner.dart:194)
&lt;asynchronous suspension&gt;
#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:284)
&lt;asynchronous suspension&gt;
#11     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:109)
#12     new Future.sync (dart:async/future.dart:222)
#13     CommandRunner.run (package:args/command_runner.dart:109)
#14     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:166)
#15     run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:89)
&lt;asynchronous suspension&gt;
#16     AppContext._run (package:flutter_tools/src/base/context.dart:76)
&lt;asynchronous suspension&gt;
#17     AppContext.runInZone.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:66)
#18     _rootRun (dart:async/zone.dart:1126)
#19     _CustomZone.run (dart:async/zone.dart:1023)
#20     runZoned (dart:async/zone.dart:1501)
#21     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)"><pre class="notranslate"><code class="notranslate">## exception

ArgumentError: Invalid argument(s): Invalid locale 'C.UTF-8'

#0      Intl._throwLocaleError (package:intl/intl.dart:231)
#1      Intl.verifiedLocale (package:intl/intl.dart:225)
#2      Intl.verifiedLocale (package:intl/intl.dart:210)
#3      new NumberFormat._forPattern (package:intl/src/intl/number_format.dart:486)
#4      new NumberFormat.decimalPattern (package:intl/src/intl/number_format.dart:175)
#5      kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:103)
#6      kMillisecondsFormat (package:flutter_tools/src/base/utils.dart:103)
#7      getElapsedAsMilliseconds (package:flutter_tools/src/base/utils.dart:111)
#8      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:217)
&lt;asynchronous suspension&gt;
#9      CommandRunner.runCommand (package:args/command_runner.dart:194)
&lt;asynchronous suspension&gt;
#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:284)
&lt;asynchronous suspension&gt;
#11     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:109)
#12     new Future.sync (dart:async/future.dart:222)
#13     CommandRunner.run (package:args/command_runner.dart:109)
#14     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:166)
#15     run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:89)
&lt;asynchronous suspension&gt;
#16     AppContext._run (package:flutter_tools/src/base/context.dart:76)
&lt;asynchronous suspension&gt;
#17     AppContext.runInZone.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:66)
#18     _rootRun (dart:async/zone.dart:1126)
#19     _CustomZone.run (dart:async/zone.dart:1023)
#20     runZoned (dart:async/zone.dart:1501)
#21     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
</code></pre></div>
<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>Follow the first six steps of <a href="https://codelabs.developers.google.com/codelabs/flutter-firebase/" rel="nofollow">https://codelabs.developers.google.com/codelabs/flutter-firebase/</a></li>
<li>Mess up on the step to add <code class="notranslate">&lt;key&gt;CFBundleURLTypes&lt;/key&gt;</code>, for example paste it at the wrong location in the XML tree</li>
<li>Run app</li>
</ol>
<p dir="auto">=&gt; the app crashes:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Syncing files to device iPhone X...                   1.0s

🔥  To hot reload your app on the fly, press &quot;r&quot;. To restart the app entirely, press &quot;R&quot;.
An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:8112/
For a more detailed help message, press &quot;h&quot;. To quit, press &quot;q&quot;.
[Firebase/Analytics][I-ACS032003] iAd framework is not linked. Search Ad Attribution Reporter is disabled.
[Firebase/Analytics][I-ACS023012] Firebase Analytics enabled
)
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010d12d1cb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00000001120cbf41 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010d1a1b95 +[NSException raise:format:] + 197
	3   Runner                              0x000000010c062681 -[GIDSignIn signInWithOptions:] + 242
	4   Runner                              0x000000010c05f06d -[GIDSignIn signIn] + 64
	5   Runner                              0x000000010befa555 -[GoogleSignInPlugin handleMethodCall:result:] + 1461
	6   Flutter                             0x000000010d9fe9b1 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 118
	7   Flutter                             0x000000010da11667 _ZN5shell15P&lt;…&gt;
Lost connection to device."><pre class="notranslate"><code class="notranslate">Syncing files to device iPhone X...                   1.0s

🔥  To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:8112/
For a more detailed help message, press "h". To quit, press "q".
[Firebase/Analytics][I-ACS032003] iAd framework is not linked. Search Ad Attribution Reporter is disabled.
[Firebase/Analytics][I-ACS023012] Firebase Analytics enabled
)
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010d12d1cb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00000001120cbf41 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010d1a1b95 +[NSException raise:format:] + 197
	3   Runner                              0x000000010c062681 -[GIDSignIn signInWithOptions:] + 242
	4   Runner                              0x000000010c05f06d -[GIDSignIn signIn] + 64
	5   Runner                              0x000000010befa555 -[GoogleSignInPlugin handleMethodCall:result:] + 1461
	6   Flutter                             0x000000010d9fe9b1 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 118
	7   Flutter                             0x000000010da11667 _ZN5shell15P&lt;…&gt;
Lost connection to device.
</code></pre></div>
<p dir="auto">Can we fail more graciously?</p>