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

Uploading webm with no video stream causes "500 Internal Server Error" #7619

Open
1 of 2 tasks
nivex opened this issue May 25, 2018 · 3 comments
Open
1 of 2 tasks

Uploading webm with no video stream causes "500 Internal Server Error" #7619

nivex opened this issue May 25, 2018 · 3 comments

Comments

@nivex
Copy link

nivex commented May 25, 2018

I have a .webm test file that contains only an audio stream. This file plays correctly in browser (Firefox 60.0.1). When I upload it to Mastodon to add to a toot I get a "500 Internal Server Error"

I had an instance admin attempt to upload this test file and report the error logs. It appears to be failing on generating a thumbnail for the timeline. I suggest two potential improved outcomes:

  1. Dialog reports that there was a problem processing the media.
  2. Media is accepted and a blank thumbnail is displayed.

  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
@nivex
Copy link
Author

nivex commented May 25, 2018

Oh dear, it seems I may not have searched well enough. This appears to be a duplicate of #6147.
I realize there is some contention about uploading audio files. This would tend to bias the fix toward my first suggestion to improve the feedback to the user.

@Gargron Gargron added the bug Something isn't working label Oct 20, 2018
@sammy8806
Copy link
Contributor

Hmm .. this seems to be still happening when audio-only video files from other softwares are incoming.

Some options for files like this would be:

  • handle the incoming audio-only video better
  • just treat them as audio files
  • convert them to be a proper audio-file

I would like to get better handling since #11123 is there now.

Here is some more info when files are incoming:

NoMethodError: undefined method `*' for nil:NilClass
  from app/models/media_attachment.rb:299:in `check_video_dimensions'
  from active_support/callbacks.rb:426:in `block in make_lambda'
  from active_support/callbacks.rb:198:in `block (2 levels) in halting'
  from paperclip/callbacks.rb:28:in `block in hasta_la_vista_baby'
  from active_support/callbacks.rb:199:in `block in halting'
  from active_support/callbacks.rb:513:in `block in invoke_before'
  from active_support/callbacks.rb:513:in `each'
  from active_support/callbacks.rb:513:in `invoke_before'
  from active_support/callbacks.rb:131:in `run_callbacks'
  from paperclip/callbacks.rb:38:in `run_paperclip_callbacks'
  from paperclip/attachment.rb:509:in `post_process'
  from paperclip/attachment.rb:465:in `post_process_file'
  from paperclip/attachment.rb:113:in `assign'
  from paperclip/has_attached_file.rb:66:in `block in define_setter'
  from app/models/concerns/remotable.rb:40:in `block (2 levels) in remotable_attachment'
  from app/lib/request.rb:75:in `perform'
....

ffmpeg info:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'f41aec31432860bb50b881935602482afef8b9ac7218bbc759f47a70aa9a4bcd.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.20.100
  Duration: 00:03:31.31, start: 0.000000, bitrate: 130 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

Branch: master
Commit: 57d98b2

@vmstan
Copy link
Contributor

vmstan commented Jan 1, 2024

Uploading test file using main, error is now '422: Validation failed: File has contents that are not what they are reported to be'

@renchap renchap removed the bug Something isn't working label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants