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

ArgumentError in Fae::SetupController#create_first_user after following installation steps + workaround from issue #600 #602

Open
s2k opened this issue Mar 3, 2024 · 2 comments

Comments

@s2k
Copy link

s2k commented Mar 3, 2024

Setup

Behaviour

I get this response when submitting a correctly filled form for the first user:

ArgumentError in Fae::SetupController#create_first_user
missing keyword: :coder If no default coder is configured, a coder must be provided to serialize.
Extracted source (around line #208):

206         coder ||= default_column_serializer
207         unless coder
208            raise ArgumentError, <<~MSG.squish
209             missing keyword: :coder
210
211              If no default coder is configured, a coder must be provided to `serialize`.

Stack Trace

activerecord (7.1.3.2) lib/active_record/attribute_methods/serialization.rb:208:in `serialize'
fae-rails (3.0.0) app/models/fae/change.rb:9:in `<class:Change>'
fae-rails (3.0.0) app/models/fae/change.rb:2:in `<module:Fae>'
fae-rails (3.0.0) app/models/fae/change.rb:1:in `<main>'
/Users/stephan/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
/Users/stephan/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
bootsnap (1.18.3) lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
zeitwerk (2.6.13) lib/zeitwerk/kernel.rb:26:in `require'
fae-rails (3.0.0) app/models/concerns/fae/trackable.rb:30:in `add_create_change'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:403:in `block in make_lambda'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:239:in `block in halting_and_conditional'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:602:in `block in invoke_after'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:602:in `each'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:602:in `invoke_after'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:111:in `run_callbacks'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:952:in `_run_create_callbacks'
activerecord (7.1.3.2) lib/active_record/callbacks.rb:445:in `_create_record'
activerecord (7.1.3.2) lib/active_record/timestamp.rb:114:in `_create_record'
activerecord (7.1.3.2) lib/active_record/persistence.rb:1221:in `create_or_update'
activerecord (7.1.3.2) lib/active_record/callbacks.rb:441:in `block in create_or_update'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
activerecord (7.1.3.2) lib/active_record/autosave_association.rb:375:in `around_save_collection_association'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:141:in `run_callbacks'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:952:in `_run_save_callbacks'
activerecord (7.1.3.2) lib/active_record/callbacks.rb:441:in `create_or_update'
activerecord (7.1.3.2) lib/active_record/timestamp.rb:125:in `create_or_update'
activerecord (7.1.3.2) lib/active_record/persistence.rb:718:in `save'
activerecord (7.1.3.2) lib/active_record/validations.rb:49:in `save'
activerecord (7.1.3.2) lib/active_record/transactions.rb:309:in `block in save'
activerecord (7.1.3.2) lib/active_record/transactions.rb:365:in `block in with_transaction_returning_status'
activerecord (7.1.3.2) lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
activesupport (7.1.3.2) lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
activerecord (7.1.3.2) lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
activerecord (7.1.3.2) lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
activerecord (7.1.3.2) lib/active_record/transactions.rb:361:in `with_transaction_returning_status'
activerecord (7.1.3.2) lib/active_record/transactions.rb:309:in `save'
activerecord (7.1.3.2) lib/active_record/suppressor.rb:52:in `save'
fae-rails (3.0.0) app/controllers/fae/setup_controller.rb:25:in `create_first_user'
actionpack (7.1.3.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.1.3.2) lib/abstract_controller/base.rb:224:in `process_action'
actionpack (7.1.3.2) lib/action_controller/metal/rendering.rb:165:in `process_action'
actionpack (7.1.3.2) lib/abstract_controller/callbacks.rb:259:in `block in process_action'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
turbo-rails (2.0.4) lib/turbo-rails.rb:24:in `with_request_id'
turbo-rails (2.0.4) app/controllers/concerns/turbo/request_id_tracking.rb:10:in `turbo_tracking_request_id'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
actiontext (7.1.3.2) lib/action_text/rendering.rb:23:in `with_renderer'
actiontext (7.1.3.2) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:130:in `instance_exec'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:141:in `run_callbacks'
actionpack (7.1.3.2) lib/abstract_controller/callbacks.rb:258:in `process_action'
actionpack (7.1.3.2) lib/action_controller/metal/rescue.rb:25:in `process_action'
actionpack (7.1.3.2) lib/action_controller/metal/instrumentation.rb:74:in `block in process_action'
activesupport (7.1.3.2) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.1.3.2) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.1.3.2) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.1.3.2) lib/action_controller/metal/instrumentation.rb:73:in `process_action'
actionpack (7.1.3.2) lib/action_controller/metal/params_wrapper.rb:261:in `process_action'
activerecord (7.1.3.2) lib/active_record/railties/controller_runtime.rb:32:in `process_action'
actionpack (7.1.3.2) lib/abstract_controller/base.rb:160:in `process'
actionview (7.1.3.2) lib/action_view/rendering.rb:40:in `process'
actionpack (7.1.3.2) lib/action_controller/metal.rb:227:in `dispatch'
actionpack (7.1.3.2) lib/action_controller/metal.rb:309:in `dispatch'
actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:51:in `block in serve'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:131:in `block in find_routes'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:124:in `each'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:124:in `find_routes'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:882:in `call'
railties (7.1.3.2) lib/rails/engine.rb:536:in `call'
railties (7.1.3.2) lib/rails/railtie.rb:226:in `public_send'
railties (7.1.3.2) lib/rails/railtie.rb:226:in `method_missing'
actionpack (7.1.3.2) lib/action_dispatch/routing/mapper.rb:22:in `block in <class:Constraints>'
actionpack (7.1.3.2) lib/action_dispatch/routing/mapper.rb:51:in `serve'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:51:in `block in serve'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:131:in `block in find_routes'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:124:in `each'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:124:in `find_routes'
actionpack (7.1.3.2) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.1.3.2) lib/action_dispatch/routing/route_set.rb:882:in `call'
remotipart (1.4.4) lib/remotipart/middleware.rb:32: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 (3.0.9.1) lib/rack/tempfile_reaper.rb:20:in `call'
rack (3.0.9.1) lib/rack/etag.rb:29:in `call'
rack (3.0.9.1) lib/rack/conditional_get.rb:43:in `call'
rack (3.0.9.1) lib/rack/head.rb:15:in `call'
actionpack (7.1.3.2) lib/action_dispatch/http/permissions_policy.rb:36:in `call'
actionpack (7.1.3.2) lib/action_dispatch/http/content_security_policy.rb:33:in `call'
rack-session (2.0.0) lib/rack/session/abstract/id.rb:272:in `context'
rack-session (2.0.0) lib/rack/session/abstract/id.rb:266:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (7.1.3.2) lib/active_record/migration.rb:655:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (7.1.3.2) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (7.1.3.2) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/actionable_exceptions.rb:16:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.2.1) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.2.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.2.1) lib/web_console/middleware.rb:17:in `catch'
web-console (4.2.1) lib/web_console/middleware.rb:17:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (7.1.3.2) lib/rails/rack/logger.rb:37:in `call_app'
railties (7.1.3.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (7.1.3.2) lib/active_support/tagged_logging.rb:135:in `block in tagged'
activesupport (7.1.3.2) lib/active_support/tagged_logging.rb:39:in `tagged'
activesupport (7.1.3.2) lib/active_support/tagged_logging.rb:135:in `tagged'
activesupport (7.1.3.2) lib/active_support/broadcast_logger.rb:240:in `method_missing'
railties (7.1.3.2) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/remote_ip.rb:92:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/request_id.rb:28:in `call'
rack (3.0.9.1) lib/rack/method_override.rb:28:in `call'
rack (3.0.9.1) lib/rack/runtime.rb:24:in `call'
activesupport (7.1.3.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/server_timing.rb:59:in `block in call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/server_timing.rb:24:in `collect_events'
actionpack (7.1.3.2) lib/action_dispatch/middleware/server_timing.rb:58:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/static.rb:25:in `call'
rack (3.0.9.1) lib/rack/sendfile.rb:114:in `call'
actionpack (7.1.3.2) lib/action_dispatch/middleware/host_authorization.rb:141:in `call'
railties (7.1.3.2) lib/rails/engine.rb:536:in `call'
puma (6.4.2) lib/puma/configuration.rb:272:in `call'
puma (6.4.2) lib/puma/request.rb:100:in `block in handle_request'
puma (6.4.2) lib/puma/thread_pool.rb:378:in `with_force_shutdown'
puma (6.4.2) lib/puma/request.rb:99:in `handle_request'
puma (6.4.2) lib/puma/server.rb:464:in `process_client'
puma (6.4.2) lib/puma/server.rb:245:in `block in run'
puma (6.4.2) lib/puma/thread_pool.rb:155:in `block in spawn_thread'

Request

Parameters

{"authenticity_token"=>"[FILTERED]", "user"=>{"first_name"=>"Johnny", "last_name"=>"Wahoodie", "email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}

Session info

Only keys: _csrf_token & session_id

Header Info

GATEWAY_INTERFACE: "CGI/1.2"
HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_ENCODING: "gzip, deflate"
HTTP_ACCEPT_LANGUAGE: "en-GB,en;q=0.9"
HTTP_ORIGIN: "http://127.0.0.1:3000"
HTTP_VERSION: "HTTP/1.1"
ORIGINAL_SCRIPT_NAME: ""
REMOTE_ADDR: "127.0.0.1"
SERVER_NAME: "127.0.0.1"
SERVER_PROTOCOL: "HTTP/1.1"
@bsl
Copy link

bsl commented Mar 6, 2024

This seems to have something to do with incompatibility with Rails 7.1. It doesn't seem to happen if I do gem 'rails', '~> 7.0.8'.

@a-badger-llama
Copy link

It looks like in Rails 7.1, they changed the default coder to be nil: https://guides.rubyonrails.org/configuring.html#config-active-record-default-column-serializer

I set config.active_record.default_column_serializer = YAML and that resolved the error for me

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

3 participants