# 升级到 2.7.7 后在 AvatarLookup 中遇到 500 内部服务器错误

**URL:** <https://meta.discourse.org/t/getting-500-internal-server-error-in-avatarlookup-after-upgrade-from-2-4-2-to-2-7-7/202085>\
**Category:** Bug\
**Created:** [2021 年8 月 30 日 08:41 UTC](https://meta.discourse.org/t/getting-500-internal-server-error-in-avatarlookup-after-upgrade-from-2-4-2-to-2-7-7/202085 "2021-08-30T08:41:49Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![dmorlock](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@dmorlock](https://meta.discourse.org/u/dmorlock)\
发布日期： [2021 年8 月 30 日 08:41 UTC](https://meta.discourse.org/t/getting-500-internal-server-error-in-avatarlookup-after-upgrade-from-2-4-2-to-2-7-7/202085/1 "2021-08-30T08:41:49Z")

</div>

在从 2.4 恢复数据并全新安装 2.7.7 后，首次请求会收到 HTTP 500 错误：

```plaintext
Completed 500 Internal Server Error in 179ms (ActiveRecord: 0.0ms | Allocations: 27504)
NameError (uninitialized constant #<Class:#<Plugin::Instance:0x00007fe15d1f0e00>::AvatarLookup)
app/models/topic_list.rb:24:in `block in preload'
app/models/topic_list.rb:24:in `preload'
app/models/topic_list.rb:148:in `load_topics'
app/models/topic_list.rb:81:in `topics'
app/serializers/suggested_topics_mixin.rb:16:in `include_suggested_topics?'
(eval):6:in `_fast_attributes'
app/controllers/application_controller.rb:519:in `render_json_dump'
app/controllers/topics_controller.rb:1147:in `block (2 levels) in perform_show_response'
app/controllers/topics_controller.rb:1137:in `perform_show_response'
app/controllers/topics_controller.rb:162:in `show'
app/controllers/application_controller.rb:395:in `block in with_resolved_locale'
app/controllers/application_controller.rb:395: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:355: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:177:in `call'

```

经过几次重试后，错误似乎消失了。该错误可以通过重启 Discourse 实例复现。我们使用的是基于 Docker 的 Discourse 安装。

如果您需要更多信息，或请告知我如何进一步调查此问题。

谢谢，  
Daniel。

---

_[View the full topic](https://meta.discourse.org/t/getting-500-internal-server-error-in-avatarlookup-after-upgrade-from-2-4-2-to-2-7-7/202085)._
