Fastlane-plugin-test_center: Unresolved conflict between options: 'test_without_building' and 'build_for_testing'

Created on 28 Oct 2019  ·  14Comments  ·  Source: lyndsey-ferguson/fastlane-plugin-test_center

New Issue Checklist

  • [x] Updated fastlane-plugin-test_center to the latest version
  • [x] I read the README.md
  • [x] I reviewed the example(s) for the action(s) I am using
  • [x] I have removed any sensitive data such as passwords, authentication tokens, or anything else I do not want to world to see

Issue Description

After updating to the latest version of multi_scan (and fasltane which is 2.134 now) we started to see this error on this code:

    results = multi_scan(
        scheme: scheme,
        try_count: 2,
        fail_build: false,
        derived_data_path: "DerivedData/Debug/#{scheme}",
        device: device,
        devices: devices,
        test_without_building: options[:test_without_building].presence || false,
        only_testing: features,
        xcargs: "BRANCH_NAME=\"#{git_branch}\"",
        result_bundle: true,
        include_simulator_logs: false
    )
Unresolved conflict between options: 'test_without_building' and 'build_for_testing'
even though we are passing only one option. Passing the same value to `skip_build` does not solve it (if `test_without_building` is `false` then `skip_build` should be `false` as well, isn't it?), but passing value only to `skip_build` works. So this code works:
    results = multi_scan(
        scheme: scheme,
        try_count: 2,
        fail_build: false,
        derived_data_path: "DerivedData/Debug/#{scheme}",
        device: device,
        devices: devices,
        skip_build: options[:test_without_building].presence || false,
        only_testing: features,
        xcargs: "BRANCH_NAME=\"#{git_branch}\"",
        result_bundle: true,
        include_simulator_logs: false
    )
##### Complete output when running fastlane, including the stack trace and command used

+-----------------------+----------------------+
| Summary for multi_scan (test_center v3.8.12) |
+-----------------------+----------------------+
| try_count             | 2                    |
+-----------------------+----------------------+

ERROR [2019-10-28 14:31:43.09]: Using deprecated option: '--custom_report_file_name' (Use `--output_files` instead)
WARN [2019-10-28 14:31:43.09]: Lane Context:
INFO [2019-10-28 14:31:43.09]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>nil, :LANE_NAME=>"ui_test_babylon_flaky"}
ERROR [2019-10-28 14:31:43.09]: Unresolved conflict between options: 'test_without_building' and 'build_for_testing'

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | git_branch                 | 0           |
| 💥   | multi_scan                 | 0           |
+------+----------------------------+-------------+

ERROR [2019-10-28 14:31:43.10]: fastlane finished with errors
bundler: failed to load command: fastlane (/Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/bin/fastlane)
FastlaneCore::Interface::FastlaneError: [!] Unresolved conflict between options: 'test_without_building' and 'build_for_testing'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:134:in `block (2 levels) in verify_conflicts'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:119:in `each'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:119:in `block in verify_conflicts'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:107:in `each'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:107:in `verify_conflicts'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:68:in `initialize'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:36:in `new'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:36:in `create'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.8.12/lib/fastlane/plugin/test_center/actions/multi_scan.rb:173:in `prepare_scan_options_for_build_for_testing'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.8.12/lib/fastlane/plugin/test_center/actions/multi_scan.rb:160:in `build_for_testing'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.8.12/lib/fastlane/plugin/test_center/actions/multi_scan.rb:123:in `prepare_for_testing'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-test_center-3.8.12/lib/fastlane/plugin/test_center/actions/multi_scan.rb:16:in `run'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Lanes/uitests:318:in `uitest'
  Lanes/uitests:215:in `block in parsing_binding'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/lane.rb:33:in `call'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/gems/fastlane-2.134.0/bin/fastlane:23:in `'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `load'
  /Users/ilya.puchka/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `'

Environment

🚫 fastlane environment 🚫

Stack

| Key | Value |
| --------------------------- | -------------------------------------------------------- |
| OS | 10.14.6 |
| Ruby | 2.6.4 |
| Bundler? | true |
| Git | git version 2.22.0 |
| Installation Source | ~/dev/babylon-ios/.vendor/bundle/ruby/2.6.0/bin/fastlane |
| Host | Mac OS X 10.14.6 (18G103) |
| Ruby Lib Dir | /usr/local/var/rbenv/versions/2.6.4/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.app/Contents/Developer/ |
| Xcode Version | 11.1 |

System Locale

| Error |
| --------------------------- |
| No Locale with UTF8 found 🚫 |

fastlane gems

| Gem | Version | Update-Status |
| -------- | ------- | ------------- |
| fastlane | 2.134.0 | ✅ Up-To-Date |

Loaded fastlane plugins:

| Plugin | Version | Update-Status |
| --------------------------- | ------- | ------------- |
| fastlane-plugin-badge | 1.3.0 | ✅ Up-To-Date |
| fastlane-plugin-versioning | 0.3.4 | ✅ Up-To-Date |
| fastlane-plugin-test_center | 3.8.12 | ✅ Up-To-Date |
| fastlane-plugin-appcenter | 1.5.0 | ✅ Up-To-Date |

Loaded gems

| Gem | Version |
| --------------------------- | ------------ |
| did_you_mean | 1.3.0 |
| bundler | 2.0.2 |
| fileutils | 1.1.0 |
| etc | 1.0.1 |
| CFPropertyList | 3.0.1 |
| concurrent-ruby | 1.1.5 |
| i18n | 0.9.5 |
| minitest | 5.12.2 |
| thread_safe | 0.3.6 |
| tzinfo | 1.2.5 |
| activesupport | 4.2.11.1 |
| public_suffix | 2.0.5 |
| addressable | 2.5.2 |
| httpclient | 2.8.3 |
| json | 2.2.0 |
| algoliasearch | 1.27.1 |
| atomos | 0.1.3 |
| babosa | 1.0.3 |
| curb | 0.9.10 |
| fastimage | 2.1.7 |
| colored | 1.2 |
| highline | 1.7.10 |
| commander-fastlane | 4.4.6 |
| dotenv | 2.7.5 |
| emoji_regex | 1.0.1 |
| excon | 0.68.0 |
| multipart-post | 2.0.0 |
| faraday | 0.17.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_middleware | 0.13.1 |
| gh_inspector | 1.1.3 |
| jwt | 2.1.0 |
| memoist | 0.16.0 |
| multi_json | 1.14.1 |
| os | 1.0.1 |
| signet | 0.12.0 |
| googleauth | 0.6.7 |
| mime-types-data | 3.2019.1009 |
| mime-types | 3.3 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| uber | 0.1.0 |
| representable | 3.0.4 |
| retriable | 3.1.2 |
| google-api-client | 0.23.9 |
| digest-crc | 0.4.1 |
| google-cloud-env | 1.3.0 |
| google-cloud-core | 1.4.0 |
| google-cloud-storage | 1.16.0 |
| mini_magick | 4.9.5 |
| multi_xml | 0.6.0 |
| plist | 3.5.0 |
| rubyzip | 1.3.0 |
| security | 0.1.3 |
| naturally | 2.2.0 |
| simctl | 1.6.6 |
| slack-notifier | 2.3.2 |
| terminal-notifier | 2.0.0 |
| unicode-display_width | 1.6.0 |
| terminal-table | 1.8.0 |
| tty-screen | 0.7.0 |
| tty-cursor | 0.7.0 |
| tty-spinner | 0.9.1 |
| word_wrap | 1.0.0 |
| claide | 1.0.3 |
| colored2 | 3.1.2 |
| nanaimo | 0.2.6 |
| xcodeproj | 1.13.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| xcpretty-travis-formatter | 1.0.0 |
| badge | 0.11.0 |
| cork | 0.3.0 |
| nap | 1.1.0 |
| open4 | 1.3.4 |
| claide-plugins | 0.9.2 |
| fuzzy_match | 2.0.4 |
| cocoapods-core | 1.8.3 |
| cocoapods-deintegrate | 1.0.4 |
| cocoapods-downloader | 1.2.2 |
| cocoapods-plugins | 1.0.0 |
| cocoapods-search | 1.0.0 |
| cocoapods-stats | 1.1.0 |
| netrc | 0.11.0 |
| cocoapods-trunk | 1.4.1 |
| cocoapods-try | 1.1.0 |
| escape | 0.0.4 |
| fourflusher | 2.3.1 |
| molinillo | 0.6.6 |
| ruby-macho | 1.4.0 |
| cocoapods | 1.8.3 |
| colorize | 0.8.1 |
| faraday-http-cache | 2.0.0 |
| rchardet | 1.8.0 |
| git | 1.5.0 |
| kramdown | 2.1.0 |
| kramdown-parser-gfm | 1.0.1 |
| no_proxy_fix | 0.1.2 |
| sawyer | 0.8.1 |
| octokit | 4.13.0 |
| danger | 6.0.9 |
| fastlane-plugin-appcenter | 1.5.0 |
| fastlane-plugin-badge | 1.3.0 |
| xctest_list | 1.1.8 |
| fastlane-plugin-test_center | 3.8.12 |
| fastlane-plugin-versioning | 0.3.4 |
| ffi | 1.10.0 |
| mustache | 0.99.8 |
| redcarpet | 3.4.0 |
| rb-fsevent | 0.10.3 |
| rb-inotify | 0.10.0 |
| sass-listen | 4.0.0 |
| sass | 3.7.3 |
| sqlite3 | 1.4.0 |
| liferaft | 0.0.6 |
| xcinvoke | 0.3.0 |
| jazzy | 0.9.3 |
| oauth | 0.5.4 |
| jira-ruby | 1.6.0 |

generated on: 2019-10-28

♻️ multi_scan 🐞bug

All 14 comments

@ilyapuchka which version of multi_scan were you using before?

3.6.3 I think

That helps, I significantly refactored the internals with 3.8.3. I probably introduced the defect then.

@ilyapuchka, my schedule doesn't permit me much time to work on this at the moment, but if you're up for it, I'm open to people providing pull requests.

I believe that what needs to be done is add a line:

values.delete(:test_for_building)

here

If you need help with how to get started contributing: see this

And add a new test example here

Easy, but takes time I don't have

BTW with a work around to change test_without_building to skip_build the project is actually rebuilt, so it does not make it a good solution either

I'm afraid deleting test_for_building manually will result in the same behaviour

Also it looks like it does not happen on 3.8.11, but I'm still investigating

Thanks @ilyapuchka, I appreciate any investigation that you can perform to help iron this out. I didn't intentionally fix anything related to this, so I would be surprised if it was fixed in 3.8.11.

@ilyapuchka I believe I have fixed the issue. To test, can you modify your Pluginfile per my instructions below, run bundle install, and then run your fastlane again (with the --verbose flag)?

Pluginfile:

gem 'fastlane-plugin-test_center', :git => "https://github.com/lyndsey-ferguson/fastlane-plugin-test_center.git", :branch => "issue-165-remove-test_without_building-when-building"

If there are still problems, please let me know and attach the console output as a text file to this issue (makes it easier for me to review). If it works, please let me know.

@ilyapuchka do you think that you'll be able to test this soon? I'm pretty certain that I've fixed the issue, but I would like to get a confirmation.

Fixed in v3.8.13

@lyndsey-ferguson thanks, will try to test this. For now we workaround this by changing test_without_building: options[:test_without_building].presence || false to just test_without_building: options[:test_without_building].presence

Was this page helpful?
0 / 5 - 0 ratings