Skip to content

[bug]: Command PhaseScriptExecution failed with a nonzero exit code when running from Xcode #300

Open
@AhmedLSayed9

Description

@AhmedLSayed9

Is there an existing issue for this?

  • I have searched the existing issues.

CLI Version

1.0.1-dev.0

Firebase Tools version

13.8.1

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.19.6, on macOS 14.5 23F79 darwin-arm64, locale en-EG)
• Flutter version 3.19.6 on channel stable at /Users/bx777/.puro/envs/stable/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (5 weeks ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/bx777/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0

[✓] Connected device (4 available)
• Ahmed’s iPhone (mobile) • 00008020-00155D412243002E • ios • iOS 17.4.1 21E236
• iPhone 15 Pro Max (mobile) • 1B9F51D0-2C93-4450-B83A-EEC3AF400616 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.209

[✓] Network resources
• All expected network resources are available.

• No issues found!

Description

When running a flutter project with flavor from VSCode or command line it works fine.

But, when running from Xcode I get an error Command PhaseScriptExecution failed with a nonzero exit code,

Using the Xcode report navigator, it shows the cause of the error is:

/Users/bx777/Library/Developer/Xcode/DerivedData/Runner-efucnxnpxngwpuawulskwwbebelt/Build/Intermediates.noindex/Runner.build/Debug-dev-iphonesimulator/Runner.build/Script-53713B544D4D72BE6CC51AC1.sh: line 5: flutterfire: command not found

Steps to reproduce

  1. Run a project with flavor using the following command:
flutter build ios --debug --flavor=dev --target=lib/main_dev.dart --dart-define-from-file=configs/dev.json
  1. It works find and run as expected
  2. Run again after the previous build success but using Xcode build this time
  3. The build fails and gives an error

Expected behavior

I expect it to run normally using Xcode build after a normal flutter build ios command "which generates and pass dart environment variables into Xcode build".

Screenshots

Screenshot 2024-05-20 at 8 38 40 PM

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs AttentionOP created or responded to issue and it needs attention.bugSomething isn't workingkeep openquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions