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

Organization SMTP change setting got 500 error #12844

Closed
piotr-sikora-v opened this issue May 11, 2024 · 4 comments
Closed

Organization SMTP change setting got 500 error #12844

piotr-sikora-v opened this issue May 11, 2024 · 4 comments
Assignees
Labels
type: bug Issues that describe a bug

Comments

@piotr-sikora-v
Copy link

piotr-sikora-v commented May 11, 2024

Describe the bug

When I try to change SMTP setting in organization I recive 500 error

To Reproduce

edit organization
set email addres, username, password, smtp host, smtp port
got 500 in log
when back to edit organization settings, all fields are emtpy (like before)

Expected behavior

change smtp settinfs

Screenshots

No response

Stacktrace


I, [2024-05-11T05:42:53.027642 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Started PATCH "/system/organizations/1" for 195.117.15.254 at 2024-05-11 05:42:53 +0000
I, [2024-05-11T05:42:53.067915 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Processing by Decidim::System::OrganizationsController#update as HTML
I, [2024-05-11T05:42:53.068484 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b]   Parameters: {"authenticity_token"=>"[FILTERED]", "organization"=>{"name"=>"v", "host"=>"v.decidimtest.ftdl.pl", "secondary_hosts"=>"", "force_users_to_authenticate_before_access_organization"=>"0", "users_registration_mode"=>"enabled", "available_authorizations"=>[""], "from_email"=>"decidimtest@ftdl.pl", "from_label"=>"", "user_name"=>"decidimtest@ftdl.pl", "password"=>"[FILTERED]", "address"=>"poczta.ftdl.pl", "port"=>"587", "omniauth_settings_facebook_enabled"=>"0", "omniauth_settings_facebook_app_id"=>"", "omniauth_settings_facebook_app_secret"=>"[FILTERED]", "omniauth_settings_facebook_icon"=>"", "omniauth_settings_twitter_enabled"=>"0", "omniauth_settings_twitter_api_key"=>"[FILTERED]", "omniauth_settings_twitter_api_secret"=>"[FILTERED]", "omniauth_settings_twitter_icon"=>"", "omniauth_settings_google_oauth2_enabled"=>"0", "omniauth_settings_google_oauth2_icon"=>"", "omniauth_settings_google_oauth2_client_id"=>"", "omniauth_settings_google_oauth2_client_secret"=>"[FILTERED]", "file_upload_settings"=>{"allowed_file_extensions"=>{"default"=>"jpg,jpeg,png,pdf,rtf,txt", "image"=>"jpg,jpeg,png", "admin"=>"jpg,jpeg,png,pdf,doc,docx,xls,xlsx,ppt,pptx,ppx,rtf,txt,odt,ott,odf,otg,ods,ots"}, "allowed_content_types"=>{"default"=>"image/*,application/pdf,application/rtf,text/plain", "admin"=>"image/*,application/vnd.oasis.opendocument,application/vnd.ms-*,application/msword,application/vnd.ms-word,application/vnd.openxmlformats-officedocument,application/pdf,application/rtf,text/plain"}, "maximum_file_size"=>{"default"=>"10.0", "avatar"=>"5.0"}}, "default-src"=>"", "img-src"=>"", "media-src"=>"", "script-src"=>"", "style-src"=>"", "frame-src"=>"", "font-src"=>"", "connect-src"=>""}, "id"=>"1"}
I, [2024-05-11T05:42:53.114535 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Completed 500 Internal Server Error in 46ms (ActiveRecord: 3.9ms | Allocations: 26394)
F, [2024-05-11T05:42:53.117454 #1] FATAL -- : [261e36e6-f315-438f-85a3-f01a09d17d0b]   
[261e36e6-f315-438f-85a3-f01a09d17d0b] TypeError (no implicit conversion of nil into String):
[261e36e6-f315-438f-85a3-f01a09d17d0b]   
[261e36e6-f315-438f-85a3-f01a09d17d0b] openssl (3.1.0) lib/openssl/pkcs5.rb:14:in `pbkdf2_hmac'
[261e36e6-f315-438f-85a3-f01a09d17d0b] openssl (3.1.0) lib/openssl/pkcs5.rb:14:in `pbkdf2_hmac'
[261e36e6-f315-438f-85a3-f01a09d17d0b] openssl (3.1.0) lib/openssl/pkcs5.rb:19:in `pbkdf2_hmac_sha1'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/key_generator.rb:23:in `generate_key'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-core (0.28.1) lib/decidim/attribute_encryptor.rb:23:in `cryptor'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-core (0.28.1) lib/decidim/attribute_encryptor.rb:6:in `encrypt'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-system (0.28.1) app/forms/decidim/system/update_organization_form.rb:90:in `encrypted_smtp_settings'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-system (0.28.1) app/commands/decidim/system/update_organization.rb:54:in `save_organization'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-system (0.28.1) app/commands/decidim/system/update_organization.rb:27:in `block in call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activerecord (6.1.7.6) lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activerecord (6.1.7.6) lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activerecord (6.1.7.6) lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activerecord (6.1.7.6) lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activerecord (6.1.7.6) lib/active_record/transactions.rb:209:in `transaction'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-core (0.28.1) lib/decidim/command.rb:30:in `transaction'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-system (0.28.1) app/commands/decidim/system/update_organization.rb:26:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-core (0.28.1) lib/decidim/command.rb:19:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-system (0.28.1) app/controllers/decidim/system/organizations_controller.rb:44:in `update'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/abstract_controller/base.rb:228:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal/rendering.rb:30:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/callbacks.rb:106:in `run_callbacks'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/abstract_controller/callbacks.rb:41:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal/rescue.rb:22:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/notifications.rb:203:in `block in instrument'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/notifications.rb:203:in `instrument'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activerecord (6.1.7.6) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/abstract_controller/base.rb:165:in `process'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionview (6.1.7.6) lib/action_view/rendering.rb:39:in `process'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal.rb:190:in `dispatch'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_controller/metal.rb:254:in `dispatch'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/route_set.rb:33:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/mapper.rb:49:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:32:in `each'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:32:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/route_set.rb:842:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/engine.rb:539:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/railtie.rb:207:in `public_send'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/railtie.rb:207:in `method_missing'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/mapper.rb:49:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:32:in `each'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:32:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/route_set.rb:842:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/engine.rb:539:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/railtie.rb:207:in `public_send'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/railtie.rb:207:in `method_missing'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/mapper.rb:49:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:32:in `each'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/journey/router.rb:32:in `serve'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/routing/route_set.rb:842:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] batch-loader (1.5.0) lib/batch_loader/middleware.rb:11:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack-attack (6.6.1) lib/rack/attack.rb:127:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/strategy.rb:202:in `call!'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/strategy.rb:169:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/strategy.rb:202:in `call!'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/strategy.rb:169:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/strategy.rb:202:in `call!'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/strategy.rb:169:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] omniauth (2.1.1) lib/omniauth/builder.rb:44:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] warden (1.2.9) lib/warden/manager.rb:34:in `catch'
[261e36e6-f315-438f-85a3-f01a09d17d0b] warden (1.2.9) lib/warden/manager.rb:34:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-core (0.28.1) lib/decidim/middleware/strip_x_forwarded_host.rb:12:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] decidim-core (0.28.1) lib/decidim/middleware/current_organization.rb:25:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/tempfile_reaper.rb:15:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/etag.rb:27:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/conditional_get.rb:40:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/head.rb:12:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/http/content_security_policy.rb:19:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/session/abstract/id.rb:266:in `context'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/session/abstract/id.rb:260:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/cookies.rb:697:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/callbacks.rb:98:in `run_callbacks'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/rack/logger.rb:37:in `call_app'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/rack/logger.rb:26:in `block in call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/tagged_logging.rb:99:in `block in tagged'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/tagged_logging.rb:37:in `tagged'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/tagged_logging.rb:99:in `tagged'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/rack/logger.rb:26:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/request_id.rb:26:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/method_override.rb:24:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] activesupport (6.1.7.6) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/executor.rb:14:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/static.rb:24:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack (2.2.8) lib/rack/sendfile.rb:110:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/ssl.rb:77:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] actionpack (6.1.7.6) lib/action_dispatch/middleware/host_authorization.rb:148:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] railties (6.1.7.6) lib/rails/engine.rb:539:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/configuration.rb:270:in `call'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/request.rb:100:in `block in handle_request'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/thread_pool.rb:344:in `with_force_shutdown'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/request.rb:99:in `handle_request'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/server.rb:443:in `process_client'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/server.rb:245:in `block in run'
[261e36e6-f315-438f-85a3-f01a09d17d0b] puma (6.3.1) lib/puma/thread_pool.rb:151:in `block in spawn_thread'
I, [2024-05-11T05:42:53.120697 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Processing by Decidim::ErrorsController#internal_server_error as HTML
I, [2024-05-11T05:42:53.121016 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b]   Parameters: {"authenticity_token"=>"[FILTERED]", "organization"=>{"name"=>"v", "host"=>"v.decidimtest.ftdl.pl", "secondary_hosts"=>"", "force_users_to_authenticate_before_access_organization"=>"0", "users_registration_mode"=>"enabled", "available_authorizations"=>[""], "from_email"=>"decidimtest@ftdl.pl", "from_label"=>"", "user_name"=>"decidimtest@ftdl.pl", "password"=>"[FILTERED]", "address"=>"poczta.ftdl.pl", "port"=>"587", "omniauth_settings_facebook_enabled"=>"0", "omniauth_settings_facebook_app_id"=>"", "omniauth_settings_facebook_app_secret"=>"[FILTERED]", "omniauth_settings_facebook_icon"=>"", "omniauth_settings_twitter_enabled"=>"0", "omniauth_settings_twitter_api_key"=>"[FILTERED]", "omniauth_settings_twitter_api_secret"=>"[FILTERED]", "omniauth_settings_twitter_icon"=>"", "omniauth_settings_google_oauth2_enabled"=>"0", "omniauth_settings_google_oauth2_icon"=>"", "omniauth_settings_google_oauth2_client_id"=>"", "omniauth_settings_google_oauth2_client_secret"=>"[FILTERED]", "file_upload_settings"=>{"allowed_file_extensions"=>{"default"=>"jpg,jpeg,png,pdf,rtf,txt", "image"=>"jpg,jpeg,png", "admin"=>"jpg,jpeg,png,pdf,doc,docx,xls,xlsx,ppt,pptx,ppx,rtf,txt,odt,ott,odf,otg,ods,ots"}, "allowed_content_types"=>{"default"=>"image/*,application/pdf,application/rtf,text/plain", "admin"=>"image/*,application/vnd.oasis.opendocument,application/vnd.ms-*,application/msword,application/vnd.ms-word,application/vnd.openxmlformats-officedocument,application/pdf,application/rtf,text/plain"}, "maximum_file_size"=>{"default"=>"10.0", "avatar"=>"5.0"}}, "default-src"=>"", "img-src"=>"", "media-src"=>"", "script-src"=>"", "style-src"=>"", "frame-src"=>"", "font-src"=>"", "connect-src"=>""}, "id"=>"1"}
I, [2024-05-11T05:42:53.121925 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Redirected to https://main.decidimtest.ftdl.pl/system/
I, [2024-05-11T05:42:53.122107 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Filter chain halted as :verify_organization rendered or redirected
I, [2024-05-11T05:42:53.122701 #1]  INFO -- : [261e36e6-f315-438f-85a3-f01a09d17d0b] Completed 302 Found in 1ms (ActiveRecord: 0.0ms | Allocations: 271)
I, [2024-05-11T05:42:53.135522 #1]  INFO -- : [434accc7-d77f-4299-8bab-bdcae3151a17] Started GET "/system/" for 195.117.15.254 at 2024-05-11 05:42:53 +0000
I, [2024-05-11T05:42:53.156183 #1]  INFO -- : [434accc7-d77f-4299-8bab-bdcae3151a17] Processing by Decidim::System::DashboardController#show as H

Extra data

  • Device: Linux
  • Device OS: Docker
  • Browser: Brave
  • Decidim Version: 0.28.1
  • Decidim installation:

Additional context

I think this is problem:
I, [2024-05-11T05:47:20.829219 #1] INFO -- : [a3615bef-c40f-445d-8f3b-16548399d6ff] Completed 500 Internal Server Error in 59ms (ActiveRecord: 8.9ms | Allocations: 26336)
F, [2024-05-11T05:47:20.834049 #1] FATAL -- : [a3615bef-c40f-445d-8f3b-16548399d6ff]
[a3615bef-c40f-445d-8f3b-16548399d6ff] TypeError (no implicit conversion of nil into String):

But i'am not RoR develoepr, so I don't know how to fix it :/

@andreslucena
Copy link
Member

Hi @piotr-sikora-v

Are you running Decidim in development or production environment? Can you share your docker configuration?
Can you confirm that you have defined the SECRET_KEY_BASE environment variable?

@piotr-sikora-v
Copy link
Author

piotr-sikora-v commented May 13, 2024

Hi @andreslucena
Thanks for fast answer and help :)

The problem was with SECRET_KEY_BASE.

I use some old docker-compose.yml example without this variable.

Everything works.

I leave my docker-compose for others.. this works with MailCow server for sending emails .. in admin panel set port to 587:

version: '3'
services:
  decidim:
    image: decidim/decidim:latest
    command: bash -c "
      sed -i \"s/^end$/  config.hosts << \\\"my-decidim-host.tld\\\"\\nend/\"  config/environments/production.rb
      && bundle exec rake db:migrate && bundle exec puma -C config/puma.rb
      "
    ports:
      - 3000:3000
    volumes:
      # Makes our entrypoint scripts available to the container
      # under /code/vendor
      - ./scripts:/code/vendor
    environment:
      - RAILS_ENV=production
      - DATABASE_HOST=pg
      - DATABASE_USERNAME=postgres
      - SMTP_ADDRESS=poczta.ftdl.pl
      - SMTP_DOMAIN=ftdl.pl
      - SMTP_USER=xxxxxxxx@ftdl.pl
      - SMTP_PASSWORD=passs
      - SMTP_AUTHENTICATION=login
      - SECRET_KEY_BASE=xxxxxxxxxx
    links:
      - pg
      - redis
  pg:
    image: postgres
    volumes:
      - pg-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
  redis:
    image: redis
    volumes:
      - redis-data:/data
volumes:
  pg-data: {}
  redis-data: {}

@andreslucena andreslucena added the type: bug Issues that describe a bug label May 14, 2024
@andreslucena
Copy link
Member

Great, thanks for the confirmation @piotr-sikora-v

I'm working in a PR to add a check for this error that's easy to make

@andreslucena
Copy link
Member

This will be fixed with #12847 by adding a validation, and with #12846 by adding a check in the dashboard, to let users know that you need to define this secret key.

Thanks @piotr-sikora-v for reporting this!

@andreslucena andreslucena self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issues that describe a bug
Projects
None yet
Development

No branches or pull requests

2 participants