Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with your new Payment Method translations #7

Closed
Kulgar opened this issue May 30, 2022 · 18 comments
Closed

Error with your new Payment Method translations #7

Kulgar opened this issue May 30, 2022 · 18 comments

Comments

@Kulgar
Copy link
Contributor

Kulgar commented May 30, 2022

Hello,

I have this weird error when trying to access payment methods in admin:

image

And I also get it when I'm on the payment page during checkout...

I tried to find a solution, but no luck yet.
Any idea? :-)

@mrbrdo
Copy link
Owner

mrbrdo commented May 30, 2022

Hm, after updating, did you install the new migrations (rails g spree_mobility:install) and migrate them?
Otherwise a full backtrace would also be helpful.

@Kulgar
Copy link
Contributor Author

Kulgar commented May 30, 2022

yes I did :-)

Here is the full backtrace:

mobility (1.2.6) lib/mobility/plugins/backend.rb:159:in `rescue in mobility_backend_class'
mobility (1.2.6) lib/mobility/plugins/backend.rb:156:in `mobility_backend_class'
mobility (1.2.6) lib/mobility/plugins/backend.rb:126:in `[]'
mobility (1.2.6) lib/mobility/plugins/reader.rb:29:in `name'
spree_backend (4.4.0) app/views/spree/admin/payment_methods/index.html.erb:47
activerecord (6.1.5.1) lib/active_record/relation/delegation.rb:88:in `each'
activerecord (6.1.5.1) lib/active_record/relation/delegation.rb:88:in `each'
spree_backend (4.4.0) app/views/spree/admin/payment_methods/index.html.erb:40
actionview (6.1.5.1) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.5.1) lib/action_view/base.rb:247:in `_run'
actionview (6.1.5.1) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.5.1) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.5.1) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.5.1) lib/action_view/template.rb:152:in `render'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:56:in `block in render_template'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:71:in `block in render_with_layout'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (6.1.5.1) lib/action_view/rendering.rb:117:in `block in _render_template'
actionview (6.1.5.1) lib/action_view/base.rb:273:in `in_rendering_context'
actionview (6.1.5.1) lib/action_view/rendering.rb:116:in `_render_template'
actionpack (6.1.5.1) lib/action_controller/metal/streaming.rb:218:in `_render_template'
actionview (6.1.5.1) lib/action_view/rendering.rb:103:in `render_to_body'
actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (6.1.5.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (6.1.5.1) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
~/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
activesupport (6.1.5.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
activerecord (6.1.5.1) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
actionpack (6.1.5.1) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (6.1.5.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.1.5.1) lib/abstract_controller/base.rb:228:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.1.5.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
actiontext (6.1.5.1) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (6.1.5.1) lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack (6.1.5.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord (6.1.5.1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.1.5.1) lib/abstract_controller/base.rb:165:in `process'
actionview (6.1.5.1) lib/action_view/rendering.rb:39:in `process'
actionpack (6.1.5.1) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.1.5.1) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
railties (6.1.5.1) lib/rails/engine.rb:539:in `call'
railties (6.1.5.1) lib/rails/railtie.rb:207:in `public_send'
railties (6.1.5.1) lib/rails/railtie.rb:207:in `method_missing'
actionpack (6.1.5.1) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
actionpack (6.1.5.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:842: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.1) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3.1) lib/rack/etag.rb:27:in `call'
rack (2.2.3.1) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3.1) lib/rack/head.rb:12:in `call'
actionpack (6.1.5.1) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (6.1.5.1) lib/action_dispatch/http/content_security_policy.rb:19:in `call'
rack (2.2.3.1) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3.1) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (6.1.5.1) lib/active_record/migration.rb:601:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.5.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.2.0) lib/web_console/middleware.rb:19:in `block in call'
web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.2.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.1.5.1) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.1.5.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (6.1.5.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3.1) lib/rack/method_override.rb:24:in `call'
rack (2.2.3.1) lib/rack/runtime.rb:22:in `call'
activesupport (6.1.5.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-livereload (0.3.17) lib/rack/livereload.rb:23:in `_call'
rack-livereload (0.3.17) lib/rack/livereload.rb:14:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3.1) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/host_authorization.rb:148:in `call'
rack-mini-profiler (2.3.4) lib/mini_profiler/profiler.rb:393:in `call'
railties (6.1.5.1) lib/rails/engine.rb:539:in `call'
puma (5.6.4) lib/puma/configuration.rb:252:in `call'
puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'
puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.6.4) lib/puma/request.rb:76:in `handle_request'
puma (5.6.4) lib/puma/server.rb:441:in `process_client'
puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

I was wondering if it could be linked to the spree mollie gateway that I use which also includes a payment method decorator...

@mrbrdo
Copy link
Owner

mrbrdo commented May 30, 2022

I was wondering if it could be linked to the spree mollie gateway that I use which also includes a payment method decorator...

Not likely because I namespaced our decorator under SpreeMobility. Are you on Spree slack maybe? Could try to quickly debug this

@mrbrdo
Copy link
Owner

mrbrdo commented May 30, 2022

Oh wait I think I know what might be going on.
Could you try to use my mobility branch:
gem 'mobility', github: 'mrbrdo/mobility', branch: 'mrbrdo'
I'm still waiting for them to merge shioyama/mobility#568 as Spree is doing STI subclassing for payment methods (different gateways etc) and mobility doesn't handle subclasses correctly.

@Kulgar
Copy link
Contributor Author

Kulgar commented May 30, 2022

@mrbrdo : ok, switched to your branch and now, I have a different error, related to... spree mollie gateway ^^

image

activerecord (6.1.5.1) lib/active_record/associations.rb:313:in `association'
activerecord (6.1.5.1) lib/active_record/associations/builder/association.rb:103:in `translations'
mobility (b87ac2f14e29) lib/mobility/backends/table.rb:106:in `translations'
mobility (b87ac2f14e29) lib/mobility/backends/table.rb:88:in `read'
mobility (b87ac2f14e29) lib/mobility/plugins/active_record/query.rb:64:in `read'
mobility (b87ac2f14e29) lib/mobility/plugins/fallbacks.rb:156:in `block in read'
mobility (b87ac2f14e29) lib/mobility/plugins/fallbacks.rb:155:in `each'
mobility (b87ac2f14e29) lib/mobility/plugins/fallbacks.rb:155:in `read'
mobility (b87ac2f14e29) lib/mobility/plugins/presence.rb:32:in `read'
mobility (b87ac2f14e29) lib/mobility/plugins/reader.rb:29:in `name'
spree_backend (4.4.0) app/views/spree/admin/payment_methods/index.html.erb:47
activerecord (6.1.5.1) lib/active_record/relation/delegation.rb:88:in `each'
activerecord (6.1.5.1) lib/active_record/relation/delegation.rb:88:in `each'
spree_backend (4.4.0) app/views/spree/admin/payment_methods/index.html.erb:40
actionview (6.1.5.1) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.5.1) lib/action_view/base.rb:247:in `_run'
actionview (6.1.5.1) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.5.1) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.5.1) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.5.1) lib/action_view/template.rb:152:in `render'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:56:in `block in render_template'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:71:in `block in render_with_layout'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (6.1.5.1) lib/action_view/rendering.rb:117:in `block in _render_template'
actionview (6.1.5.1) lib/action_view/base.rb:273:in `in_rendering_context'
actionview (6.1.5.1) lib/action_view/rendering.rb:116:in `_render_template'
actionpack (6.1.5.1) lib/action_controller/metal/streaming.rb:218:in `_render_template'
actionview (6.1.5.1) lib/action_view/rendering.rb:103:in `render_to_body'
actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (6.1.5.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (6.1.5.1) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
~/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
activesupport (6.1.5.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
activerecord (6.1.5.1) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
actionpack (6.1.5.1) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (6.1.5.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.1.5.1) lib/abstract_controller/base.rb:228:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.1.5.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
actiontext (6.1.5.1) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (6.1.5.1) lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack (6.1.5.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack (6.1.5.1) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord (6.1.5.1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.1.5.1) lib/abstract_controller/base.rb:165:in `process'
actionview (6.1.5.1) lib/action_view/rendering.rb:39:in `process'
actionpack (6.1.5.1) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.1.5.1) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
railties (6.1.5.1) lib/rails/engine.rb:539:in `call'
railties (6.1.5.1) lib/rails/railtie.rb:207:in `public_send'
railties (6.1.5.1) lib/rails/railtie.rb:207:in `method_missing'
actionpack (6.1.5.1) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
actionpack (6.1.5.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:842: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.1) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3.1) lib/rack/etag.rb:27:in `call'
rack (2.2.3.1) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3.1) lib/rack/head.rb:12:in `call'
actionpack (6.1.5.1) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (6.1.5.1) lib/action_dispatch/http/content_security_policy.rb:19:in `call'
rack (2.2.3.1) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3.1) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (6.1.5.1) lib/active_record/migration.rb:601:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.5.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.5.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.2.0) lib/web_console/middleware.rb:19:in `block in call'
web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.2.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.1.5.1) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.1.5.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:99:in `block in tagged'
activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:37:in `tagged'
activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:99:in `tagged'
railties (6.1.5.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3.1) lib/rack/method_override.rb:24:in `call'
rack (2.2.3.1) lib/rack/runtime.rb:22:in `call'
activesupport (6.1.5.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-livereload (0.3.17) lib/rack/livereload.rb:23:in `_call'
rack-livereload (0.3.17) lib/rack/livereload.rb:14:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3.1) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.5.1) lib/action_dispatch/middleware/host_authorization.rb:148:in `call'
rack-mini-profiler (2.3.4) lib/mini_profiler/profiler.rb:393:in `call'
railties (6.1.5.1) lib/rails/engine.rb:539:in `call'
puma (5.6.4) lib/puma/configuration.rb:252:in `call'
puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'
puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.6.4) lib/puma/request.rb:76:in `handle_request'
puma (5.6.4) lib/puma/server.rb:441:in `process_client'
puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

@mrbrdo
Copy link
Owner

mrbrdo commented May 31, 2022

Seems like a different issue, like translations assoc is not inherited from Spree::PaymentMethod. Can you give me the output of this:

p Spree::PaymentMethod.reflect_on_all_associations.map(&:name)
p Spree::PaymentMethod.object_id
klass = Spree::Gateway::MollieGateway
p klass.object_id
p klass.superclass
p klass.reflect_on_all_associations.map(&:name)
p klass.ancestors

Also you could try making sure spree_mobility is above/before spree-mollie-gateway in Gemfile, although I'm not sure that will help.

@Kulgar
Copy link
Contributor Author

Kulgar commented May 31, 2022

Sure, here are the results:

2.7.4 :018 > p Spree::PaymentMethod.reflect_on_all_associations.map(&:name)
[:store_payment_methods, :stores, :payments, :credit_cards]

2.7.4 :026 > p Spree::PaymentMethod.object_id
49480

2.7.4 :027 > klass = Spree::Gateway::MollieGateway
 => Spree::Gateway::MollieGateway 

2.7.4 :028 > klass.object_id
 => 49640

2.7.4 :030 > p klass.superclass
Spree::PaymentMethod

2.7.4 :031 > p klass.reflect_on_all_associations.map(&:name)
[:store_payment_methods, :stores, :payments, :credit_cards, :spree_mollie_payment_sources]

2.7.4 :032 > p klass.ancestors
[Spree::Gateway::MollieGateway, Spree::Mollie::MoneyFormatter, ActiveSupport::Concern, Spree::Gateway::MollieGateway::GeneratedAssociationMethods, Spree::Gateway::MollieGateway::GeneratedAttributeMethods, SpreeMobility::CoreExt::Spree::PaymentMethodDecorator, Spree::PaymentMethodDecorator, Spree::PaymentMethod, Spree::Metadata, Spree::MultiStoreResource, ActiveRecord::Acts::List::NoUpdate, ActiveRecord::Acts::List::InstanceMethods, Paranoia, Spree::PaymentMethod::GeneratedAssociationMethods, Spree::PaymentMethod::GeneratedAttributeMethods, Spree::Base(abstract), Spree::RansackableAttributes, Spree::Preferences::Preferable, Spree::Base::GeneratedAssociationMethods, Spree::Base::GeneratedAttributeMethods, ApplicationRecord(abstract), Kaminari::ConfigurationMethods, Kaminari::ActiveRecordModelExtension, ApplicationRecord::GeneratedAssociationMethods, ApplicationRecord::GeneratedAttributeMethods, ActiveRecord::Base, Stringex::ActsAsUrl::ActsAsUrlInstanceMethods, Turbo::Broadcastable, ActionText::Attribute, ActiveStorage::Reflection::ActiveRecordExtensions, ActiveStorage::Attached::Model, GlobalID::Identification, ActiveStorageValidations, Kaminari::ActiveRecordExtension, FriendlyId::UnfriendlyUtils, CanCan::ModelAdditions, ActiveRecord::Suppressor, ActiveRecord::SignedId, ActiveRecord::SecureToken, ActiveRecord::Store, ActiveRecord::Serialization, ActiveModel::Serializers::JSON, ActiveModel::Serialization, ActiveRecord::Reflection, ActiveRecord::NoTouching, ActiveRecord::TouchLater, ActiveRecord::Transactions, ActiveRecord::NestedAttributes, ActiveRecord::AutosaveAssociation, ActiveModel::SecurePassword, ActiveRecord::Associations, ActiveRecord::Timestamp, ActiveModel::Validations::Callbacks, ActiveRecord::Callbacks, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirty, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::AttributeMethods::Query, ActiveRecord::AttributeMethods::BeforeTypeCast, ActiveRecord::AttributeMethods::Write, ActiveRecord::AttributeMethods::Read, ActiveRecord::Base::GeneratedAssociationMethods, ActiveRecord::Base::GeneratedAttributeMethods, ActiveRecord::AttributeMethods, ActiveModel::AttributeMethods, ActiveRecord::Locking::Pessimistic, ActiveRecord::Locking::Optimistic, ActiveRecord::Attributes, ActiveRecord::CounterCache, ActiveRecord::Validations, ActiveModel::Validations::HelperMethods, ActiveSupport::Callbacks, ActiveModel::Validations, ActiveRecord::Integration, ActiveModel::Conversion, ActiveRecord::AttributeAssignment, ActiveModel::AttributeAssignment, ActiveModel::ForbiddenAttributesProtection, ActiveRecord::Sanitization, ActiveRecord::Scoping::Named, ActiveRecord::Scoping::Default, ActiveRecord::Scoping, ActiveRecord::Inheritance, ActiveRecord::ModelSchema, ActiveRecord::ReadonlyAttributes, ActiveRecord::Persistence, ActiveRecord::Core, ActiveSupport::Dependencies::ZeitwerkIntegration::RequireDependency, ActiveSupport::ForkTracker::CoreExtPrivate, ActiveSupport::ForkTracker::CoreExt, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, FriendlyId::ObjectUtils, PP::ObjectMixin, ActiveSupport::Dependencies::Loadable, ActiveSupport::Tryable, JSON::Ext::Generator::GeneratorMethods::Object, Kernel, BasicObject]

And... spree_mobility wasn't above spree mollie gateway. I moved it, but it didn't solve the problem.

And yes, you are right, Spree::Gateway::MollieGateway is inheriting from payment method:

https://github.com/mollie/spree-mollie-gateway/blob/master/app/models/spree/gateway/mollie_gateway.rb#L2

@mrbrdo
Copy link
Owner

mrbrdo commented May 31, 2022

The issue seems to be that the MollieGateway class is loaded before SpreeMobility adds translations to PaymentMethod, and it seems in this case the class doesn't inherit the association.
You should be able to at least make it work by making an initializer with this:

Rails.application.config.to_prepare do
  ::Spree::Gateway::MollieGateway.prepend SpreeMobility::CoreExt::Spree::PaymentMethodDecorator
Prepended PaymentMethodDecorator
end

I will try to look further into this though.

@Kulgar
Copy link
Contributor Author

Kulgar commented May 31, 2022

Thanks a lot, this is, indeed, working, and now I can translate Mollie Payment method :-)

Rails.application.config.to_prepare do
  ::Spree::Gateway::MollieGateway.prepend SpreeMobility::CoreExt::Spree::PaymentMethodDecorator
  # Prepended PaymentMethodDecorator
end

I had to comment "prepended PaymentMethodDecorator" though, otherwise I had an error booting the server "uninitialized constant PaymentMethodDecorator"

Thanks for the quick fix!

Kulgar added a commit to Kulgar/spree_mobility that referenced this issue May 31, 2022
@mrbrdo
Copy link
Owner

mrbrdo commented May 31, 2022

@Kulgar can you try removing this initializer and updating to the latest main branch of spree_mobility? I just pushed some code which should fix this, it works in console but please try it in the backend (add/update the translations for this payment method and see if it works on frontend).

@Kulgar
Copy link
Contributor Author

Kulgar commented May 31, 2022

@mrbrdo it seems to work :-) Thx!

How did you fix this? I'm curious.

@mrbrdo
Copy link
Owner

mrbrdo commented Jun 1, 2022

03ddff3

At the point when applying the decorator to PaymentMethod, the subclass (descendant) of MollieGateway is already loaded, so for all such descendants I manually apply the translates call etc. Although it would be better if the decorator was loaded before any descendants were loaded, I will see if there's a way to do that instead.

@mrbrdo mrbrdo closed this as completed in 621a0a0 Jun 1, 2022
@mrbrdo
Copy link
Owner

mrbrdo commented Jun 1, 2022

@Kulgar I think I found the actually correct way to fix this. The only issue was where to_prepare was called.
With latest main, it should now work correctly just based on order in Gemfile (spree_mobility must be before other payment method gems). Although the previous fix works independent of this order, it's wasn't the best solution for other reasons.

Could you please test this one last time with latest main branch and confirm it works (and does not work if gem order is changed in Gemfile)? Then I can release this as next version.

Thanks

@mrbrdo
Copy link
Owner

mrbrdo commented Jun 5, 2022

@Kulgar let me know please :)

@Kulgar
Copy link
Contributor Author

Kulgar commented Jun 6, 2022

@mrbrdo Sorry, I had some kind of an outage at home.
Just tested it with your latest main branch, and it works even if gem order is changed in Gemfile.

@Kulgar
Copy link
Contributor Author

Kulgar commented Jun 7, 2022

@mrbrdo : another problem, in dev it works fine but in production I get the following error when accessing store translations:

I, [2022-06-07T16:10:50.818416 #23762]  INFO -- : [fce7228d-190f-4a64-a3cd-d790e3725757] Started GET "/admin/stores/1/translations" for 80.11.12.68 at 2022-06-07 16:10:50 +0000
I, [2022-06-07T16:10:50.819863 #23762]  INFO -- : [fce7228d-190f-4a64-a3cd-d790e3725757] Processing by Spree::Admin::TranslationsController#index as HTML
I, [2022-06-07T16:10:50.820037 #23762]  INFO -- : [fce7228d-190f-4a64-a3cd-d790e3725757]   Parameters: {"resource"=>"stores", "resource_id"=>"1"}
I, [2022-06-07T16:10:50.850103 #23762]  INFO -- : [fce7228d-190f-4a64-a3cd-d790e3725757]   Rendered /path/shared/bundle/ruby/2.7.0/bundler/gems/spree_mobility-c180eded2276/app/views/spree/admin/translations/store.html.erb within spree/layouts/admin (Duration: 20.1ms | Allocations: 5827)
I, [2022-06-07T16:10:50.850372 #23762]  INFO -- : [fce7228d-190f-4a64-a3cd-d790e3725757]   Rendered layout /path/shared/bundle/ruby/2.7.0/gems/spree_backend-4.4.0/app/views/spree/layouts/admin.html.erb (Duration: 20.4ms | Allocations: 5853)
I, [2022-06-07T16:10:50.850728 #23762]  INFO -- : [fce7228d-190f-4a64-a3cd-d790e3725757] Completed 500 Internal Server Error in 30ms (ActiveRecord: 2.0ms | Allocations: 8689)
F, [2022-06-07T16:10:50.852062 #23762] FATAL -- : [fce7228d-190f-4a64-a3cd-d790e3725757]  
[fce7228d-190f-4a64-a3cd-d790e3725757] ActionView::Template::Error (undefined method `mobility_attributes' for #<Class:0x000055d8f41e60b8>):
[fce7228d-190f-4a64-a3cd-d790e3725757]     4:     <%= Spree.t(:'i18n.fields') %>
[fce7228d-190f-4a64-a3cd-d790e3725757]     5:   </div>
[fce7228d-190f-4a64-a3cd-d790e3725757]     6:   <div class="list-group" id="attr_list">
[fce7228d-190f-4a64-a3cd-d790e3725757]     7:     <% resource_class.mobility_attributes.each_with_index do |attr, i| %>
[fce7228d-190f-4a64-a3cd-d790e3725757]     8:       <a class="list-group-item <%= 'active' if i.zero? %>" data-attr="<%= attr %>" href="#">
[fce7228d-190f-4a64-a3cd-d790e3725757]     9:         <%= resource_class.human_attribute_name(attr) %>
[fce7228d-190f-4a64-a3cd-d790e3725757]    10:       </a>
[fce7228d-190f-4a64-a3cd-d790e3725757]   
[fce7228d-190f-4a64-a3cd-d790e3725757] activerecord (6.1.5.1) lib/active_record/dynamic_matchers.rb:22:in `method_missing'
[fce7228d-190f-4a64-a3cd-d790e3725757] spree_mobility (c180eded2276) app/views/spree/admin/translations/_fields.html.erb:7
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/base.rb:247:in `public_send'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/base.rb:247:in `_run'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/template.rb:154:in `block in render'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:205:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/template.rb:345:in `instrument_render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/template.rb:152:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/partial_renderer.rb:280:in `render_partial_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/partial_renderer.rb:271:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:81:in `render_partial_to_object'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:53:in `render_partial'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/helpers/rendering_helper.rb:45:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] spree_mobility (c180eded2276) app/views/spree/admin/translations/store.html.erb:13
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/base.rb:247:in `public_send'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/base.rb:247:in `_run'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/template.rb:154:in `block in render'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:205:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/template.rb:345:in `instrument_render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/template.rb:152:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:56:in `block in render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:71:in `block in render_with_layout'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/template_renderer.rb:11:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/rendering.rb:117:in `block in _render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/base.rb:273:in `in_rendering_context'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/rendering.rb:116:in `_render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/streaming.rb:218:in `_render_template'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/rendering.rb:103:in `render_to_body'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/abstract_controller/rendering.rb:25:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:36:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
[fce7228d-190f-4a64-a3cd-d790e3725757] /path/ruby-2.7.4/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
[fce7228d-190f-4a64-a3cd-d790e3725757] activerecord (6.1.5.1) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
[fce7228d-190f-4a64-a3cd-d790e3725757] spree_mobility (c180eded2276) app/controllers/spree/admin/translations_controller.rb:13:in `index'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/abstract_controller/base.rb:228:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
[fce7228d-190f-4a64-a3cd-d790e3725757] actiontext (6.1.5.1) lib/action_text/rendering.rb:20:in `with_renderer'
[fce7228d-190f-4a64-a3cd-d790e3725757] actiontext (6.1.5.1) lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/callbacks.rb:126:in `instance_exec'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/callbacks.rb:137:in `run_callbacks'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `block in instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/notifications.rb:203:in `instrument'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] activerecord (6.1.5.1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/abstract_controller/base.rb:165:in `process'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionview (6.1.5.1) lib/action_view/rendering.rb:39:in `process'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal.rb:190:in `dispatch'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_controller/metal.rb:254:in `dispatch'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:33:in `serve'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `each'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `serve'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/engine.rb:539:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/railtie.rb:207:in `public_send'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/railtie.rb:207:in `method_missing'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/routing/mapper.rb:49:in `serve'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `each'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/journey/router.rb:32:in `serve'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/routing/route_set.rb:842:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
[fce7228d-190f-4a64-a3cd-d790e3725757] warden (1.2.9) lib/warden/manager.rb:34:in `catch'
[fce7228d-190f-4a64-a3cd-d790e3725757] warden (1.2.9) lib/warden/manager.rb:34:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/tempfile_reaper.rb:15:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/etag.rb:27:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/conditional_get.rb:27:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/head.rb:12:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/http/content_security_policy.rb:19:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/session/abstract/id.rb:266:in `context'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/session/abstract/id.rb:260:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/cookies.rb:689:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/rack/logger.rb:37:in `call_app'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/rack/logger.rb:26:in `block in call'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:99:in `block in tagged'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:37:in `tagged'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/tagged_logging.rb:99:in `tagged'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/rack/logger.rb:26:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/method_override.rb:24:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/runtime.rb:22:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] activesupport (6.1.5.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] rack (2.2.3.1) lib/rack/sendfile.rb:110:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] actionpack (6.1.5.1) lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] railties (6.1.5.1) lib/rails/engine.rb:539:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] puma (5.6.4) lib/puma/configuration.rb:252:in `call'
[fce7228d-190f-4a64-a3cd-d790e3725757] puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'
[fce7228d-190f-4a64-a3cd-d790e3725757] puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
[fce7228d-190f-4a64-a3cd-d790e3725757] puma (5.6.4) lib/puma/request.rb:76:in `handle_request'
[fce7228d-190f-4a64-a3cd-d790e3725757] puma (5.6.4) lib/puma/server.rb:441:in `process_client'
[fce7228d-190f-4a64-a3cd-d790e3725757] puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

I checked in the rails console and, mobility_attributes works fine for all translated classes except for "Spree::Store" and "Spree::Variant".

Weird... as I have no error in development.
I downgraded to your previous "main" fix, commit: "03ddff3252ac5121bad0ca742f8eec63b3349084" and it works again.

So, I'm guessing, this is due to your latest fix you asked me to test :-)

@mrbrdo
Copy link
Owner

mrbrdo commented Jun 11, 2022

@Kulgar interesting. And this happens in production no matter the order of gems in the Gemfile?

@Kulgar
Copy link
Contributor Author

Kulgar commented Jun 13, 2022

@mrbrdo yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants