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

MissingAttributeError for image_description in api home_controller.rb #26333

Closed
lutoma opened this issue Aug 4, 2023 · 6 comments
Closed

MissingAttributeError for image_description in api home_controller.rb #26333

lutoma opened this issue Aug 4, 2023 · 6 comments
Labels
bug Something isn't working status/to triage This issue needs to be triaged

Comments

@lutoma
Copy link
Contributor

lutoma commented Aug 4, 2023

Steps to reproduce the problem

  1. Run Mastodon from main branch (commit 04e7efa)
  2. Open local/federated timeline and scroll down to load new posts

Expected behaviour

New posts get loaded

Actual behaviour

Internal Server Error

Detailed description

Traceback:

FATAL -- : [86768a25-be09-4501-9f7a-6180adfff631]
ActiveModel::MissingAttributeError (missing attribute: image_description):

app/controllers/api/v1/timelines/home_controller.rb:14:in `show'
app/controllers/concerns/localized.rb:11:in `set_locale'
lib/mastodon/rack_middleware.rb:9:in `call'

Reverting to a commit before 8da99ff (and rolling back associated migrations) fixes the issue.

Mastodon instance

ohai.social

Mastodon version

main (04e7efa)

Technical details

  • Ruby version: 3.2.2
  • Node.js version: 16.20.1
@lutoma lutoma added bug Something isn't working status/to triage This issue needs to be triaged labels Aug 4, 2023
@renchap
Copy link
Sponsor Member

renchap commented Aug 4, 2023

Did you forget to run migrations?

@lutoma
Copy link
Contributor Author

lutoma commented Aug 4, 2023

I ran migrations using RAILS_ENV=production DB_PORT=5432 bundle exec rails db:migrate and then also verified they had applied using RAILS_ENV=production bundle exec rails db:migrate:status.

@ClearlyClaire
Copy link
Contributor

Can you update again, see if this is still happening, and if it is, run tootctl cache clear?

@lutoma
Copy link
Contributor Author

lutoma commented Aug 4, 2023

After updating to 04e7efa again and running the migration I ended up with the same errors. But clearing the cache with tootctl cache clear did indeed fix the issue and everything seems to be working properly now. Thanks!

@ClearlyClaire
Copy link
Contributor

Thanks for confirming my hunch!

@ClearlyClaire
Copy link
Contributor

Fixed by #26343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status/to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants