spree-contrib / spree_globalize

Adds support for model translations (multi-language stores) using Globalize gem
https://spreecommerce.org
BSD 3-Clause "New" or "Revised" License
24 stars 102 forks source link

SpreeGlobalize::Translatable preloading translations causes queries to fail in Spree 4.3.0.rc2 #90

Closed npflood closed 2 years ago

npflood commented 2 years ago

Steps to Replicate:

Expected Behaviour

The page will load with a list of products that belong to that taxon

Actual Behaviour

PG::GroupingError

PG::GroupingError: ERROR: column "spree_product_translations.id" must appear in the GROUP BY clause or be used in an aggregate function

Environment

Diagnosis

The Spree_Globalize gem preloads translations by adding to the spree_base_scope method.

#preload translations
def spree_base_scopes
  super.includes(:translations).references(:translations)
end

The addition of this preloaded scope causes the generated SQL query to be invalid. The SQL query that is failing is listed below.

Workaround (Not necessarily a fix)

By removing the .includes(:translations).references(:translations) from the spree_base_scopes method in SpreeGlobalize::Translatable the query succeeds. You can see this in action on our fork. https://github.com/ECHOInternational/spree_globalize

The generated SQL becomes much simpler and works properly:

SELECT DISTINCT spree_products.*, MIN(spree_products_taxons.position) AS min_position
FROM "spree_products"
INNER JOIN "spree_products_stores" ON "spree_products"."id" = "spree_products_stores"."product_id"
INNER JOIN "spree_variants" ON "spree_variants"."deleted_at" IS NULL AND "spree_variants"."product_id" = "spree_products"."id"
INNER JOIN "spree_prices" ON "spree_prices"."deleted_at" IS NULL AND "spree_prices"."variant_id" = "spree_variants"."id"
INNER JOIN "spree_products_taxons" ON "spree_products_taxons"."product_id" = "spree_products"."id" WHERE "spree_products"."deleted_at" IS NULL AND "spree_products_stores"."store_id" = 4 AND "spree_prices"."currency" = 'USD' AND "spree_prices"."amount" IS NOT NULL AND "spree_products_taxons"."taxon_id" = 55 AND ("spree_products".deleted_at IS NULL or "spree_products".deleted_at >= '2021-08-25 19:02:05.891093') AND ("spree_products".discontinue_on IS NULL or "spree_products".discontinue_on >= '2021-08-25 19:02:05.891439') AND ("spree_products".available_on <= '2021-08-25 19:02:05.891420') AND "spree_prices"."currency" = 'USD' AND "spree_prices"."amount" IS NOT NULL AND "spree_products_taxons"."taxon_id" = 55
GROUP BY "spree_products"."id"
ORDER BY "min_position" ASC
LIMIT 12
OFFSET 0

Compare this to the generated query below that is currently created and fails:

SQL Query that fails

SELECT DISTINCT spree_products.*, MIN(spree_products_taxons.position) AS min_position,
"spree_products"."id" AS t0_r0,
"spree_product_translations"."id" AS t1_r0,
"spree_product_translations"."spree_product_id" AS t1_r1,
"spree_product_translations"."locale" AS t1_r2,
"spree_product_translations"."created_at" AS t1_r3,
"spree_product_translations"."updated_at" AS t1_r4,
"spree_product_translations"."name" AS t1_r5,
"spree_product_translations"."description" AS t1_r6,
"spree_product_translations"."meta_description" AS t1_r7,
"spree_product_translations"."meta_keywords" AS t1_r8,
"spree_product_translations"."slug" AS t1_r9,
"spree_product_translations"."deleted_at" AS t1_r10,
"spree_product_translations"."meta_title" AS t1_r11,
"spree_tax_categories"."id" AS t2_r0,
"spree_tax_categories"."name" AS t2_r1,
"spree_tax_categories"."description" AS t2_r2,
"spree_tax_categories"."is_default" AS t2_r3,
"spree_tax_categories"."deleted_at" AS t2_r4,
"spree_tax_categories"."created_at" AS t2_r5,
"spree_tax_categories"."updated_at" AS t2_r6,
"spree_tax_categories"."tax_code" AS t2_r7,
"spree_variants"."id" AS t3_r0,
"spree_variants"."sku" AS t3_r1,
"spree_variants"."weight" AS t3_r2,
"spree_variants"."height" AS t3_r3,
"spree_variants"."width" AS t3_r4,
"spree_variants"."depth" AS t3_r5,
"spree_variants"."deleted_at" AS t3_r6,
"spree_variants"."is_master" AS t3_r7,
"spree_variants"."product_id" AS t3_r8,
"spree_variants"."cost_price" AS t3_r9,
"spree_variants"."position" AS t3_r10,
"spree_variants"."cost_currency" AS t3_r11,
"spree_variants"."track_inventory" AS t3_r12,
"spree_variants"."tax_category_id" AS t3_r13,
"spree_variants"."updated_at" AS t3_r14,
"spree_variants"."discontinue_on" AS t3_r15,
"spree_variants"."created_at" AS t3_r16,
"spree_assets"."id" AS t4_r0,
"spree_assets"."viewable_type" AS t4_r1,
"spree_assets"."viewable_id" AS t4_r2,
"spree_assets"."attachment_width" AS t4_r3,
"spree_assets"."attachment_height" AS t4_r4,
"spree_assets"."attachment_file_size" AS t4_r5,
"spree_assets"."position" AS t4_r6,
"spree_assets"."attachment_content_type" AS t4_r7,
"spree_assets"."attachment_file_name" AS t4_r8,
"spree_assets"."type" AS t4_r9,
"spree_assets"."attachment_updated_at" AS t4_r10,
"spree_assets"."alt" AS t4_r11,
"spree_assets"."created_at" AS t4_r12,
"spree_assets"."updated_at" AS t4_r13,
"active_storage_attachments"."id" AS t5_r0,
"active_storage_attachments"."name" AS t5_r1,
"active_storage_attachments"."record_type" AS t5_r2,
"active_storage_attachments"."record_id" AS t5_r3,
"active_storage_attachments"."blob_id" AS t5_r4,
"active_storage_attachments"."created_at" AS t5_r5,
"active_storage_blobs"."id" AS t6_r0,
"active_storage_blobs"."key" AS t6_r1,
"active_storage_blobs"."filename" AS t6_r2,
"active_storage_blobs"."content_type" AS t6_r3,
"active_storage_blobs"."metadata" AS t6_r4,
"active_storage_blobs"."byte_size" AS t6_r5,
"active_storage_blobs"."checksum" AS t6_r6,
"active_storage_blobs"."created_at" AS t6_r7,
"active_storage_blobs"."service_name" AS t6_r8,
"spree_variants"."id" AS t7_r0,
"spree_variants"."sku" AS t7_r1,
"spree_variants"."weight" AS t7_r2,
"spree_variants"."height" AS t7_r3,
"spree_variants"."width" AS t7_r4,
"spree_variants"."depth" AS t7_r5,
"spree_variants"."deleted_at" AS t7_r6,
"spree_variants"."is_master" AS t7_r7,
"spree_variants"."product_id" AS t7_r8,
"spree_variants"."cost_price" AS t7_r9,
"spree_variants"."position" AS t7_r10,
"spree_variants"."cost_currency" AS t7_r11,
"spree_variants"."track_inventory" AS t7_r12,
"spree_variants"."tax_category_id" AS t7_r13,
"spree_variants"."updated_at" AS t7_r14,
"spree_variants"."discontinue_on" AS t7_r15,
"spree_variants"."created_at" AS t7_r16,
"spree_prices"."id" AS t8_r0,
"spree_prices"."variant_id" AS t8_r1,
"spree_prices"."amount" AS t8_r2,
"spree_prices"."currency" AS t8_r3,
"spree_prices"."deleted_at" AS t8_r4,
"spree_prices"."created_at" AS t8_r5,
"spree_prices"."updated_at" AS t8_r6,
"spree_prices"."compare_at_amount" AS t8_r7,
"images_spree_variants"."id" AS t9_r0,
"images_spree_variants"."viewable_type" AS t9_r1,
"images_spree_variants"."viewable_id" AS t9_r2,
"images_spree_variants"."attachment_width" AS t9_r3,
"images_spree_variants"."attachment_height" AS t9_r4,
"images_spree_variants"."attachment_file_size" AS t9_r5,
"images_spree_variants"."position" AS t9_r6,
"images_spree_variants"."attachment_content_type" AS t9_r7,
"images_spree_variants"."attachment_file_name" AS t9_r8,
"images_spree_variants"."type" AS t9_r9,
"images_spree_variants"."attachment_updated_at" AS t9_r10,
"images_spree_variants"."alt" AS t9_r11,
"images_spree_variants"."created_at" AS t9_r12,
"images_spree_variants"."updated_at" AS t9_r13,
"attachment_attachments_spree_assets"."id" AS t10_r0,
"attachment_attachments_spree_assets"."name" AS t10_r1,
"attachment_attachments_spree_assets"."record_type" AS t10_r2,
"attachment_attachments_spree_assets"."record_id" AS t10_r3,
"attachment_attachments_spree_assets"."blob_id" AS t10_r4,
"attachment_attachments_spree_assets"."created_at" AS t10_r5,
"blobs_active_storage_attachments"."id" AS t11_r0,
"blobs_active_storage_attachments"."key" AS t11_r1,
"blobs_active_storage_attachments"."filename" AS t11_r2,
"blobs_active_storage_attachments"."content_type" AS t11_r3,
"blobs_active_storage_attachments"."metadata" AS t11_r4,
"blobs_active_storage_attachments"."byte_size" AS t11_r5,
"blobs_active_storage_attachments"."checksum" AS t11_r6,
"blobs_active_storage_attachments"."created_at" AS t11_r7,
"blobs_active_storage_attachments"."service_name" AS t11_r8 
FROM "spree_products"
INNER JOIN "spree_products_stores" ON "spree_products"."id" = "spree_products_stores"."product_id" 
INNER JOIN "spree_variants" ON "spree_variants"."deleted_at" IS NULL AND "spree_variants"."product_id" = "spree_products"."id"
INNER JOIN "spree_prices" ON "spree_prices"."deleted_at" IS NULL AND "spree_prices"."variant_id" = "spree_variants"."id"
INNER JOIN "spree_products_taxons" ON "spree_products_taxons"."product_id" = "spree_products"."id"
LEFT OUTER JOIN "spree_assets" ON "spree_assets"."viewable_type" = 'Spree::Variant' AND "spree_assets"."viewable_id" = "spree_variants"."id"
LEFT OUTER JOIN "active_storage_attachments" ON "active_storage_attachments"."record_type" = 'Spree::Asset' AND "active_storage_attachments"."name" = 'attachment' AND "active_storage_attachments"."record_id" = "spree_assets"."id"
LEFT OUTER JOIN "active_storage_blobs" ON "active_storage_blobs"."id" = "active_storage_attachments"."blob_id"
LEFT OUTER JOIN "spree_assets" "images_spree_variants" ON "images_spree_variants"."viewable_type" = 'Spree::Variant' AND "images_spree_variants"."viewable_id" = "spree_variants"."id"
LEFT OUTER JOIN "active_storage_attachments" "attachment_attachments_spree_assets" ON "attachment_attachments_spree_assets"."record_type" = 'Spree::Asset' AND "attachment_attachments_spree_assets"."name" = 'attachment' AND "attachment_attachments_spree_assets"."record_id" = "images_spree_variants"."id"
LEFT OUTER JOIN "active_storage_blobs" "blobs_active_storage_attachments" ON "blobs_active_storage_attachments"."id" = "attachment_attachments_spree_assets"."blob_id"
LEFT OUTER JOIN "spree_product_translations" ON "spree_product_translations"."spree_product_id" = "spree_products"."id"
LEFT OUTER JOIN "spree_tax_categories" ON "spree_tax_categories"."deleted_at" IS NULL AND "spree_tax_categories"."id" = "spree_products"."tax_category_id"
WHERE "spree_products"."deleted_at" IS NULL
  AND "spree_products_stores"."store_id" = 4
  AND "spree_prices"."currency" = 'USD'
  AND "spree_prices"."amount" IS NOT NULL
  AND "spree_products_taxons"."taxon_id" = 37 
  AND ("spree_products".deleted_at IS NULL or "spree_products".deleted_at >= '2021-08-24 22:55:19.312492')
  AND ("spree_products".discontinue_on IS NULL or "spree_products".discontinue_on >= '2021-08-24 22:55:19.312792')
  AND ("spree_products".available_on <= '2021-08-24 22:55:19.312777')
  AND "spree_prices"."currency" = 'USD'
  AND "spree_prices"."amount" IS NOT NULL
  AND "spree_products_taxons"."taxon_id" = 37
GROUP BY "spree_products"."id"
ORDER BY "min_position"
ASC
LIMIT 12 
OFFSET 0

Stack Trace

rack-mini-profiler (2.3.2) lib/patches/db/pg.rb:72:in `exec_params'
rack-mini-profiler (2.3.2) lib/patches/db/pg.rb:72:in `exec_params'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `block (2 levels) in exec_no_cache'
activesupport (6.1.4.1) lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
activesupport (6.1.4.1) lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport (6.1.4.1) lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_no_cache'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_no_cache'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute_and_clear'
activerecord (6.1.4.1) lib/active_record/connection_adapters/postgresql/database_statements.rb:53:in `exec_query'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract/database_statements.rb:532:in `select'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract/database_statements.rb:69:in `select_all'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract/query_cache.rb:101:in `block in select_all'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract/query_cache.rb:118:in `block in cache_sql'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport (6.1.4.1) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract/query_cache.rb:109:in `cache_sql'
activerecord (6.1.4.1) lib/active_record/connection_adapters/abstract/query_cache.rb:101:in `select_all'
activerecord (6.1.4.1) lib/active_record/relation.rb:838:in `block (2 levels) in exec_queries'
activerecord (6.1.4.1) lib/active_record/relation/finder_methods.rb:421:in `apply_join_dependency'
activerecord (6.1.4.1) lib/active_record/relation.rb:833:in `block in exec_queries'
activerecord (6.1.4.1) lib/active_record/relation.rb:861:in `skip_query_cache_if_necessary'
activerecord (6.1.4.1) lib/active_record/relation.rb:828:in `exec_queries'
activerecord (6.1.4.1) lib/active_record/association_relation.rb:54:in `exec_queries'
activerecord (6.1.4.1) lib/active_record/relation.rb:631:in `load'
activerecord (6.1.4.1) lib/active_record/relation.rb:249:in `records'
bullet (6.1.5) lib/bullet/active_record61.rb:46:in `records'
activerecord (6.1.4.1) lib/active_record/relation/delegation.rb:88:in `each'
spree_core (4.3.0.rc2) app/helpers/spree/products_helper.rb:71:in `map'
spree_core (4.3.0.rc2) app/helpers/spree/products_helper.rb:71:in `cache_key_for_products'
app/views/spree/shared/_products.html.erb:9
actionview (6.1.4.1) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.4.1) lib/action_view/base.rb:247:in `_run'
actionview (6.1.4.1) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.4.1) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.4.1) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.4.1) lib/action_view/template.rb:152:in `render'
actionview (6.1.4.1) lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.4.1) lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
actionview (6.1.4.1) lib/action_view/renderer/partial_renderer.rb:271:in `render'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:53:in `render_partial'
actionview (6.1.4.1) lib/action_view/helpers/rendering_helper.rb:45:in `render'
app/views/spree/products/index.html.erb:36
actionview (6.1.4.1) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.4.1) lib/action_view/base.rb:247:in `_run'
actionview (6.1.4.1) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.4.1) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.4.1) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.4.1) lib/action_view/template.rb:152:in `render'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:56:in `block in render_template'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:75:in `render_with_layout'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:22:in `render'
actionview (6.1.4.1) lib/action_view/helpers/rendering_helper.rb:38:in `block in render'
actionview (6.1.4.1) lib/action_view/base.rb:273:in `in_rendering_context'
actionview (6.1.4.1) lib/action_view/helpers/rendering_helper.rb:34:in `render'
app/views/spree/taxons/show.html.erb:8
actionview (6.1.4.1) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.4.1) lib/action_view/base.rb:247:in `_run'
actionview (6.1.4.1) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.4.1) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.4.1) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.4.1) lib/action_view/template.rb:152:in `render'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:56:in `block in render_template'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:71:in `block in render_with_layout'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
actionview (6.1.4.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (6.1.4.1) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (6.1.4.1) lib/action_view/rendering.rb:117:in `block in _render_template'
actionview (6.1.4.1) lib/action_view/base.rb:273:in `in_rendering_context'
actionview (6.1.4.1) lib/action_view/rendering.rb:116:in `_render_template'
actionpack (6.1.4.1) lib/action_controller/metal/streaming.rb:218:in `_render_template'
actionview (6.1.4.1) lib/action_view/rendering.rb:103:in `render_to_body'
actionpack (6.1.4.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (6.1.4.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (6.1.4.1) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (6.1.4.1) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
/usr/local/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
activesupport (6.1.4.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
activerecord (6.1.4.1) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
actionpack (6.1.4.1) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (6.1.4.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
actionpack (6.1.4.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
actionpack (6.1.4.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.1.4.1) lib/abstract_controller/base.rb:228:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.1.4.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
actiontext (6.1.4.1) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (6.1.4.1) lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
sentry-raven (3.1.2) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack (6.1.4.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4.1) lib/active_support/notifications.rb:203:in `instrument'
actionpack (6.1.4.1) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack (6.1.4.1) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord (6.1.4.1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.1.4.1) lib/abstract_controller/base.rb:165:in `process'
actionview (6.1.4.1) lib/action_view/rendering.rb:39:in `process'
actionpack (6.1.4.1) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.1.4.1) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
railties (6.1.4.1) lib/rails/engine.rb:539:in `call'
railties (6.1.4.1) lib/rails/railtie.rb:207:in `public_send'
railties (6.1.4.1) lib/rails/railtie.rb:207:in `method_missing'
actionpack (6.1.4.1) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
actionpack (6.1.4.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.4.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.4.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
omniauth (1.9.1) lib/omniauth/strategy.rb:420:in `call_app!'
omniauth_openid_connect (0.3.5) lib/omniauth/strategies/openid_connect.rb:143:in `other_phase'
omniauth (1.9.1) lib/omniauth/strategy.rb:190:in `call!'
omniauth (1.9.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (1.9.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (1.9.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (1.9.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (1.9.1) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.1) lib/omniauth/strategy.rb:192:in `call!'
omniauth (1.9.1) lib/omniauth/strategy.rb:169:in `call'
flipper (0.22.1) lib/flipper/middleware/memoizer.rb:67:in `memoized_call'
flipper (0.22.1) lib/flipper/middleware/memoizer.rb:42:in `call'
scout_apm (4.1.2) lib/scout_apm/instant/middleware.rb:53:in `call'
scout_apm (4.1.2) lib/scout_apm/middleware.rb:20:in `call'
bullet (6.1.5) lib/bullet/rack.rb:15:in `call'
flipper (0.22.1) lib/flipper/middleware/memoizer.rb:77:in `memoized_call'
flipper (0.22.1) lib/flipper/middleware/memoizer.rb:42:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (6.1.4.1) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (6.1.4.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (6.1.4.1) lib/active_record/migration.rb:601:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.4.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.4.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.1.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.1.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.1.4.1) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.1.4.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.1.4.1) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (6.1.4.1) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (6.1.4.1) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (6.1.4.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-cache (1.12.1) lib/rack/cache/context.rb:141:in `forward'
rack-cache (1.12.1) lib/rack/cache/context.rb:267:in `fetch'
rack-cache (1.12.1) lib/rack/cache/context.rb:196:in `lookup'
rack-cache (1.12.1) lib/rack/cache/context.rb:67:in `call!'
rack-cache (1.12.1) lib/rack/cache/context.rb:52:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.4.1) lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
sentry-raven (3.1.2) lib/raven/integrations/rack.rb:51:in `call'
rack-mini-profiler (2.3.2) lib/mini_profiler/profiler.rb:384:in `call'
webpacker (5.4.2) lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
rack-proxy (0.7.0) lib/rack/proxy.rb:63:in `call'
railties (6.1.4.1) lib/rails/engine.rb:539:in `call'
puma (5.4.0) lib/puma/configuration.rb:249:in `call'
puma (5.4.0) lib/puma/request.rb:77:in `block in handle_request'
puma (5.4.0) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.4.0) lib/puma/request.rb:76:in `handle_request'
puma (5.4.0) lib/puma/server.rb:440:in `process_client'
puma (5.4.0) lib/puma/thread_pool.rb:147:in `block in spawn_thread'