HTTP 500 when viewing the public page for any post containing a video

Hi there. When attempting to view the permalink for a post containing a video, HTTP 500 is returned and in the logs I see

[e2d94971-978e-4a32-bf80-c444cdda3583] method=GET path=/@[redacted]/106948080063530613 format=html controller=StatusesController action=show status=500 error='ActionView::Template::Error: No route matches {:action=>"player", :controller=>"media", :medium_id=>nil}, missing required keys: [:medium_id]' duration=133.87 view=0.00 db=38.94
[e2d94971-978e-4a32-bf80-c444cdda3583]
[e2d94971-978e-4a32-bf80-c444cdda3583] ActionView::Template::Error (No route matches {:action=>"player", :controller=>"media", :medium_id=>nil}, missing required keys: [:medium_id]):
[e2d94971-978e-4a32-bf80-c444cdda3583]     19:       = opengraph 'og:video', full_asset_url(media.file.url(:original))
[e2d94971-978e-4a32-bf80-c444cdda3583]     20:       = opengraph 'og:video:secure_url', full_asset_url(media.file.url(:original))
[e2d94971-978e-4a32-bf80-c444cdda3583]     21:       = opengraph 'og:video:type', media.file_content_type
[e2d94971-978e-4a32-bf80-c444cdda3583]     22:       = opengraph 'twitter:player', medium_player_url(media)
[e2d94971-978e-4a32-bf80-c444cdda3583]     23:       = opengraph 'twitter:player:stream', full_asset_url(media.file.url(:original))
[e2d94971-978e-4a32-bf80-c444cdda3583]     24:       = opengraph 'twitter:player:stream:content_type', media.file_content_type
[e2d94971-978e-4a32-bf80-c444cdda3583]     25:       - unless media.file.meta.nil?
[e2d94971-978e-4a32-bf80-c444cdda3583]
[e2d94971-978e-4a32-bf80-c444cdda3583] app/views/statuses/_og_image.html.haml:22
[e2d94971-978e-4a32-bf80-c444cdda3583] app/views/statuses/_og_image.html.haml:3
[e2d94971-978e-4a32-bf80-c444cdda3583] app/views/statuses/show.html.haml:18
[e2d94971-978e-4a32-bf80-c444cdda3583] app/views/statuses/show.html.haml:4
[e2d94971-978e-4a32-bf80-c444cdda3583] app/controllers/concerns/localized.rb:16:in `block in set_locale'
[e2d94971-978e-4a32-bf80-c444cdda3583] app/controllers/concerns/localized.rb:15:in `set_locale'

I’m running glitch-soc main. What should I do?

Seems like a recently-introduced bug, will look into it.

1 Like

thanks for the awesome information.

this seems to be manifesting as another issue, as well:

we have a lot of these failing tasks in our sidekiq and it’s resulting in media posts being repeated over and over on our notification and home timelines

Hm… did you restart all your sidekiq processes after updating?

uh, not sure, may have only been the rails process. should we restart them now?

yes, I don’t think the PushUpdateWorker should occur with up-to-date sidekiq

OK, that seems to have fixed the notifications and home timelines. Any progress on the video route?

It’s addressed in a PR that just needs to be merged: Fix error when rendering public pages with media attachments by ClearlyClaire · Pull Request #16763 · mastodon/mastodon · GitHub

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.