Hyejung
Hyejung

Reputation: 1272

PhaseScriptExecution [firebase_crashlytics]\ Crashlytics\ Upload\ Symbols

I tried to use firebase_crashlytics in my flutter package.

So I download flutter package.

flutter pub add firebase_crashlytics

Then I configure firebase configuration.

flutterfire configure

Android simulator works fine.

But Xcode build keeps being failed in this step.

PhaseScriptExecution [firebase_crashlytics]\ Crashlytics\ Upload\ Symbol

Error message is this: Command PhaseScriptExecution failed with a nonzero exit code

When I search regarding this, people say to change from a to b in file: frameworks.sh

a:

source="$(readlink "${source}")"

b:

source="$(readlink -f "${source}")"

enter image description here

But I already have '-f` in there.

How to solve this issue?

Upvotes: 2

Views: 1144

Answers (2)

Nehang Patel
Nehang Patel

Reputation: 71

I face the same issue when I configure flutterfire and firebase_crashlytics that Command PhaseScriptExecution failed with a nonzero exit code. After debugging I found that the Run script of Flutterfire Firebase crashlytic was not able to find the path of firebase.json. So I changed the path of the project location using Camelcase and restarted the project and it worked for me.

Follow the below steps

  1. Change the project location path using Camelcase (e.g. user/flutter/project)
  2. Run flutterfire configure
  3. Run project in Xcode

Upvotes: 0

mosh.jinton
mosh.jinton

Reputation: 348

Not sure if this is certainly related to your question, but I had the Command PhaseScriptExecution failed with a nonzero exit code issue after adding or maybe upgrading Crashlytics in my app. I fixed it by removing these lines from project.pbxproj:

C7C7EC9104EE905C996C5D94 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,

C7C7EC9104EE905C996C5D94 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
        isa = PBXShellScriptBuildPhase;
        buildActionMask = 2147483647;
        files = (
        );
        inputFileListPaths = (
        );
        inputPaths = (
        );
        name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
        outputFileListPaths = (
        );
        outputPaths = (
        );
        runOnlyForDeploymentPostprocessing = 0;
        shellPath = /bin/sh;
        shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
    };

The lines might not be exactly the same on your device, but should be similar.

Upvotes: 2

Related Questions