User debryc reported that new users are unable to sign up on their Discourse site, hub.youthpowercoalition.org, possibly due to emails containing numbers, receiving an error: “Something went wrong, perhaps the username or email is already registered.” Simsnet suggested checking the site’s logs for database or account issues. debryc shared recent log entries showing MIME type errors and PostgreSQL unique constraint violations related to category_user associations. The issue was later resolved by the site administrator, who credited a forum thread for the solution debryc.
Message (3 copies reported)
Failed to handle exception in exception app middleware : PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "idx_category_users_user_id_category_id"
DETAIL: Key (user_id, category_id)=(150, 43) already exists.
Backtrace
rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'
rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69: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'
Message
Job exception: One of the users you are sending this message to could not be found.
Backtrace
/var/www/discourse/lib/post_creator.rb:257:in `create!'
/var/www/discourse/lib/post_creator.rb:290:in `create!'
/var/www/discourse/plugins/discourse-narrative-bot/autoload/jobs/send_default_welcome_message.rb:14:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-3.1.0/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'
/var/www/discourse/app/jobs/base.rb:217:in `each'
/var/www/discourse/app/jobs/base.rb:217:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:196:in `execute_job'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'