Spec failure in ./spec/features/issues/spam_issues_spec.rb
This is easily reproduced locally. Example: https://gitlab.com/dblessing/gitlab-ee/-/jobs/49250237
1) New issue when identified as a spam creates an issue after solving reCaptcha
Got 0 failures and 3 other errors:
1.1) Failure/Error: expect(page).not_to have_content('issue title')
Selenium::WebDriver::Error::UnhandledAlertError:
unexpected alert open: {Alert text : Cannot contact reCAPTCHA. Check your connection and try again.}
(Session info: headless chrome=63.0.3239.108)
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.5-coreos-r2 x86_64)
# ./spec/features/issues/spam_issues_spec.rb:39:in `block (3 levels) in <top (required)>'
1.2) Failure/Error: execute_script("localStorage.clear();")
Selenium::WebDriver::Error::UnhandledAlertError:
unexpected alert open: {Alert text : Cannot contact reCAPTCHA. Check your connection and try again.}
(Session info: headless chrome=63.0.3239.108)
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.5-coreos-r2 x86_64)
# ./spec/support/capybara.rb:82:in `block (2 levels) in <top (required)>'
1.3) Failure/Error: e = error
Selenium::WebDriver::Error::UnhandledAlertError:
unexpected alert open: {Alert text : Cannot contact reCAPTCHA. Check your connection and try again.}
(Session info: headless chrome=63.0.3239.108)
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.5-coreos-r2 x86_64)
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/http/common.rb:83:in `new'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/http/common.rb:83:in `create_response'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/http/default.rb:107:in `request'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/http/common.rb:61:in `call'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/bridge.rb:170:in `execute'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/oss/bridge.rb:579:in `execute'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/remote/oss/bridge.rb:108:in `url'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/selenium-webdriver-3.5.0/lib/selenium/webdriver/common/driver.rb:140:in `current_url'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/capybara-2.15.1/lib/capybara/selenium/driver.rb:94:in `current_url'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/capybara-2.15.1/lib/capybara/session.rb:217:in `current_url'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec.rb:55:in `block in after_failed_example'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/capybara-2.15.1/lib/capybara.rb:351:in `using_session'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec.rb:54:in `after_failed_example'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/capybara-screenshot-1.0.14/lib/capybara-screenshot/rspec.rb:84:in `block (2 levels) in <top (required)>'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:447:in `instance_exec'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:447:in `instance_exec'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:357:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:507:in `block in run_owned_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:506:in `each'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:506:in `run_owned_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:593:in `block in run_example_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:592:in `each'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:592:in `run_example_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:463:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:507:in `run_after_example'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:273:in `block in run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:464:in `block in run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:604:in `block in run_around_example_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:342:in `call'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-rails-3.6.0/lib/rspec/rails/adapters.rb:127:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:447:in `instance_exec'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:447:in `instance_exec'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:375:in `execute_with'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:606:in `block (2 levels) in run_around_example_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:342:in `call'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-retry-0.4.5/lib/rspec/retry.rb:98:in `block in run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-retry-0.4.5/lib/rspec/retry.rb:88:in `loop'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-retry-0.4.5/lib/rspec/retry.rb:88:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-retry-0.4.5/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-retry-0.4.5/lib/rspec/retry.rb:22:in `block (2 levels) in setup'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:447:in `instance_exec'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:447:in `instance_exec'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:375:in `execute_with'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:606:in `block (2 levels) in run_around_example_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:342:in `call'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:607:in `run_around_example_hooks_for'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb:464:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example.rb:251:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:627:in `block in run_examples'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:623:in `map'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:623:in `run_examples'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:589:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:590:in `block in run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:590:in `map'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb:590:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:118:in `map'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1894:in `with_suite_hooks'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:113:in `block in run_specs'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:79:in `report'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:112:in `run_specs'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:87:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:71:in `run'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:45:in `invoke'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/gems/rspec-core-3.6.0/exe/rspec:4:in `<top (required)>'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/bin/rspec:23:in `load'
# /builds/dblessing/gitlab-ee/vendor/ruby/2.3.0/bin/rspec:23:in `<top (required)>'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
# /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
# /usr/local/bundle/bin/bundle:104:in `load'
# /usr/local/bundle/bin/bundle:104:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
Finished in 10 minutes 43 seconds (files took 18.59 seconds to load)
1902 examples, 1 failure, 6 pending
Failed examples:
rspec ./spec/features/issues/spam_issues_spec.rb:31 # New issue when identified as a spam creates an issue after solving reCaptcha
I'm really not sure why we started hitting this now; it should have been a problem once :js
was enabled in the spec. As far as I can tell, it looks like Chrome attempts to render the reCAPTCHA but since Google doesn't recognize the credentials, it fails.
Edited by Stan Hu