fastlane: upload_symbols_to_crashlytics not working with Firebase/Crashlytics

New Issue Checklist

Issue Description

I’m trying to automate dSYM upload into Firebase/Crashlytics, but it doesn’t work. The same fastlane script works perfectly with Fabric Crashlytics.

Command executed
  lane :upload_symbols do |options|
    download_dsyms(
      app_identifier: app_identifier,
      version: options[:version]
    )

    upload_symbols_to_crashlytics(
      gsp_path: "./inpreview/GoogleService-Info.plist"
    )

    clean_build_artifacts()
  end
fastlane upload_symbols version:"2.3.1"
Complete output when running fastlane, including the stack trace and command used
[17:24:33]: -------------------------------------------
[17:24:33]: --- Step: upload_symbols_to_crashlytics ---
[17:24:33]: -------------------------------------------
[17:24:33]: Extracting '/Users/larryonoff/Develop/Projects/work/in/inpreview-copy/instapreview-2.3.1-279.dSYM.zip'...
[17:24:33]: $ unzip -qo /Users/larryonoff/Develop/Projects/work/in/inpreview-copy/instapreview-2.3.1-279.dSYM.zip
[17:24:33]: Uploading 'f99ab8b0-2478-3868-829f-aa671ed5cdec.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '8a998e4d-bc5f-34b3-9ee8-2c657fedb00b.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '42b93d12-42b4-31e9-a3fe-52759c173b77.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '5aecd2f7-9240-3076-93f8-620fad49d99a.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'e17ccff5-8c37-3651-a5ba-091eb4bd1b73.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'edf0d3bb-2860-3116-a6a3-59c4f5e5672c.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '9a78aa6c-d05b-3d47-a3bc-1f1222aaa737.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'c7d2a741-d6bf-31e9-9266-3494cdbc209b.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '00d8140d-1e9d-3cd6-bc6c-f978d9722329.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '7ff5aae0-5e18-3c55-8bc4-4943c5e85383.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'e1ac9c33-2716-3a87-aef4-c6335c316f64.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'ce234f88-5b8c-35c0-8267-85d184d95576.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '1077c275-9af1-33d6-8487-4ad0fb1e9bd1.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '18660ba7-5640-3b60-8f97-87986f69427c.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '8351d394-a8df-3e39-9eb8-896023829bac.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '6cfbc89f-0ddb-312c-bc45-f5520c1caf91.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '7d0da550-79bc-3fd1-a966-5af79870c56b.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '1298b507-1658-3fca-8872-d8ce5aa39ee7.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'eef986bc-327e-3966-a647-3ad140f50645.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '4efb5150-777b-3c7b-9c29-343938240a86.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading 'a42eb771-1e36-356f-855c-b1fa393530ab.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Uploading '7f8e3be0-b7fb-3cc1-9f13-2c93dd3fca80.dSYM'...
[17:24:33]: Shell command exited with exit status 13 instead of 0.
[17:24:33]: Successfully uploaded dSYM files to Crashlytics 💯
  

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 10.15.3
Ruby 2.6.5
Bundler? false
Git git version 2.25.1
Installation Source ~/.rbenv/gems/2.6.0/bin/fastlane
Host Mac OS X 10.15.3 (19D76)
Ruby Lib Dir ~/.rbenv/versions/2.6.5/lib
OpenSSL Version OpenSSL 1.1.1d 10 Sep 2019
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode-11.4.app/Contents/Developer/
Xcode Version 11.4

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane gems

Gem Version Update-Status
fastlane 2.143.0 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-settings_bundle 1.3.2 ✅ Up-To-Date
fastlane-plugin-telegram 0.1.3 ✅ Up-To-Date
Loaded gems
Gem Version
slack-notifier 2.3.2
atomos 0.1.3
CFPropertyList 3.0.2
claide 1.0.3
colored2 3.1.2
nanaimo 0.2.6
xcodeproj 1.15.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
plist 3.5.0
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
public_suffix 2.0.5
tty-screen 0.7.1
tty-cursor 0.7.1
tty-spinner 0.9.3
babosa 1.0.3
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
excon 0.72.0
unf_ext 0.0.7.6
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday 0.17.3
faraday_middleware 0.13.1
fastimage 2.1.7
gh_inspector 1.1.3
json 2.3.0
mini_magick 4.10.1
multi_xml 0.6.0
rubyzip 1.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.7.5
naturally 2.2.0
simctl 1.6.8
jwt 2.1.0
uber 0.1.0
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mini_mime 1.0.2
multi_json 1.14.1
signet 0.13.0
memoist 0.16.2
os 1.0.1
googleauth 0.11.0
httpclient 2.8.3
google-api-client 0.36.4
google-cloud-env 1.3.1
google-cloud-errors 1.0.0
google-cloud-core 1.5.0
digest-crc 0.5.1
google-cloud-storage 1.25.1
emoji_regex 1.0.1
jmespath 1.4.0
aws-sdk-core 2.3.0
aws-sdk-resources 2.3.0
aws-sdk 2.3.0
bundler 2.1.4
mini_portile2 2.4.0
nokogiri 1.10.9
fastlane-plugin-settings_bundle 1.3.2
fastlane-plugin-telegram 0.1.3

generated on: 2020-03-13

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 22 (3 by maintainers)

Most upvoted comments

As @levibostian pointed out, the app_id & gsp_path can both be added as arguments, but only one will be used with the preference being app_id > gsp_path > api_key (which you can see in the link Levi provided). Using --verbose really helps to see what’s going on.

Problem

I was getting the following error when I included the app_id for the Firebase app

INFO [2020-04-30 15:21:40.38]: Uploading '16b257d4-fe1c-3493-8a05-bf4ee433e3a4.dSYM'...
ERROR [2020-04-30 15:21:40.39]: Shell command exited with exit status 3 instead of 0.

By changing to provide only the gsp_path, I was able to get around the error, but because I use the Fabric SDK still (rather than Firebase Crashlytics SDK), this would still not get my crash reports properly uploaded. The command would succeed, but checking Firebase & Fabric, it would say the dSYM was still needed.

Solution

The key is hidden in Firebase’s Crashlytics dSYM page when you read about their new uploader.

If you’re still using the Fabric SDK Cocoapod, you need to update to the latest Fabric version (1.10.0 or higher) & continue to use the api_key in order to upload (also delete the Fabric.app if you have it in your /Applications folder).

If you’ve removed Fabric & put in Firebase Crashlytics SDK should you then use the gsp_path or the app_id keys (with Google suggesting the gsp_path, but the fastlane action will prefer app_id if you provide it).

I still use Fabric SDK, so updating the Fabric SDK, ensuring I use the api_key still for the linked Fabric app, & made sure I deleted the Fabric.app in /Applications ended up resolving my issue & I can see my dSYMs successfully in Fabric & Firebase Crashlytics.

Screen Shot 2020-04-30 at 15 53 41 Screen Shot 2020-04-30 at 15 40 56

I was having this issue and then I realised my Pi-hole was blocking the Crashlytics domain. Once whitelisted it uploaded fine.

Huh. Funny that it works if you include the gsp_path and app id even though the gsp file includes GOOGLE_APP_ID which is the same value as the app id you would pass in.

But when looking at the source, the app_id and gsp_path can both be added as arguments to the CLI upload tool. Making me think the new ios firebase crashlytics beta upload dsyms CLI tools requires both of these to be added as arguments to succeed?

I could be completely wrong here. My guess from the little research I’ve done.

Edit: I also got the fastlane upload_symbols_to_crashlytics action to work with the newest firebase crashlytics beta by following the upgrade doc to remove fabric and adding the Firebase app id (value that looks similar to X:XXXXXXXXXXXXX:ios:XXXXXXXXXXXXXXXXXXXXXX).

Update: After making sure I was on the latest fastlane version, latest cocoapods release of firebase crashlytics beta pod, and re-downloading the gsp file from Firebase for my project, I am no longer getting the Shell command exited with exit status 13 instead of 0. or Shell command exited with exit status 3 instead of 0. error as I was getting before. I did not need to add app_id to the fastlane upload_symbols_to_crashlytics action either. Only gsp_path. It helped me to also run the fastlane command with --verbose added to see the full upload_dsyms command being run.

@ppamorim I don’t. I removed it as documentation says.

we had the same issue. Downloading the files manually from itunesconnect and uploading using the firebase uploader tool that comes with the cocoapod seems to work as a workaround. Not sure if its related to how the files are downloaded or the plugin itself.

@eofs it works!

@tiagoalexbastos Now I have both and it works!

I was having this issue too. After adding app_id parameter to upload_symbols_to_crashlytics call I was able to workaround this.

@liamjones not our case. We have open network.