Flutter - Command PhaseScriptExecution failed with a nonzero exit code

7,914

Solution 1

What I did was to downgrade my flutter_svg package to flutter_svg: ^0.17.4, and the build passed.

I think for the case of flutter, when this error occurs it's most probably an issue on your packages. First run flutter pub get to see if it works, or try flutter clean. If all packages are working well, then your build in IOS will pass.

Solution 2

My case was like this, I used websafe_svg 1.1.0 which depends on flutter_svg ^0.17.4. and as suggested by @Lutaaya Huzaifah Idris this issue is fixed in latest update of flutter_svg: ^0.18.0.

So if you using websafe_svg then add below lines to solve this issue in pubspec.yaml,

dependency_overrides:
  flutter_svg: ^0.18.0

Solution 3

I've got the same issue, I just downgrade my flutter version works for me.

Get the latest tag version of the flutter from (https://github.com/flutter/flutter), Clickhere to see attached image

go to you flutter directory and run

git checkout v1.16.3

Once completes, go to your VS terminal and run flutter doctor. Let it complete. Restart your VS (editor). You can build it now.

Share:
7,914
Lutaaya Huzaifah Idris
Author by

Lutaaya Huzaifah Idris

I am Lutaaya Huzaifah Idris , a Core Experienced Mobile developer , I graduated at Islamic University in Uganda while offering Bachelors of Science in Computer Science. I love to keep the code in the air. If you need any mobile software just send me a hello and we communicate.

Updated on December 21, 2022

Comments

  • Lutaaya Huzaifah Idris
    Lutaaya Huzaifah Idris over 1 year

    I am trying to archive and build the flutter IOS project, so that in the end I generate the IPA, but am struggling because of this error, I tried to follow existing questions about the similar issue I couldn't get it :

    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
    class PictureStream with DiagnosticableMixin {
                             ^^^^^^^^^^^^^^^^^^^
    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
    abstract class PictureStreamCompleter with DiagnosticableMixin {
                                               ^^^^^^^^^^^^^^^^^^^
    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
    class PictureStream with DiagnosticableMixin {
          ^
    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in.
    abstract class PictureStreamCompleter with DiagnosticableMixin {
                   ^
    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'.
        super.debugFillProperties(properties);
              ^^^^^^^^^^^^^^^^^^^
    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined for the class 'PictureStreamCompleter'.
     - 'PictureStreamCompleter' is from 'package:flutter_svg/src/picture_stream.dart' ('../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'toStringShort'.
          ifPresent: _completer?.toStringShort(),
                                 ^^^^^^^^^^^^^
    ../../../desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:266:11: Error: Superclass has no method named 'debugFillProperties'.
        super.debugFillProperties(description);
              ^^^^^^^^^^^^^^^^^^^
    
    Command PhaseScriptExecution failed with a nonzero exit code
    

    What could be the cause of this issue ?