Upload dSYMS to Firebase via Fastlane

daredevil1234 picture daredevil1234 · Oct 29, 2018 · Viewed 7.2k times · Source

I am struggling to upload dSYM files to Firebase via Fastlane. I have a lane that looks like the following:

desc "Fetch and upload dSYM files to Firebase Crashlytics"
lane :refresh_dsyms_firebase do |options|
  download_dsyms(version: options[:version])        
  upload_symbols_to_crashlytics(gsp_path: "./App/GoogleService-Info.plist") 
  clean_build_artifacts
end

I confirmed that that is the correct path to the plist file, but when I try to run the lane at first I see the following:

[17:22:47]: invalid byte sequence in UTF-8
[17:22:47]: invalid byte sequence in UTF-8
[17:22:47]: invalid byte sequence in UTF-8

and then one of these for every dSYM file found:

[17:22:48]: Uploading '70DBE65E-227E-3754-89F2-EEFA6B8EEC2F.dSYM'...
[17:22:48]: Shell command exited with exit status  instead of 0.

I am trying to determine exactly what I am missing from this process. Does anyone have ideas? I am fairly new to Fastlane, so definitely assume I could be missing something basic. (Although, that empty exit status is a bit weird).

fastlane 2.107.0

Answer

Ryan Romanchuk picture Ryan Romanchuk · Jan 3, 2019

This may not be an option for most, but I just ended up fixing this by starting over. It may not be entirely obvious if you came over from Fabric, but I figured I would just rip off the band aid. My original setup was using the Fabric(Answers)/Firebase Crashlytics which is the Fabric->Firebase migration path, although subtle, the configuration between the two are slightly different and cause issues with upload_symbols_to_crashlytics

  1. Remove support for Fabric answers, or replace with https://firebase.google.com/docs/analytics/ios/start
  2. Remove the Fabric declaration in Info.plist
  3. Modify your existing run script in BuildPhases: replace your existing runscript with "${PODS_ROOT}/Fabric/run" and add $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) to input files
  4. In you AppDelegate remove Fabric.with([Crashlytics.self]) and you can also kill the import Fabric as this is now covered by Firebase
  5. Unlink fabric, re-onboard Firebase crashlytics, and select new integration.
desc "Upload any dsyms in the current directory to crashlytics"
lane :upload_dsyms do |options|
  download_dsyms(version: version_number, build_number: build_number)
  upload_symbols_to_crashlytics(gsp_path: "./App/Resources/GoogleService-Info.plist")
  clean_build_artifacts
end