undefined method `log' for #Selenium::WebDriver::Remote::W3C::Bridge:0x00007fecdb811468
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !11706 (merged) should be addressed:
-
@tkuah started a discussion: Curious, we get the following error without this line:
Failures: 1) Prometheus custom metrics Deletes a custom metric Got 0 failures and 2 other errors: 1.1) Failure/Error: rest_client[path].get(params: args) WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: GET https://prometheus.example.com/api/v1/query?query=avg(metric)&time=1560330143.022099 with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip, deflate', 'Host'=>'prometheus.example.com', 'User-Agent'=>'rest-client/2.0.2 (darwin18.5.0 x86_64) ruby/2.6.3p62'} You can stub this request with the following snippet: stub_request(:get, "https://prometheus.example.com/api/v1/query?query=avg(metric)&time=1560330143.022099"). with( headers: { 'Accept'=>'*/*', 'Accept-Encoding'=>'gzip, deflate', 'Host'=>'prometheus.example.com', 'User-Agent'=>'rest-client/2.0.2 (darwin18.5.0 x86_64) ruby/2.6.3p62' }). to_return(status: 200, body: "", headers: {}) ============================================================ # ./lib/gitlab/prometheus_client.rb:99:in `get' # ./lib/gitlab/prometheus_client.rb:86:in `json_api_get' # ./lib/gitlab/prometheus_client.rb:42:in `block in query' # ./lib/gitlab/prometheus_client.rb:129:in `get_result' # ./lib/gitlab/prometheus_client.rb:41:in `query' # ./lib/gitlab/prometheus/queries/base_query.rb:8:in `client_query' # ./ee/lib/gitlab/prometheus/queries/validate_query.rb:8:in `query' # ./app/models/concerns/prometheus_adapter.rb:41:in `calculate_reactive_cache' # ./app/models/concerns/reactive_caching.rb:135:in `block (2 levels) in exclusively_update_reactive_cache!' # ./app/models/concerns/reactive_caching.rb:180:in `enqueuing_update' # ./app/models/concerns/reactive_caching.rb:133:in `block in exclusively_update_reactive_cache!' # ./app/models/concerns/reactive_caching.rb:170:in `locking_reactive_cache' # ./app/models/concerns/reactive_caching.rb:131:in `exclusively_update_reactive_cache!' # ./app/workers/reactive_caching_worker.rb:17:in `perform' # ./spec/support/sidekiq.rb:16:in `call' # ./lib/gitlab/sidekiq_status/server_middleware.rb:7:in `call' # ./config/initializers/forbid_sidekiq_in_transactions.rb:35:in `block (2 levels) in <module:NoEnqueueingFromTransactions>' # ./app/models/concerns/reactive_caching.rb:149:in `refresh_reactive_cache!' # ./app/models/concerns/reactive_caching.rb:110:in `with_reactive_cache' # ./app/models/concerns/prometheus_adapter.rb:34:in `query' # ./ee/app/controllers/ee/projects/prometheus/metrics_controller.rb:17:in `block (2 levels) in validate_query' # ./ee/app/controllers/ee/projects/prometheus/metrics_controller.rb:15:in `validate_query' # ./lib/gitlab/session.rb:11:in `with_session' # ./app/controllers/application_controller.rb:445:in `set_session_storage' # ./lib/gitlab/i18n.rb:55:in `with_locale' # ./lib/gitlab/i18n.rb:61:in `with_user_locale' # ./app/controllers/application_controller.rb:439:in `set_locale' # ./lib/gitlab/middleware/multipart.rb:103:in `call' # ./lib/gitlab/request_profiler/middleware.rb:16:in `call' # ./lib/gitlab/query_limiting/middleware.rb:17:in `block in call' # ./lib/gitlab/query_limiting/transaction.rb:39:in `run' # ./lib/gitlab/query_limiting/middleware.rb:16:in `call' # ./ee/lib/gitlab/jira/middleware.rb:17:in `call' # ./lib/gitlab/middleware/go.rb:20:in `call' # ./lib/gitlab/etag_caching/middleware.rb:13:in `call' # ./lib/gitlab/middleware/correlation_id.rb:16:in `block in call' # ./lib/gitlab/middleware/correlation_id.rb:15:in `call' # ./lib/gitlab/middleware/read_only/controller.rb:42:in `call' # ./lib/gitlab/middleware/read_only.rb:18:in `call' # ./lib/gitlab/middleware/basic_health_check.rb:25:in `call' # ./lib/gitlab/request_context.rb:26:in `call' # ./config/initializers/fix_local_cache_middleware.rb:9:in `call' # ./lib/gitlab/middleware/static.rb:11:in `call' # ./lib/gitlab/testing/request_inspector_middleware.rb:33:in `call' # ./lib/gitlab/testing/request_blocker_middleware.rb:47:in `call' # ./lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call' 1.2) Failure/Error: console = page.driver.browser.manage.logs.get(:browser)&.reject { |log| log.message =~ JS_CONSOLE_FILTER } NoMethodError: undefined method `log' for #<Selenium::WebDriver::Remote::W3C::Bridge:0x00007fecdb811468> # ./spec/support/capybara.rb:96:in `block (2 levels) in <main>' # ./ee/spec/features/projects/services/prometheus_custom_metrics_spec.rb:11:in `block (3 levels) in <main>' # ./ee/spec/features/projects/services/prometheus_custom_metrics_spec.rb:11:in `block (2 levels) in <main>' # -e:1:in `<main>'
Error 1.2 seems to be throwing an exception while trying to handle an exception.
Edited by 🤖 GitLab Bot 🤖