andrewmarmion/bitrise-step-firebase-dsym-upload

Step is broken when Firebase is installed via SPM

Opened this issue · 14 comments

As per subject

This is related to this issue firebase/firebase-ios-sdk#6864. Once that is resolved then I will look at a solution for the step.

It looks like the related issue was marked resolved. Any update on fixing this step?

@mikeberlin unfortunately the current solution that has been proposed is more of a work around. I will look into it further, but I am open to PRs.

We had to set -derivedDataPath for xcodebuild to solve this. SourcePackages path is determined by the derived data path then.

Hey all, was there ever a clear fix for this? Im having trouble using the route in the linked issue and so can't get this step to pass

Currently this step only supports CocoaPods. To support SPM will require additional work.

Any update on this?

The ticket referenced above is closed as the suggestions their unblock us from locating the utility well, I can confirm. But this step is still broken and requires a fix to be unblocked on the CI.

@mohdabdurraafay As I mentioned before this step only supports CocoaPods, but I am open to PRs if it does not break existing functionality.

Hmm... just experiencing this issue also. Has there been an update on this? Thanks

No. This step only supports CocoaPods and does not support SPM.

I have figured out a hack to automate this process for the Bitsrise pipeline. I have found a script that will upload the dSYM files when you use SPM.

Copy the upload-symbols file and paste it into the below-listed location.

$FIREBASE_CRASH_ANALYTICS_LOCATION -gsp $GOOGLE_SERVICE_LOCATION -p ios $BITRISE_DSYM_PATH

GOOGLE_SERVICE_LOCATION: $BITRISE_SOURCE_DIR/PROJECT/Config/GoogleService/GoogleService-Info.plist
FIREBASE_CRASH_ANALYTICS_LOCATION: $BITRISE_SOURCE_DIR/PROJECT/Scripts/Firebase/upload-symbols
BITRISE_DSYM_PATH: Auto generated by bitrise

References:
https://sarunw.com/posts/upload-dsym-to-firebase-with-fastlane/#copy-upload-symbols-script
https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=ios&authuser=0&hl=en#upload-dsyms

image
image

Update:

When I pushed the change to Testflight I could not bundle the script file to be deployed.

So Instead of pasting the script file to the project, I added the script to Bitrise GENERIC FILE STORAGE and passed in the URL link and added a file downloader before the script and it was able to fetch the file.

Screenshot 2022-12-15 at 2 03 57 pm
Screenshot 2022-12-15 at 2 04 57 pm
Screenshot 2022-12-15 at 2 05 25 pm

Error: Invalid bundle structure. The “APP NAME/upload-symbols” binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle With error code STATE_ERROR.VALIDATION_ERROR.90171 for id XXXXX Asset validation failed (-19208)
{
NSLocalizedDescription = "Invalid bundle structure. The \APPNAME.app/upload-symbols\U201d binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: https://developer.apple.com/docu
mentation/bundleresources/placing_content_in_a_bundle With error code STATE_ERROR.VALIDATION_ERROR.90171 for id XXXXX";
NSLocalizedFailureReason = "Asset validation failed";
}

Solution from @hari-bikki-two-bulls worked for me!

Also got it working like this:
Add upload-symbols executable somewhere in the repo
Have a Bitrise script step that executes

<path to upload-symbols> -gsp <path to GoogleService-Info.plist> -p ios $BITRISE_DSYM_PATH