fastlane-old / deliver

Upload screenshots, metadata and your app to the App Store using a single command
https://fastlane.tools
2.24k stars 162 forks source link

Undefined method 'red' for []:Array #575

Closed johnrutherford closed 8 years ago

johnrutherford commented 8 years ago

I just updated to fastlane 1.58.0 and just got this error when trying to submit a build to iTunes Connect.

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | increment_build_number              | 0           |
| 4    | update_info_plist                   | 0           |
| 5    | update_app_identifier               | 0           |
| 6    | cert                                | 4           |
| 7    | sigh                                | 5           |
| 8    | snapshot                            | 160         |
| 9    | gym                                 | 67          |
| 10   | deliver                             | 50          |
+------+-------------------------------------+-------------+

[10:28:49]: fastlane finished with errors
Successfully submitted a crash report. If this is a problem with one of the tools specifically,
please submit an issue on GitHub and attach the following number to it: 'bc6e9671ae8388012d52c33573e2cb94'
The crash report has been stored locally '/tmp/sentry_bc6e9671ae8388012d52c33573e2cb94.json'
/Users/xxxxx/.gem/gems/fastlane_core-0.36.2/lib/fastlane_core/ui/implementations/shell.rb:33:in `error': [!] undefined method `red' for []:Array (NoMethodError)
    from /Users/xxxxx/.gem/gems/fastlane_core-0.36.2/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/submit_for_review.rb:80:in `find_build'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/submit_for_review.rb:58:in `block in wait_for_build'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/submit_for_review.rb:57:in `loop'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/submit_for_review.rb:57:in `wait_for_build'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/submit_for_review.rb:42:in `select_build'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/submit_for_review.rb:5:in `submit!'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/runner.rb:86:in `submit_for_review'
    from /Users/xxxxx/.gem/gems/deliver-1.10.0/lib/deliver/runner.rb:30:in `run'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/actions/deliver.rb:18:in `run'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:143:in `block (2 levels) in execute_action'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:129:in `block in execute_action'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:128:in `chdir'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:128:in `execute_action'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/fast_file.rb:149:in `method_missing'
    from Fastfile:141:in `block (2 levels) in parsing_binding'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/lane.rb:36:in `call'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/lane.rb:36:in `call'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:52:in `block in execute'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:46:in `chdir'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/runner.rb:46:in `execute'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/lib/fastlane/command_line_handler.rb:30:in `handle'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/bin/fastlane:38:in `block (2 levels) in run'
    from /Users/xxxxx/.gem/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/xxxxx/.gem/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/xxxxx/.gem/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Users/xxxxx/.gem/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Users/xxxxx/.gem/gems/fastlane_core-0.36.2/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /Users/xxxxx/.gem/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/bin/fastlane:150:in `run'
    from /Users/xxxxx/.gem/gems/fastlane-1.58.0/bin/fastlane:156:in `<top (required)>'
    from /Users/xxxxx/.gem/bin/fastlane:23:in `load'
    from /Users/xxxxx/.gem/bin/fastlane:23:in `<main>'
Process exited with code 1
i2amsam commented 8 years ago

Thanks for this report! Looks like a bug, during error reporting, I'll look into the crash, but it looks like the underlying cause was that it could not find the requested build.

i2amsam commented 8 years ago

I think this crash will be fixed by https://github.com/fastlane/fastlane_core/pull/99

johnrutherford commented 8 years ago

Thanks.

Any idea what the original error may have been caused by? Here's the other part of the log prior to the error. It says the build was uploaded, but I still don't see any builds listed in iTunes Connect.

[15:06:48]: Successfully uploaded screenshots to iTunes Connect
[15:06:49]: Finished the upload to iTunes Connect
[15:06:50]: Selecting the latest build...
[15:06:52]: Variable Dump:
[15:06:52]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios build_app_store", :BUILD_NUMBER=>"1013", :CERT_FILE_PATH=>"/Users/xxxxx/buildAgent/work/61487852e67586e8/certificates/6KV42T9252.cer", :CERT_CERTIFICATE_ID=>"6KV42T9252", :SIGH_PROFILE_PATH=>"/Users/xxxxx/buildAgent/work/61487852e67586e8/provisioning_profiles/AppStore_us.xxxxx.XXXApp.mobileprovision", :SIGH_PROFILE_PATHS=>["/Users/xxxxx/buildAgent/work/61487852e67586e8/provisioning_profiles/AppStore_us.xxxxx.XXXApp.mobileprovision"], :SIGH_UDID=>"647fd35f-a2f8-4775-8298-629b9f8e56da", :SIGH_PROFILE_TYPE=>"app-store", :SNAPSHOT_SCREENSHOTS_PATH=>"/Users/xxxxx/buildAgent/work/61487852e67586e8/screenshots", :IPA_OUTPUT_PATH=>"/Users/xxxxx/buildAgent/work/61487852e67586e8/builds/XXXApp.ipa", :DSYM_OUTPUT_PATH=>"/Users/xxxxx/buildAgent/work/61487852e67586e8/builds/XXXApp.app.dSYM.zip", :XCODEBUILD_ARCHIVE=>"/Users/xxxxx/Library/Developer/Xcode/Archives/2016-02-11/XXXApp 2016-02-11 15.05.03.xcarchive"}
[15:06:52]: undefined method `red' for []:Array
johnrutherford commented 8 years ago

I think the binary upload is being skipped: https://github.com/fastlane/deliver/blob/a26bfb9758f7b20842ba8fde0e203fb1b5312e6e/lib/deliver/runner.rb#L24

johnrutherford commented 8 years ago

Here is the deliver summary. I don't see why the binary upload should be getting skipped.

+--------------------+-----------------------------------------------------------------------+
|                                   deliver 1.10.0 Summary                                   |
+--------------------+-----------------------------------------------------------------------+
| username           | xxxx@xxxxxx.com                                                       |
| app_identifier     | us.xxxxx.XXXApp                                                       |
| ipa                | /Users/xxxxx/buildAgent/work/61487852e67586e8/builds/XXXApp.ipa       |
| metadata_path      | ./fastlane/metadata                                                   |
| screenshots_path   | /Users/xxxxx/buildAgent/work/61487852e67586e8/screenshots             |
| skip_binary_upload | false                                                                 |
| skip_screenshots   | false                                                                 |
| app_version        | 1.20.0                                                                |
| skip_metadata      | false                                                                 |
| force              | true                                                                  |
| submit_for_review  | true                                                                  |
| automatic_release  | true                                                                  |
| build_number       | latest                                                                |
+--------------------+-----------------------------------------------------------------------+
i2amsam commented 8 years ago

I wonder if it is related to https://github.com/fastlane/deliver/issues/576

johnrutherford commented 8 years ago

Yeah. Looks like the same issue. I think the binary upload may be getting skipped because options[:build_number] is being defaulted to "latest".

askielboe commented 8 years ago

Setting a fixed build number for deliver still doesn't upload anything.

KrauseFx commented 8 years ago

@askielboe @johnrutherford Working on a fix right now, please subscribe to https://github.com/fastlane/deliver/issues/576 for updates :+1:

KrauseFx commented 8 years ago

I just pushed https://github.com/fastlane/deliver/releases/tag/1.10.1

KrauseFx commented 8 years ago

I'll close this issue for now, feel free to re-open if you run into any other issues :+1:

fastlanebot commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/2114. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket: