sarriaroman / FabricPlugin

Fabric.io plugin for Cordova or Phonegap
MIT License
197 stars 157 forks source link

Crashlytics.framework/run fails to detect current directory #73

Closed TheStalwart closed 7 years ago

TheStalwart commented 7 years ago

"run" script in Crashlytics.framework contains this line: DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

For some reason, this results in $DIR being set current working directory twice:

"/Users/stalwart/cordova/wand/platforms/ios/Wand/Plugins/cordova-fabric-plugin/Crashlytics.framework /Users/stalwart/cordova/wand/platforms/ios/Wand/Plugins/cordova-fabric-plugin/Crashlytics.framework

Which in turn results in build failure:

PhaseScriptExecution Fabric.io:\ Crashlytics /Users/stalwart/Library/Developer/Xcode/DerivedData/Wand-cngshsnffymdtgcgdwctyilbcdws/Build/Intermediates/ArchiveIntermediates/Wand/IntermediateBuildFilesPath/Wand.build/Debug-iphoneos/Wand.build/Script-8BA0F2975879458A915977F1.sh
    cd /Users/stalwart/cordova/wand/platforms/ios
    /bin/sh -c /Users/stalwart/Library/Developer/Xcode/DerivedData/Wand-cngshsnffymdtgcgdwctyilbcdws/Build/Intermediates/ArchiveIntermediates/Wand/IntermediateBuildFilesPath/Wand.build/Debug-iphoneos/Wand.build/Script-8BA0F2975879458A915977F1.sh
Wand/Plugins/cordova-fabric-plugin/Crashlytics.framework/run: line 18: /Users/stalwart/cordova/wand/platforms/ios/Wand/Plugins/cordova-fabric-plugin/Crashlytics.framework /Users/stalwart/cordova/wand/platforms/ios/Wand/Plugins/cordova-fabric-plugin/Crashlytics.framework/uploadDSYM: No such file or directory

Issue can be worked around by separating "cd" and "pwd" commands:

cd "$( dirname "${BASH_SOURCE[0]}" )"
DIR=$( pwd )

Is this an upstream Fabric SDK issue?

ghost commented 7 years ago

@TheStalwart i make a modification in code, this works fine: https://github.com/tiagoSAmaral/FabricPlugin/commit/027ecb4e27b7320d125b02cc85bc0287c2237d34

sarriaroman commented 7 years ago

Solved by @tiagoSAmaral

aniketmungse commented 5 years ago

The simplest way to get rid of that issue is instead of the last run keyword give the path till uploadDSYM eg "${PODS_ROOT}/Fabric/run" 123 123 give path as "${PODS_ROOT}/Fabric.framework/uploadDSYM" 123 123 and it doesn't even affects any configuration changes