title: Flutter: Command PhaseScriptExecution failed with a nonzero exit code
body: <p>It's an app in production. I've changed some logic trying to obtain dateTime that I have localized changing it to another country, then suddenly there were some error saying something about dart html but I don't remember exactly what, so I tried to rebuild the project and it was complaining about using new build system and so far I tried:</p>
  
  <ul>
  <li>changing the system to legacy</li>
  <li>flutter clean</li>
  <li>udate cocoapods.</li>
  <li>remove podfile.lock</li>
  <li>pod update</li>
  <li>pod install</li>
  <li>packages upgrade</li>
  <li>flutter upgrade</li>
  </ul>
  
  <p>None of theses did the work.</p>
  
  <p>When changed to legacy there were like 13 errors one of them complaining that dart:html not found, so I've added it to dependencies and dev dev dependencies and still nothing.
  I also commented the intl package because I was using it when that happened and did packages get and nothing.</p>
  
  <p>Any ideas how to deal with this?</p>
  
  <p>Here is the full console Xcode's output:</p>
  
  <pre><code>&gt;     2020-03-16 17:55:17.549 xcodebuild[56626:765857]  DTDeviceKit: deviceType from 3ad4f96e876e8222a72563420303530067367818 was NULL
  &gt;     ** BUILD FAILED **
  &gt; 
  &gt; 
  &gt; Xcode's output: ↳
  
  
  
    **Skipped Warnings about deprecated methods, because of char limits and previously builds despite the warnings.** 
  
  
  &gt; 
  &gt;     Compiler message:
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/src/http_request_data_reader.dart:11:8:
  &gt; Error: Not found: 'dart:html'
  &gt;     import 'dart:html';
  &gt;            ^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:6:8:
  &gt; Error: Not found: 'dart:html'
  &gt;     import 'dart:html';
  &gt;            ^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/src/http_request_data_reader.dart:28:10:
  &gt; Error: Type 'HttpRequest' not found.
  &gt;       Future&lt;HttpRequest&gt; _getString(String url, HttpRequest xhr) {
  &gt;              ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/src/http_request_data_reader.dart:28:46:
  &gt; Error: Type 'HttpRequest' not found.
  &gt;       Future&lt;HttpRequest&gt; _getString(String url, HttpRequest xhr) {
  &gt;                                                  ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:34:18:
  &gt; Error: 'HttpRequest' isn't a type.
  &gt;       final _xhrs = &lt;HttpRequest&gt;{};
  &gt;                      ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/src/http_request_data_reader.dart:20:23:
  &gt; Error: Method not found: 'HttpRequest'.
  &gt;         var request = new HttpRequest();
  &gt;                           ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/src/http_request_data_reader.dart:28:46:
  &gt; Error: 'HttpRequest' isn't a type.
  &gt;       Future&lt;HttpRequest&gt; _getString(String url, HttpRequest xhr) {
  &gt;                                                  ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/src/http_request_data_reader.dart:29:35:
  &gt; Error: 'HttpRequest' isn't a type.
  &gt;         var completer = new Completer&lt;HttpRequest&gt;();
  &gt;                                       ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:58:34:
  &gt; Error: 'Blob' isn't a type.
  &gt;           var blob = xhr.response as Blob ?? Blob([]);
  &gt;                                      ^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:46:15:
  &gt; Error: The method 'HttpRequest' isn't defined for the class
  &gt; 'BrowserClient'.
  &gt;      - 'BrowserClient' is from 'package:http/src/browser_client.dart' ('../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart').
  &gt;     Try correcting the name to the name of an existing method, or defining a method named 'HttpRequest'.
  &gt;         var xhr = HttpRequest();
  &gt;                   ^^^^^^^^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:58:42:
  &gt; Error: The method 'Blob' isn't defined for the class 'BrowserClient'.
  &gt;      - 'BrowserClient' is from 'package:http/src/browser_client.dart' ('../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart').
  &gt;     Try correcting the name to the name of an existing method, or defining a method named 'Blob'.
  &gt;           var blob = xhr.response as Blob ?? Blob([]);
  &gt;                                              ^^^^
  &gt;     ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:59:20:
  &gt; Error: The method 'FileReader' isn't defined for the class
  &gt; 'BrowserClient'.
  &gt;      - 'BrowserClient' is from 'package:http/src/browser_client.dart' ('../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart').
  &gt;     Try correcting the name to the name of an existing method, or defining a method named 'FileReader'.
  &gt;           var reader = FileReader();
  &gt;                        ^^^^^^^^^^
  &gt;     Unhandled exception:
  &gt;     FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml;
  &gt; message=StandardFileSystem only supports file:* and data:* URIs)
  &gt;     #0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
  &gt;     #1      asFileUri (package:vm/kernel_front_end.dart:604:37)
  &gt;     #2      writeDepfile (package:vm/kernel_front_end.dart:799:21)
  &gt;     &lt;asynchronous suspension&gt;
  &gt;     #3      FrontendCompiler.compile (package:frontend_server/frontend_server.dart:472:15)
  &gt;     &lt;asynchronous suspension&gt;
  &gt;     #4      _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:38:22)
  &gt;     #5      starter (package:flutter_frontend_server/server.dart:149:27)
  &gt;     #6      main (file:///b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30)
  &gt;     #7      _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:305:32)
  &gt;     #8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
  &gt; 
  &gt;     Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
  &gt;     Failed to build bundle.
  &gt;     Failed to package /Users/[user]/StudioProjects/[projectName]/ios/...
  &gt;     Command PhaseScriptExecution failed with a nonzero exit code
  &gt;     note: Using new build system
  &gt;     note: Planning build
  &gt;     note: Constructing build description
  &gt; 
  &gt; Could not build the precompiled application for the device.
  &gt; 
  &gt; Error launching application on [user].
  </code></pre>
  
  <p>EDIT: I also have "platform :ios, '11.0'" in my Podfile and iOS Deployment Target set to 11.0 on Pods settings.</p>
  
  <p>EDIT 2: Here are the packages I use:</p>
  
  <blockquote>
    <p>dependencies: flutter: sdk: flutter</p>
    
    <p>flutter_localizations: sdk: flutter</p>
    
    <p>flutter_cupertino_localizations: ^1.0.1</p>
    
    <p>geoflutterfire: ^2.0.3+5</p>
    
    <p>firebase_storage: ^3.0.6</p>
    
    <p>cloud_firestore: ^0.12.9+6</p>
    
    <p>firebase_core: ^0.4.0+9</p>
    
    <p>firebase_auth: ^0.14.0+5</p>
    
    <p>firebase_messaging: ^6.0.9</p>
    
    <p>firebase_database: ^3.0.7</p>
    
    <p>firebase_admob: ^0.9.0+7</p>
    
    <p>flutter_facebook_login: ^3.0.0</p>
    
    <p>font_awesome_flutter: ^8.5.0</p>
    
    <p>image_picker: ^0.6.1+11</p>
    
    <p>image: ^2.1.4</p>
    
    <p>rxdart: ^0.22.1</p>
    
    <p>location: ^2.3.5</p>
    
    <p>google_maps_flutter: ^0.5.20+1</p>
    
    <p>geocoder: ^0.2.1</p>
    
    <p>google_sign_in: ^4.0.11</p>
    
    <p>provider: ^4.0.4</p>
    
    <p>flutter_inapp_purchase: ^2.0.4</p>
    
    <p>http: ^0.12.0+4</p>
    
    <p>url_launcher: ^5.2.5</p>
    
    <p>intl: ^0.16.0</p>
    
    <p>cloud_functions: ^0.4.1+4</p>
    
    <p>apple_sign_in: ^0.1.0</p>
    
    <p>flutter_signin_button: ^1.0.0</p>
    
    <p>json_annotation: ^3.0.1</p>
    
    <p>notification_permissions: ^0.4.4</p>
    
    <p>html_unescape: ^1.0.1+3</p>
    
    <p>cupertino_icons: ^0.1.2</p>
    
    <p>dev_dependencies: 
    flutter_test:  sdk:  flutter build_runner: ^1.7.3 json_serializable:
    ^3.2.5</p>
  </blockquote>