QA: Log out sometimes fails after entering the EE license
As seen in https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/402758008:
8314 Status: Downloaded newer image for registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee-qa:af146726b2ff10f9f870e31be41861324ebf6fda
8315 D, [2020-01-14T15:43:54.508002 #22] DEBUG -- : with retry_on_exception: max_attempts: 3; reload_page: ; sleep_interval: 0.5
8316 D, [2020-01-14T15:43:54.508126 #22] DEBUG -- : Attempt number 1
8317 D, [2020-01-14T15:43:58.788115 #22] DEBUG -- : next wait uses reload: false
8318 D, [2020-01-14T15:43:58.791776 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8319 D, [2020-01-14T15:43:58.792736 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8320 D, [2020-01-14T15:43:58.806476 #22] DEBUG -- : ended wait_until
8321 D, [2020-01-14T15:43:58.831371 #22] DEBUG -- : has_element? :login_page (wait: 15) returned: true
8322 D, [2020-01-14T15:43:58.831449 #22] DEBUG -- : ended wait_until
8323 D, [2020-01-14T15:43:58.831523 #22] DEBUG -- : ended retry_on_exception
8324 D, [2020-01-14T15:43:58.914714 #22] DEBUG -- : filling :password_field with "*****"
8325 D, [2020-01-14T15:43:58.914822 #22] DEBUG -- : finding :password_field with args {}
8326 D, [2020-01-14T15:43:58.915187 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8327 D, [2020-01-14T15:43:58.924446 #22] DEBUG -- : ended wait_until
8328 D, [2020-01-14T15:43:58.944970 #22] DEBUG -- : found :password_field
8329 D, [2020-01-14T15:43:59.006612 #22] DEBUG -- : filling :password_confirmation_field with "*****"
8330 D, [2020-01-14T15:43:59.006816 #22] DEBUG -- : finding :password_confirmation_field with args {}
8331 D, [2020-01-14T15:43:59.006983 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8332 D, [2020-01-14T15:43:59.016913 #22] DEBUG -- : ended wait_until
8333 D, [2020-01-14T15:43:59.039632 #22] DEBUG -- : found :password_confirmation_field
8334 D, [2020-01-14T15:43:59.092084 #22] DEBUG -- : clicking :change_password_button with args {}
8335 D, [2020-01-14T15:43:59.092204 #22] DEBUG -- : finding :change_password_button with args {:text=>nil}
8336 D, [2020-01-14T15:43:59.092282 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8337 D, [2020-01-14T15:43:59.103482 #22] DEBUG -- : ended wait_until
8338 D, [2020-01-14T15:43:59.126269 #22] DEBUG -- : found :change_password_button
8339 D, [2020-01-14T15:44:00.181925 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8340 D, [2020-01-14T15:44:00.209964 #22] DEBUG -- : ended wait_until
8341 D, [2020-01-14T15:44:00.258357 #22] DEBUG -- : has_element? :sign_in_tab (wait: 0) returned: true
8342 D, [2020-01-14T15:44:00.258967 #22] DEBUG -- : clicking :sign_in_tab with args {}
8343 D, [2020-01-14T15:44:00.259422 #22] DEBUG -- : finding :sign_in_tab with args {:text=>nil}
8344 D, [2020-01-14T15:44:00.259811 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8345 D, [2020-01-14T15:44:00.275176 #22] DEBUG -- : ended wait_until
8346 D, [2020-01-14T15:44:00.310216 #22] DEBUG -- : found :sign_in_tab
8347 D, [2020-01-14T15:44:00.399629 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8348 D, [2020-01-14T15:44:00.417331 #22] DEBUG -- : ended wait_until
8349 D, [2020-01-14T15:44:00.438995 #22] DEBUG -- : has_element? :standard_tab (wait: 0) returned: false
8350 D, [2020-01-14T15:44:00.439191 #22] DEBUG -- : filling :login_field with "root"
8351 D, [2020-01-14T15:44:00.439395 #22] DEBUG -- : finding :login_field with args {}
8352 D, [2020-01-14T15:44:00.439581 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8353 D, [2020-01-14T15:44:00.459374 #22] DEBUG -- : ended wait_until
8354 D, [2020-01-14T15:44:00.494203 #22] DEBUG -- : found :login_field
8355 D, [2020-01-14T15:44:00.558892 #22] DEBUG -- : filling :password_field with "*****"
8356 D, [2020-01-14T15:44:00.558978 #22] DEBUG -- : finding :password_field with args {}
8357 D, [2020-01-14T15:44:00.559488 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8358 D, [2020-01-14T15:44:00.577946 #22] DEBUG -- : ended wait_until
8359 D, [2020-01-14T15:44:00.600987 #22] DEBUG -- : found :password_field
8360 D, [2020-01-14T15:44:00.682756 #22] DEBUG -- : clicking :sign_in_button , expecting to be at Class with args {}
8361 D, [2020-01-14T15:44:00.682937 #22] DEBUG -- : finding :sign_in_button with args {:text=>nil}
8362 D, [2020-01-14T15:44:00.683187 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8363 D, [2020-01-14T15:44:00.697966 #22] DEBUG -- : ended wait_until
8364 D, [2020-01-14T15:44:00.723392 #22] DEBUG -- : found :sign_in_button
8365 D, [2020-01-14T15:44:03.060658 #22] DEBUG -- : next wait uses reload: false
8366 D, [2020-01-14T15:44:03.060765 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8367 D, [2020-01-14T15:44:03.060853 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8368 D, [2020-01-14T15:44:03.072436 #22] DEBUG -- : ended wait_until
8369 D, [2020-01-14T15:44:03.117936 #22] DEBUG -- : has_element? :navbar (wait: 15) returned: true
8370 D, [2020-01-14T15:44:03.118274 #22] DEBUG -- : ended wait_until
8371 D, [2020-01-14T15:44:03.118659 #22] DEBUG -- : next wait uses reload: false
8372 D, [2020-01-14T15:44:03.118810 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8373 D, [2020-01-14T15:44:03.118981 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8374 D, [2020-01-14T15:44:03.128578 #22] DEBUG -- : ended wait_until
8375 D, [2020-01-14T15:44:03.155306 #22] DEBUG -- : has_element? :user_avatar (wait: 15) returned: true
8376 D, [2020-01-14T15:44:03.155395 #22] DEBUG -- : ended wait_until
8377 D, [2020-01-14T15:44:03.155443 #22] DEBUG -- : next wait uses reload: false
8378 D, [2020-01-14T15:44:03.155489 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8379 D, [2020-01-14T15:44:03.155544 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8380 D, [2020-01-14T15:44:03.166144 #22] DEBUG -- : ended wait_until
8381 D, [2020-01-14T15:44:03.187435 #22] DEBUG -- : has_element? :user_menu (wait: 15) returned: true
8382 D, [2020-01-14T15:44:03.187517 #22] DEBUG -- : ended wait_until
8383 D, [2020-01-14T15:44:03.187568 #22] DEBUG -- : next wait uses reload: false
8384 D, [2020-01-14T15:44:03.187709 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8385 D, [2020-01-14T15:44:03.187785 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8386 D, [2020-01-14T15:44:03.196536 #22] DEBUG -- : ended wait_until
8387 D, [2020-01-14T15:44:03.218344 #22] DEBUG -- : has_element? :projects_dropdown (wait: 15) returned: true
8388 D, [2020-01-14T15:44:03.218432 #22] DEBUG -- : ended wait_until
8389 D, [2020-01-14T15:44:03.218559 #22] DEBUG -- : next wait uses reload: false
8390 D, [2020-01-14T15:44:03.218712 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8391 D, [2020-01-14T15:44:03.219021 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8392 D, [2020-01-14T15:44:03.227972 #22] DEBUG -- : ended wait_until
8393 D, [2020-01-14T15:44:03.248109 #22] DEBUG -- : has_element? :groups_dropdown (wait: 15) returned: true
8394 D, [2020-01-14T15:44:03.248190 #22] DEBUG -- : ended wait_until
8395 D, [2020-01-14T15:44:03.248414 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8396 D, [2020-01-14T15:44:03.258240 #22] DEBUG -- : ended wait_until
8397 D, [2020-01-14T15:44:03.274265 #22] DEBUG -- : has_element? :user_avatar (wait: 10) returned: true
8398 D, [2020-01-14T15:44:03.274416 #22] DEBUG -- : within element :navbar
8399 D, [2020-01-14T15:44:03.293695 #22] DEBUG -- : clicking :admin_area_link with args {}
8400 D, [2020-01-14T15:44:03.293852 #22] DEBUG -- : finding :admin_area_link with args {:text=>nil}
8401 D, [2020-01-14T15:44:03.293987 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8402 D, [2020-01-14T15:44:03.304051 #22] DEBUG -- : ended wait_until
8403 D, [2020-01-14T15:44:03.330561 #22] DEBUG -- : found :admin_area_link
8404 D, [2020-01-14T15:44:05.982589 #22] DEBUG -- : end within element :navbar
8405 D, [2020-01-14T15:44:05.982996 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8406 D, [2020-01-14T15:44:05.994418 #22] DEBUG -- : ended wait_until
8407 D, [2020-01-14T15:44:07.164823 #22] DEBUG -- : has_text?('Enter Admin Mode', wait: 1.0) returned false
8408 D, [2020-01-14T15:44:07.169412 #22] DEBUG -- : clicking :link_license_menu with args {}
8409 D, [2020-01-14T15:44:07.169836 #22] DEBUG -- : finding :link_license_menu with args {:text=>nil}
8410 D, [2020-01-14T15:44:07.170247 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8411 D, [2020-01-14T15:44:07.178614 #22] DEBUG -- : ended wait_until
8412 D, [2020-01-14T15:44:07.198214 #22] DEBUG -- : found :link_license_menu
8413 D, [2020-01-14T15:44:07.469806 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8414 D, [2020-01-14T15:44:07.482766 #22] DEBUG -- : ended wait_until
8415 D, [2020-01-14T15:44:17.506884 #22] DEBUG -- : has_element? :remove_license_link (wait: 10) returned: false
8416 D, [2020-01-14T15:44:17.507000 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8417 D, [2020-01-14T15:44:17.522198 #22] DEBUG -- : ended wait_until
8418 D, [2020-01-14T15:44:17.553481 #22] DEBUG -- : has_element? :missing_license (wait: 10) returned: true
8419 D, [2020-01-14T15:44:25.476363 #22] DEBUG -- : with retry_until: max_attempts: 3; reload_page: false; sleep_interval: 0; raise_on_failure: false; retry_on_exception: false
8420 D, [2020-01-14T15:44:25.476455 #22] DEBUG -- : Attempt number 1
8421 D, [2020-01-14T15:44:25.476982 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8422 D, [2020-01-14T15:44:25.497417 #22] DEBUG -- : ended wait_until
8423 D, [2020-01-14T15:44:25.520729 #22] DEBUG -- : has_element? :user_avatar (wait: 0) returned: true
8424 D, [2020-01-14T15:44:25.520818 #22] DEBUG -- : within element :navbar
8425 D, [2020-01-14T15:44:25.543960 #22] DEBUG -- : clicking :user_avatar with args {}
8426 D, [2020-01-14T15:44:25.544120 #22] DEBUG -- : finding :user_avatar with args {:text=>nil}
8427 D, [2020-01-14T15:44:25.544614 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8428 D, [2020-01-14T15:44:25.553340 #22] DEBUG -- : ended wait_until
8429 D, [2020-01-14T15:44:25.590059 #22] DEBUG -- : found :user_avatar
8430 D, [2020-01-14T15:44:26.099739 #22] DEBUG -- : within element :user_menu
8431 D, [2020-01-14T15:44:26.166956 #22] DEBUG -- : clicking :sign_out_link with args {}
8432 D, [2020-01-14T15:44:26.167238 #22] DEBUG -- : finding :sign_out_link with args {:text=>nil}
8433 D, [2020-01-14T15:44:26.167666 #22] DEBUG -- : with wait_until: max_duration: 60; reload_page: ; sleep_interval: 0.1; raise_on_failure: false
8434 D, [2020-01-14T15:44:26.177576 #22] DEBUG -- : ended wait_until
8435 bundler: failed to load command: bin/qa (bin/qa)
8436 Capybara::ElementNotFound: Unable to find visible css "[data-qa-selector=\"sign_out_link\"],.qa-sign-out-link" within #<Capybara::Node::Element tag="li" path="/HTML/BODY[1]/HEADER[1]/DIV[1]/DIV[1]/DIV[2]/UL[1]/LI[8]">
8437 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb:296:in `block in synced_resolve'
8438 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/base.rb:83:in `synchronize'
8439 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb:287:in `synced_resolve'
8440 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb:52:in `find'
8441 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/session.rb:749:in `block (2 levels) in <class:Session>'
8442 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
8443 /home/gitlab/qa/qa/page/base.rb:84:in `find_element'
8444 /home/gitlab/qa/qa/support/page/logging.rb:45:in `find_element'
8445 /home/gitlab/qa/qa/page/base.rb:119:in `click_element'
8446 /home/gitlab/qa/qa/support/page/logging.rb:81:in `click_element'
8447 /home/gitlab/qa/qa/page/main/menu.rb:83:in `block (2 levels) in sign_out'
8448 /home/gitlab/qa/qa/page/main/menu.rb:137:in `block (2 levels) in within_user_menu'
8449 /home/gitlab/qa/qa/page/base.rb:234:in `block in within_element'
8450 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/session.rb:343:in `within'
8451 /home/gitlab/qa/qa/page/base.rb:233:in `within_element'
8452 /home/gitlab/qa/qa/support/page/logging.rb:150:in `within_element'
8453 /home/gitlab/qa/qa/page/main/menu.rb:136:in `block in within_user_menu'
8454 /home/gitlab/qa/qa/page/main/menu.rb:128:in `block in within_top_menu'
8455 /home/gitlab/qa/qa/page/base.rb:234:in `block in within_element'
8456 /usr/local/bundle/gems/capybara-3.29.0/lib/capybara/session.rb:343:in `within'
8457 /home/gitlab/qa/qa/page/base.rb:233:in `within_element'
8458 /home/gitlab/qa/qa/support/page/logging.rb:150:in `within_element'
8459 /home/gitlab/qa/qa/page/main/menu.rb:127:in `within_top_menu'
8460 /home/gitlab/qa/qa/page/main/menu.rb:133:in `within_user_menu'
8461 /home/gitlab/qa/qa/page/main/menu.rb:82:in `block in sign_out'
8462 /home/gitlab/qa/qa/page/base.rb:37:in `block in retry_until'
8463 /home/gitlab/qa/qa/support/retrier.rb:56:in `block in retry_until'
8464 /home/gitlab/qa/qa/support/repeater.rb:21:in `repeat_until'
8465 /home/gitlab/qa/qa/support/retrier.rb:48:in `retry_until'
8466 /home/gitlab/qa/qa/page/base.rb:36:in `retry_until'
8467 /home/gitlab/qa/qa/page/main/menu.rb:79:in `sign_out'
8468 /home/gitlab/qa/qa/scenario/actable.rb:16:in `perform'
8469 /home/gitlab/qa/qa/ee/resource/license.rb:16:in `fabricate!'
8470 /home/gitlab/qa/qa/resource/base.rb:30:in `block (2 levels) in fabricate_via_browser_ui!'
8471 /home/gitlab/qa/qa/resource/base.rb:135:in `log_fabrication'
8472 /home/gitlab/qa/qa/resource/base.rb:30:in `block in fabricate_via_browser_ui!'
8473 /home/gitlab/qa/qa/resource/base.rb:118:in `do_fabricate!'
8474 /home/gitlab/qa/qa/resource/base.rb:29:in `fabricate_via_browser_ui!'
8475 /home/gitlab/qa/qa/resource/base.rb:21:in `rescue in fabricate!'
8476 /home/gitlab/qa/qa/resource/base.rb:18:in `fabricate!'
8477 /home/gitlab/qa/qa/ee/strategy.rb:21:in `perform_before_hooks'
8478 /home/gitlab/qa/qa/runtime/release.rb:26:in `public_send'
8479 /home/gitlab/qa/qa/runtime/release.rb:26:in `method_missing'
8480 /home/gitlab/qa/qa/scenario/template.rb:29:in `perform'
8481 /home/gitlab/qa/qa/scenario/template.rb:10:in `block in perform'
8482 /home/gitlab/qa/qa/scenario/template.rb:8:in `tap'
8483 /home/gitlab/qa/qa/scenario/template.rb:8:in `perform'
8484 /home/gitlab/qa/qa/scenario/bootable.rb:28:in `launch!'
8485 bin/qa:7:in `<top (required)>'
No screenshot since it happens in Runtime::Release.perform_before_hooks
which is outside of Specs::Runner.perform
: https://gitlab.com/gitlab-org/gitlab/blob/00d09aabb30b803235c38752e5984e0b08b7424b/qa/qa/scenario/template.rb#L29