使用 fastlane 在 crashlytics 包中找不到提交二进制文件

Posted

技术标签:

【中文标题】使用 fastlane 在 crashlytics 包中找不到提交二进制文件【英文标题】:Could not find submit binary in crashlytics bundle using fastlane 【发布时间】:2016-03-23 18:21:36 【问题描述】:

我正在使用fastlane 构建并将我的ipa 提交给Crashlytics。这就是我项目中fastfile 的样子 -

fastlane_version "1.66.0"

default_platform :ios

platform :ios do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
#cocoapods
end

desc "Builds and uploads to Crashlytics"
lane :debug_upload do

ensure_git_status_clean
ensure_git_branch(branch:'master')
git_pull
push_to_git_remote

changelog=prompt(text:"Enter the change log:", multi_line_end_keyword:"END")

increment_build_number
#cocoapods
#scan
cert
sigh
gym(
    workspace: "MyProject.xcworkspace",
    scheme: "MyProject",
    use_legacy_build_api: true
)
#workspace: "MyProject.xcworkspace",
#configuration: "Ad Hoc",
#use_legacy_build_api: true
#export_method: "ad-hoc"

crashlytics(
    crashlytics_path: “./Pods/Crashlytics/Crashlytics.framework/submit",
    notes: changelog,
    api_token: "xxx",
    build_secret: "xxx"
)

end

如您所见,我正在使用 CocoaPods 将 Crashlytics 集成到我的项目中。 当我运行 fastlane 命令时,我会成功到健身房,但 Crashlytics 永远不会成功运行。这是我得到的错误

[23:31:01]: -------------------------
[23:31:01]: --- Step: crashlytics ---
[23:31:01]: -------------------------
[23:31:09]: Variable Dump:
[23:31:09]: :DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios debug_upload", :GIT_REPO_WAS_CLEAN_ON_START=>true, :BUILD_NUMBER=>"18", :CERT_FILE_PATH=>"/Volumes/Dev/iOS/Projects/MyProject Chat/SourceCode/MyProject/6SH8C83679.cer", :CERT_CERTIFICATE_ID=>"xxx", :SIGH_PROFILE_PATH=>"/Volumes/Dev/iOS/Projects/MyProject Chat/SourceCode/MyProject/AppStore_com. MyProject.mobileprovision", :SIGH_PROFILE_PATHS=>["/Volumes/Dev/iOS/Projects/MyProject Chat/SourceCode/MyProject/AppStore_com.MyProject.mobileprovision"], :SIGH_UDID=>"5ad33308-6ceb-4734-9a78-046516e27530", :SIGH_PROFILE_TYPE=>"app-store", :IPA_OUTPUT_PATH=>"/Volumes/Dev/iOS/Projects/MyProject Chat/SourceCode/MyProject/MyProject.ipa", :DSYM_OUTPUT_PATH=>"/Volumes/Dev/iOS/Projects/MyProject Chat/SourceCode/MyProject/MyProject.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/abhi/Library/Developer/Xcode/Archives/2016-03-23/MyProject 2016-03-23 23.26.14.xcarchive"
[23:31:09]: Could not find submit binary in crashlytics bundle at path './Pods/Crashlytics/Crashlytics.framework/submit'

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | ensure_git_status_clean             | 0           |
| 4    | ensure_git_branch                   | 0           |
| 5    | git_pull                            | 14          |
| 6    | push_to_git_remote                  | 6           |
| 7    | prompt                              | 164         |
| 8    | increment_build_number              | 8           |
| 9    | cert                                | 28          |
| 10   | sigh                                | 25          |
| 11   | gym                                 | 301         |
| 12   | crashlytics                         | 7           |
+------+-------------------------------------+-------------+

[23:31:10]: fastlane finished with errors
-------------------------------------------------------------------------------------------
????  An error occured. Please enable crash reports using `fastlane enable_crash_reporting`.
????  This makes resolving issues much easier and helps improve fastlane.
????  The reports will be stored securely on getsentry.com.
????  More information about privacy: https://github.com/fastlane/fastlane/releases/tag/1.33.3
-------------------------------------------------------------------------------------------
/Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/helper/crashlytics_helper.rb:9:in `generate_ios_command': [!] Could not find submit binary in crashlytics bundle at path './Pods/Crashlytics/Crashlytics.framework/submit' (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/actions/crashlytics.rb:23:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:143:in `block (2 levels) in execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:129:in `block in execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:128:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:128:in `execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/fast_file.rb:149:in `method_missing'
    from Fastfile:54:in `block (2 levels) in parsing_binding'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/lane.rb:36:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/lane.rb:36:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:52:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:46:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/runner.rb:46:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/bin/fastlane:38:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.39.0/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/bin/fastlane:156:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-1.68.0/bin/fastlane:162:in `<top (required)>'
    from /usr/local/bin/fastlane:23:in `load'
    from /usr/local/bin/fastlane:23:in `<main>'

我确定提交二进制文件存在于指定位置。是否还有其他人在使用 Cocoapods 安装 Crashlytics(或 Fabric)时遇到同样的问题?我该如何解决这个问题?

【问题讨论】:

【参考方案1】:

尝试从 crashlytics_path 参数中删除“提交”。

【讨论】:

这太离谱了!

以上是关于使用 fastlane 在 crashlytics 包中找不到提交二进制文件的主要内容,如果未能解决你的问题,请参考以下文章

Jenkins/fastlane - 没有找到本地代码签名身份

Fastlane Gym 配置 Ad Hoc Distribution

在 fastlane 快照中使用两组设备?

使用 fastlane 上传到 S3

如何在模拟器中使用 fastlane 运行仪器测试?

使用 FastLane 自动化 iOS 应用程序