Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Try to fix chromedriver hanging on chrome
Browse files Browse the repository at this point in the history
Recently we saw the smokey tests were hanging on production (AWS). On
investigating the issue, we found that chrome was failing to respond to
Chromedriver commands. The interaction between chromedriver and Chrome
is done in the context of a session [1]; we were able to get the active
session ID by doing an 'strace' of the chrome/driver processes.

curl -d '{"url":"https://www.google.com"}' http://localhost:9515/session/27f4262ab044392b05138540055a8fd6/url

This provided some clarity on the reason for the smokey tests hanging,
and lead to the following issue, which suggests the issue is related to
'dbus': SeleniumHQ/docker-selenium#87. While
this seems to be part of the main Chromium distribution [3], it's not
clear if this has made it into Chrome itself.

This trials implementing the suggested fix for the smokey process.

References
==========

[1] https://www.pawangaria.com/post/automation/browser-automation-from-command-line/
[2] https://chromium.googlesource.com/chromium/src/+/2fc330d0b93d4bfd7bd04b9fdd3102e529901f91%5E%21/
[3] https://chromium.googlesource.com/chromium/src/+/refs/heads/master/services/service_manager/embedder/main.cc#274
  • Loading branch information
Ben Thorner committed Jul 8, 2019
1 parent 2c18ceb commit c8c8f26
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions modules/govuk/manifests/apps/smokey.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@
}

govuk::app::envvar {
'AUTH_PASSWORD': value => $http_password;
'AUTH_USERNAME': value => $http_username;
'BEARER_TOKEN': value => $smokey_bearer_token;
'RATE_LIMIT_TOKEN': value => $rate_limit_token;
'SIGNON_EMAIL': value => $smokey_signon_email;
'SIGNON_PASSWORD': value => $smokey_signon_password;
'AUTH_PASSWORD': value => $http_password;
'AUTH_USERNAME': value => $http_username;
'BEARER_TOKEN': value => $smokey_bearer_token;
'RATE_LIMIT_TOKEN': value => $rate_limit_token;
'SIGNON_EMAIL': value => $smokey_signon_email;
'SIGNON_PASSWORD': value => $smokey_signon_password;
'DBUS_SESSION_BUS_ADDRESS': value => 'disabled:';
}

if $::aws_migration {
Expand Down

0 comments on commit c8c8f26

Please sign in to comment.