fastlane: Crashlytics action failing starting with fastlane 2.99

New Regression Checklist

Regression Information

  • Breaking version: [e.g. 2.99]
  • Last working version: [e.g. 2.98]

Regression Description

The lane won’t submit to crashlytics/fabric successfully on our CI Server. It only works on our local development machine.

[13:37:34]: 2018-07-11 13:37:33.690 submit Crashlytics: Crashlytics.framework/submit 1.3.6 (19)
2018-07-11 13:37:33.696 submit Crashlytics: Path to IPA manually provided: /Users/tssrv2/concourse/volumes/live/c1a28c39-cd91-46ec-68b2-9548971adea2/volume/MyApp.ipa
2018-07-11 13:37:34.214 submit Crashlytics: Unable to inflate IPA to temporary path: Error Domain=CLSFileSystemUtilsErrorDomain Code=-1 "(null)" UserInfo={status=2, arguments=(
    "-qo",
    "/Users/tssrv2/concourse/volumes/live/c1a28c39-cd91-46ec-68b2-9548971adea2/volume/MyApp.ipa",
    "-d",
    "/var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/"
), stderr=checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/ProfileNavigationController.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/ProfileNavigationController.nib/.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/ProfileNavigationController.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/ProfileNavigationController.nib/objects-11.0+.nib.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/ProfileNavigationController.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/ProfileNavigationController.nib/runtime.nib.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/jmg-hy-vdr-view-udg-4h-Ojo.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/jmg-hy-vdr-view-udg-4h-Ojo.nib/.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/jmg-hy-vdr-view-udg-4h-Ojo.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/jmg-hy-vdr-view-udg-4h-Ojo.nib/objects-11.0+.nib.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/jmg-hy-vdr-view-udg-4h-Ojo.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/jmg-hy-vdr-view-udg-4h-Ojo.nib/runtime.nib.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/ProfileViewController.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/ProfileViewController.nib/.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/ProfileViewController.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/ProfileViewController.nib/objects-11.0+.nib.
checkdir error:  /var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/Payload/MyApp.app/ProfileTab.storyboardc/ProfileViewController.nib exists but is not directory
                 unable to process Payload/MyApp.app/ProfileTab.storyboardc/ProfileViewController.nib/runtime.nib.
, stdout=, temporaryPath=/var/folders/b0/c44km52n78x86jz27qrlbkzh0000gn/T/MyApp/, command=/usr/bin/unzip, archivePath=/Users/tssrv2/concourse/volumes/live/c1a28c39-cd91-46ec-68b2-9548971adea2/volume/MyApp.ipa}
2018-07-11 13:37:34.214 submit Crashlytics: Failed to prepare the binary for release

Environment

+ bundle exec fastlane env
 [✔] 🚀 
[15:43:19]: Generating fastlane environment output, this might take a few seconds...
✅ fastlane environment ✅

Stack

Key Value
OS 10.13.4
Ruby 2.5.1
Bundler? true
Git git version 2.17.0
Installation Source ~/concourse/volumes/live/e9cb06d5-1a2a-428b-446a-1ff83c074a36/volume/vendor/bundle/ruby/2.5.0/bin/fastlane
Host Mac OS X 10.13.4 (17E199)
Ruby Lib Dir ~/.rbenv/versions/2.5.1/lib
OpenSSL Version OpenSSL 1.0.2o 27 Mar 2018
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.4.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#

# Uncomment the line if you want fastlane to automatically update itself
#update_fastlane

default_platform(:ios)

platform :ios do

  before_all do
  
    ENV["KEYCHAIN_NAME"] = "myapp_fastlane-db"
    ENV["KEYCHAIN_PASSWORD"] = "MyappKeychain44"

  end

  error do |lane, exception, options|

    if lane == :qa

      begin

        delete_keychain(name: ENV["KEYCHAIN_NAME"])

      rescue => exception

      end

    end

  end

  desc "Runs all the tests"
  lane :test do |options|

    scheme = (options[:staging] ? “Staging” : "Development")

    run_tests(scheme: scheme, device: "iPhone X")
  
  end

  desc "Integrate a feature into develop"
  lane :ship do |options|

    scheme = (options[:staging] ? "Staging" : "Development")

    ensure_git_branch(branch: "feature")

    ensure_git_status_clean

    clear_derived_data

    run_tests(scheme: scheme, device: "iPhone X")

    File.write("../.changelog", options[:story])

    git_commit(path: [".changelog"], message: "Updated changelog")

    build_number = increment_build_number(xcodeproj: "Myapp.xcodeproj")

    commit_version_bump(
      message: "Bumped build to " + build_number,
      xcodeproj: "Myapp.xcodeproj"
    )

    push_to_git_remote

    sh("git checkout develop") 

    sh("git merge - --no-ff")

    push_to_git_remote

  end

  desc "Submit a new build to QA"
  desc ""
  desc "This will do the following:"
  desc "- Fetch appropriate provisioning profile and certificate."
  desc "- Ensure we were on the develop branch, and bump the build."
  desc "- Commit and push the build to the develop branch."
  desc "- Build the app, and upload it to Fabric."
  desc "- Sends success message to `#qa` on Slack."
  desc ""
  lane :qa do |options|

    scheme = (options[:staging] ? "Staging" : "Development")

    app_identifier = ["com.mycompany.enterprise.myapp", "com.mycompany.enterprise.myapp.development"]

    ensure_git_status_clean

    # Commented due to CI server checking out HEAD
    #ensure_git_branch(branch: "develop")

    begin

      create_keychain(
        name: ENV["KEYCHAIN_NAME"],
        password: ENV["KEYCHAIN_PASSWORD"],
        unlock: true,
        timeout: false,
      )

    rescue => exception

    end

    sync_code_signing(
      keychain_name: ENV["KEYCHAIN_NAME"],
      keychain_password: ENV["KEYCHAIN_PASSWORD"],
      type: "enterprise",
      app_identifier: app_identifier,
      readonly: true
    )

    build_app(
      workspace: "Myapp.xcworkspace",
      scheme: scheme, 
      export_method: "enterprise"
    )

    notes = File.read("../.changelog")

    crashlytics(api_token: “1234”,
             build_secret: “4567”,
                   emails: [“qa@mycompany.com”],
                   groups: nil,
                    notes: notes,
            notifications: true,
                    debug: true
    )
   
    delete_keychain(name: ENV["KEYCHAIN_NAME"])

    version = get_version_number(xcodeproj: "Myapp.xcodeproj")

    build_number = get_build_number(xcodeproj: "Myapp.xcodeproj")

    slack(
      slack_url: "https://hooks.slack.com/services/asdf/asdf/asdf”,
      channel: "qa",
      message: "Myapp iOS version #{version} build #{build_number} uploaded to Fabric :airplane:",
      success: true,
      default_payloads: [],
      attachment_properties: {
      	fields: [
      		title: "Changelog",
      		value: notes
      	]
      }
    )

  end

  desc "Fetches the certificates and provisioning profiles."
  lane :fetch_certificates do

    app_identifier = ["com.mycompany.enterprise.myapp", "com.mycompany.enterprise.myapp.development"]

    sync_code_signing(type: "development", app_identifier: app_identifier, readonly: true)
    sync_code_signing(type: "enterprise", app_identifier: app_identifier, readonly: true)

  end

  desc "Updates the provisioning profiles."
  lane :update_certificates do

    app_identifier = ["com.mycompany.enterprise.myapp", "com.mycompany.enterprise.myapp.development"]

    sync_code_signing(type: "development", app_identifier: app_identifier, readonly: false, force_for_new_devices: true)
    sync_code_signing(type: "enterprise", app_identifier: app_identifier, readonly: false, force_for_new_devices: true)

  end

end

`./fastlane/Appfile`
app_identifier("com.mycompany.enterprise.myapp") # The bundle identifier of your app

apple_id("apple-id@appleid.com") # Your Apple email address

team_id(“1234”) # Developer Portal Team ID

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.2.0
bundler 1.16.1
CFPropertyList 3.0.0
concurrent-ruby 1.0.5
i18n 0.9.5
minitest 5.11.3
thread_safe 0.3.6
tzinfo 1.2.5
activesupport 4.2.10
public_suffix 2.0.5
addressable 2.5.2
atomos 0.1.2
babosa 1.0.2
claide 1.0.2
fuzzy_match 2.0.4
nap 1.1.0
cocoapods-core 1.5.3
cocoapods-deintegrate 1.0.2
cocoapods-downloader 1.2.1
cocoapods-plugins 1.0.0
cocoapods-search 1.0.0
cocoapods-stats 1.0.0
netrc 0.11.0
cocoapods-trunk 1.3.0
cocoapods-try 1.1.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.0.1
gh_inspector 1.1.3
molinillo 0.6.5
ruby-macho 1.2.0
nanaimo 0.2.6
xcodeproj 1.5.9
cocoapods 1.5.3
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
declarative 0.0.10
declarative-option 0.1.0
unf_ext 0.0.7.5
unf 0.1.4
domain_name 0.5.20180417
dotenv 2.5.0
emoji_regex 0.1.1
excon 0.62.0
multipart-post 2.0.0
faraday 0.15.2
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 0.12.2
fastimage 2.1.3
jwt 2.1.0
little-plugger 1.1.4
multi_json 1.13.1
logging 2.2.2
memoist 0.16.0
os 0.9.6
signet 0.8.1
googleauth 0.6.2
httpclient 2.8.3
mime-types-data 3.2016.0521
mime-types 3.1
uber 0.1.0
representable 3.0.4
retriable 3.1.2
google-api-client 0.21.2
json 2.1.0
mini_magick 4.5.1
multi_xml 0.6.0
plist 3.4.0
rubyzip 1.2.1
security 0.1.3
naturally 2.2.0
simctl 1.6.5
slack-notifier 2.3.2
terminal-notifier 1.8.0
unicode-display_width 1.4.0
terminal-table 1.8.0
tty-screen 0.6.4
tty-cursor 0.5.0
tty-spinner 0.8.0
word_wrap 1.0.0
rouge 2.0.7
xcpretty 0.2.8
xcpretty-travis-formatter 1.0.0

generated on: 2018-07-11

About this issue

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

Most upvoted comments

Yes, looks like #12894 is the one where I should’ve posted