이것은 비표준 설치 환경이기 때문에 Contribute > Bug 채널로 이동을 보류할 생각입니다. 다만 이 이미지는 launcher로 빌드된 후(로드 밸런서 뒤의 ECS에서 Fargate로 실행됨) 시작되므로, 설치 문제로 인한 것일 가능성은 낮아 보입니다. 그럼에도 불구하고 이 사이트에는 여러 가지 이상한 점이 있지만, 다른 사용자들에게도 문제가 될 수 있으므로 보고해 보았습니다.
관리자 링크로 로그인하려고 하면 다음과 같은 오류가 발생합니다:
Started POST "/session/email-login/657e8390c8dec98db8cac2feaef96dcf" for 98.46.117.40 at 2022-11-08 18:46:08 +0000
Processing by SessionController#email_login as */*
Parameters: {"second_factor_method"=>"1", "timezone"=>"America/Chicago", "token"=>"657e8390c8dec98db8cac2feaef96dcf"}
Completed 500 Internal Server Error in 107ms (ActiveRecord: 0.0ms | Allocations: 18703)
NoMethodError (undefined method `chat_sound' for #<UserOption:0x00007f748870c1d8>)
(eval):39:in `_fast_attributes'
lib/freedom_patches/ams_include_without_root.rb:57:in `include!'
app/models/web_hook.rb:109:in `generate_payload'
app/models/web_hook.rb:63:in `enqueue_object_hooks'
config/initializers/012-web_hook_events.rb:54:in `block (2 levels) in <main>'
lib/discourse_event.rb:14:in `block in trigger'
lib/discourse_event.rb:13:in `trigger'
app/models/email_token.rb:71:in `block in confirm'
app/models/email_token.rb:57:in `confirm'
app/controllers/session_controller.rb:373:in `email_login'
app/controllers/application_controller.rb:413:in `block in with_resolved_locale'
app/controllers/application_controller.rb:413:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:368:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:202:in `call'
컨테이너에 들어가서 cd /var/www/discourse/plugins;rm -rf chat; sv restart unicorn 명령을 실행한 후 로그인이 가능해졌습니다.
데이터베이스가 마이그레이션되었는지 확인했습니다(마이그레이션이 실행되기 전에 잠시 동안 실행되긴 했지만요). 또한 Retort 플러그인이 과거에 여기 설치되었었지만(현재는 아님) 설치되어 있었습니다.
Chat은 비활성화되어 있었으므로, 다른 사람이 이 문제를 재현할 수 있다면 실행 중인 컨테이너를 수정하는 것 외에는 해결 방법이 없으므로 꽤 심각한 버그로 보입니다.
이 이미지를 불과 1시간 전에 빌드했습니다. <meta name="generator" content="Discourse 2.9.0.beta11 - https://github.com/discourse/discourse version d2ea39c932ec3ec07cbb7362c64ff3fb97c54a4a">
user_options 테이블에서 chat sound를 볼 수 있습니다. 그리고 rails에서 u.user_option.chat_sound를 실행하면 nil이 반환됩니다(아, 하지만 그것은 플러그인을 제거한 후의 상태입니다).