Home > Software engineering >  XCode Command PhaseScriptExecution failed with a nonzero exit code - Mac M1 Max
XCode Command PhaseScriptExecution failed with a nonzero exit code - Mac M1 Max

Time:07-26

I've tried almost every solution on GitHub and StackOverflow, nothing is working. After changing from a Intel based mac to a M1 Max mac, my Flutter app stopped compiling, giving this weird error without any further detail. I'm attaching the XCode logs. I really need help please. Thank you!

Showing Recent Errors Only
PhaseScriptExecution Run\ Script /Users/alessandrodefendenti/Library/Developer/Xcode/DerivedData/Runner-deveoduanwnjibbunuscrmjquxnr/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh (in target 'Runner' from project 'Runner')
    cd /Users/alessandrodefendenti/Projects/Flutter/winefriends/ios
    *** exports here ***
    export variant\=normal
    /bin/sh -c /Users/alessandrodefendenti/Library/Developer/Xcode/DerivedData/Runner-deveoduanwnjibbunuscrmjquxnr/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh

/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/feature_discovery-0.14.1/lib/src/widgets/layout.dart:92:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((_) {
                   ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/feature_discovery-0.14.1/lib/src/widgets/layout.dart:112:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((_) {
                   ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:93:21: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
 - 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
    ServicesBinding.instance!.defaultBinaryMessenger
                    ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:96:23: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
 - 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
      ServicesBinding.instance!.defaultBinaryMessenger
                      ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:122:21: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
 - 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
    ServicesBinding.instance!.defaultBinaryMessenger
                    ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/multi_image_picker-4.8.01/lib/src/asset.dart:125:23: Warning: Operand of null-aware operation '!' has type 'ServicesBinding' which excludes null.
 - 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/services/binding.dart').
      ServicesBinding.instance!.defaultBinaryMessenger
                      ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:661:31: Error: Member not found: 'UnicodeChar'.
  int get UnicodeChar => Char.UnicodeChar;
                              ^^^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:662:38: Error: Setter not found: 'UnicodeChar'.
  set UnicodeChar(int value) => Char.UnicodeChar = value;
                                     ^^^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:664:29: Error: Member not found: 'AsciiChar'.
  int get AsciiChar => Char.AsciiChar;
                            ^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/win32-2.3.3/lib/src/structs.g.dart:665:36: Error: Setter not found: 'AsciiChar'.
  set AsciiChar(int value) => Char.AsciiChar = value;
                                   ^^^^^^^^^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-3.0.2/lib/flare_render_box.dart:167:26: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart').
        SchedulerBinding.instance?.cancelFrameCallbackWithId(_frameCallbackID);
                         ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-3.0.2/lib/flare_render_box.dart:170:28: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart').
          SchedulerBinding.instance?.scheduleFrameCallback(_beginFrame) ?? -1;
                           ^
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-3.0.2/lib/flare_render_box.dart:272:26: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/Applications/flutter/packages/flutter/lib/src/scheduler/binding.dart').
        SchedulerBinding.instance?.cancelFrameCallbackWithId(_frameCallbackID);
                         ^
Failed to package /Users/alessandrodefendenti/Projects/Flutter/winefriends.
Command PhaseScriptExecution failed with a nonzero exit code

CodePudding user response:

I think you are using an older flutter version which had WidgetBinding as a nullable value but in flutter 3 widgetbinding is non nullable. The feature discovery had been resolved to the latest version which probably works only in flutter 3 .

Try downgrading the feature discovery package that supports older version of flutter

  • Related