fastlane: Can't upload `ipa` in Fabric with new Crashlytics iOS SDK

Hi.

I have update ‘Crashlytics-SDK’ for iOS. After that fastlane couldn’t upload ipa.

Error message with empty exit status Shell command exited with exit status instead of 0.

Crashlytics.framework/submit 1.3.5 (18) Fabric.framework/run 1.7.0 (208)

With previous version of SDK all works fine.

Logs are here:

[12:51:05]	[15:51:05]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
DEBUG [2018-06-29 15:51:06.10]: Checking if there are any plugins that should be loaded...
INFO [2018-06-29 15:51:06.25]: ----------------------------------------
INFO [2018-06-29 15:51:06.25]: --- Step: Verifying fastlane version ---
INFO [2018-06-29 15:51:06.25]: ----------------------------------------
INFO [2018-06-29 15:51:06.25]: Your fastlane version 2.98.0 matches the minimum requirement of 2.70.1  ✅
INFO [2018-06-29 15:51:06.26]: ------------------------------
INFO [2018-06-29 15:51:06.26]: --- Step: default_platform ---
INFO [2018-06-29 15:51:06.26]: ------------------------------
INFO [2018-06-29 15:51:06.26]: Driving the lane 'beta'   
INFO [2018-06-29 15:51:06.26]: ----------------------------------------
INFO [2018-06-29 15:51:06.26]: --- Step: changelog_from_git_commits ---
INFO [2018-06-29 15:51:06.26]: ----------------------------------------
INFO [2018-06-29 15:51:06.26]: Collecting the last 13 Git commits

                        -- git commits - redacted ----

INFO [2018-06-29 15:51:06.28]: -------------------------
INFO [2018-06-29 15:51:06.28]: --- Step: crashlytics ---
INFO [2018-06-29 15:51:06.28]: -------------------------
ERROR [2018-06-29 15:51:06.28]: Overwriting :notes_path, because you specified :notes
INFO [2018-06-29 15:51:06.29]: Uploading the build to Crashlytics Beta. Time for some ☕️.
DEBUG [2018-06-29 15:51:06.29]: ./Core/ThirdParty/Crashlytics.framework/submit [[API_TOKEN]] [[BUILD_SECRET]] -ipaPath 'xxx.ipa' -emails 'xxx@xxxxxx.com' -notesPath 'xxxxxx/changelog20180629-76488-1kbr4u7' -groupAliases 'xxxxx-team' -notifications YES -debug NO
ERROR [2018-06-29 15:51:18.95]: Shell command exited with exit status  instead of 0.
WARN [2018-06-29 15:51:18.95]: Lane Context:
INFO [2018-06-29 15:51:18.95]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>nil, :LANE_NAME=>"beta", :FL_CHANGELOG=>"xxxxxx"}
ERROR [2018-06-29 15:51:18.95]: 2018-06-29 15:51:06.314 submit Crashlytics: Crashlytics.framework/submit 1.3.5 (18)

INFO [2018-06-29 15:51:18.96]: Successfully generated documentation at path '/tc/ff0923c7705629b0/fastlane/README.md'

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | changelog_from_git_commits | 0           |
|      | crashlytics                | 12          |
/xxxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] 2018-06-29 15:51:06.314 submit Crashlytics: Crashlytics.framework/submit 1.3.5 (18) (FastlaneCore::Interface::FastlaneError)
+------+----------------------------+-------------+


ERROR [2018-06-29 15:51:19.01]: fastlane finished with errors
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/actions/crashlytics.rb:42:in `block in run'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/helper/sh_helper.rb:78:in `sh_control_output'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/actions/crashlytics.rb:45:in `run'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:257:in `block (2 levels) in execute_action'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:236:in `block in execute_action'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:231:in `chdir'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:231:in `execute_action'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/fast_file.rb:149:in `method_missing'
	from Fastfile:13:in `block in parsing_binding'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/lane_manager.rb:59:in `cruise_lane'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/commands_generator.rb:107:in `block (2 levels) in run'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:75:in `run!'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/commands_generator.rb:332:in `run'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/fastlane/lib/fastlane/cli_tools_distributor.rb:108:in `take_off'
	from /xxxx/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.98.0/bin/fastlane:20:in `<top (required)>'
	from /xxxx/.rbenv/versions/2.4.0/bin/fastlane:23:in `load'
	from /xxxx/.rbenv/versions/2.4.0/bin/fastlane:23:in `<main>'
Process exited with code 1
Process exited with code 1
Step Upload to fabric (Command Line) failed

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 8
  • Comments: 47 (7 by maintainers)

Most upvoted comments

Hey everyone, Crashlytics 3.10.5 was just shipped, make sure to update both fastlane and Crashlytics to the most recent version and let us know if that works 👍

For now the only solution I found is to downgrade to version 3.10.2 which is working perfectly fine.

###How to downgrade Crashlytics:###

  1. Open your Podfile in your favorite editor
  2. Search for pod 'Crashlytics' and
  3. Replace by pod 'Crashlytics', '3.10.2'
  4. Save and run pod update

I did some further digging into this last night and this is the conclusion:

TL;DR: We have a fix for bumping up the priority and making sure that fastlane executes correct binary at ${PODS_ROOT}/Crashlytics/submit in PR #12876. We are also in contact with Crashlytics about getting a fix for the the submit binary segfaulting when trying to attach notes (which should result in a new Crashlytics version)

Part 1: Moved submit binary (This is the part fastlane can fix)

The Crashlytics pod actually had three submit binaries. Two of them could successfully run (see Part 2) and one would fail with an error.

  • ${PODS_ROOT}/Crashlytics/submit
    • This is the one that Crashlytics suggests users use but fastlane was not looking at this one yet
    • PR #12876 will fix this
  • ${PODS_ROOT}/Crashlytics/iOS/Crashlytics.framework/submit
    • This is the binary that fastlane was able to find and did use most of the time
    • This binary could successfully upload an IPA in version 3.10.3 and 3.10.4 but only if notes were not trying to be set (see Part 2)
  • ${PODS_ROOT}/Crashlytics/Crashlytics.framework/submit
    • There is also a binary at this location but executing this binary results in the following error
      • error: The submit binary delivered by cocoapods is in a new location, under '${PODS_ROOT}/Crashlytics/submit'. This script was put in place for backwards compatibility, but it relies on PODS_ROOT, which does not have a value in your current setup. Please update the path to the submit binary to fix this issue
    • fastlane could have ended up potentially pointing to this location if ${PODS_ROOT}/Crashlytics/iOS/Crashlytics.framework/submit wasn’t found or if a fastlane user explicitly pointed to this binary
    • This binary cannot be used at all

Part 2: Broken binary when setting :notes and :notes_path

This part of the issue was caused by upgrading to Crashlytics version 3.10.3 and 3.10.4. The submit binary located at ${PODS_ROOT}/Crashlytics/submit and ${PODS_ROOT}/Crashlytics/iOS/Crashlytics.framework/submit. Both of these binaries segfaulted when trying to attach :notes and :notes_path via the fastlane action.

This segfault also occurred when attempting to execute both ${PODS_ROOT}/Crashlytics/submit and ${PODS_ROOT}/Crashlytics/iOS/Crashlytics.framework/submit directly via the command line (outside of fastlane) with the -notesPath argument.

Both of these above binaries succeeded in uploading a binary if and only if -notesPath argument was left out.

Temporary Solutions

  • To set notes
    • Downgrade to Crashlytics 3.10.2 or lower
  • To call a usable binary that can upload an IPA
    • Downgrade to Crashlytics 3.10.2 or lower

Hm… path to submit script is incorrect. Need use {PODS_DIR}/Crashlytics/submit instead of {PODS_DIR}/Crashlytics/iOS/Crashlytics.framework/submit. Fix it pls:)

Thanks for reporting this, we’re taking a look

I’m facing the issue too. @vovkaprigarin, you are right, but it doesn’t fix the issue. @spaquet, rolling crashlytics back solved building issue for me too.

Also, I figured that issue appears only if you provide notes (via notes or notes_path param). If you live notes empty - script works like a charm. May be guys from fastlane can find out what is the underlying cause.

Looks like it’s still broken as of 3.10.4.

@zapjonny emails is not stable, but that not new. I already had discussions with guys at Fastlane and Crashlytics about this topic. If you think that there is an issue specific to that build, please open another ticket about it. This one is now closed and solved. Thx

Works now, thanks for your help

3.10.5 fixed our build (with a not updated fastlane). Thanks!

Crashlytics 3.10.5 worked with our release notes! 🙌

It at least seems to work with version 3.10.0, so I downgraded. Download link: https://s3.amazonaws.com/kits-crashlytics-com/ios/com.twitter.crashlytics.ios/3.10.0/com.crashlytics.ios-manual.zip

@zapjonny Fastlane uses incorrect path to submit script. Need fix this. Segfaults in Crashlytics its other issue.

Btw so it’s a bug in Crashlytics SDK? I think we’re in the wrong issue tracker 😃

@slxl : just updated my comment to make it easier to understand.