Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GIF upload fails on Heroku instances #1007

Closed
1 task done
ashfurrow opened this issue Apr 5, 2017 · 7 comments
Closed
1 task done

GIF upload fails on Heroku instances #1007

ashfurrow opened this issue Apr 5, 2017 · 7 comments

Comments

@ashfurrow
Copy link
Contributor

On my instance (mastodon.technology) served on Heroku, GIF uploading is failing.

Apr 05 15:28:32 mastodon-technology app/web.1:  [c3d523c0-16c8-46ee-8298-d4408452eb3d] method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=500 error='Av::UnableToDetect: Unable to detect any supported library' duration=34.06 view=0.00 db=4.01 
Apr 05 15:28:32 mastodon-technology heroku/router:  at=info method=POST path="/api/v1/media" host=mastodon.technology request_id=c3d523c0-16c8-46ee-8298-d4408452eb3d fwd="67.245.117.122" dyno=web.1 connect=1ms service=987ms status=500 bytes=1435 protocol=https 

Judging from this SO answer my Heroku install is missing something. Any pointers would be welcome, and once I have it fixed I'll update the docs/code.


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
@Gargron
Copy link
Member

Gargron commented Apr 6, 2017

I think you need something like a ffmpeg or libav "buildpack" from heroku

@ashfurrow
Copy link
Contributor Author

Thanks for the quick answer! That makes sense, though so far the additional build pack has put me over Heroku's 300MB slug limit (though just barely). I'm looking for a solution and will send a PR when I've figured it out.

@ashfurrow
Copy link
Contributor Author

So I had an idea that instead of adding ffmpeg to the buildpack, we could add a script to download and install ffmpeg once the instance is up. So there'd be a slight delay while the instance is doing that, that GIF upload wouldn't work. But that'd be acceptable from my perspective. Maybe a script like this buildpack compile script? It's beyond my abilities at the moment but if you or @ineffyble think this approach would work, I can work on it.

@ashfurrow
Copy link
Contributor Author

Since this is fixed as a consequence (and described in #1119) I'm going to close. Thanks again for the feedback.

@ashfurrow
Copy link
Contributor Author

If anyone else is having trouble with slug size, check out this Heroku buildpack: https://github.com/Lostmyname/heroku-buildpack-post-build-clean

abcang added a commit to pixiv/mastodon that referenced this issue Apr 17, 2018
@nicolasmlv
Copy link

now there is an other solution :

heroku buildpacks:add -i 1 https://github.com/heroku/heroku-buildpack-activestorage-preview

There is some details by heroku here : https://blog.heroku.com/security-rails-active-storage in particular "the final static build weighed in around 30MB"

hannahwhy pushed a commit to hannahwhy/mastodon that referenced this issue Apr 24, 2019
@swabeeh-ser
Copy link

ADHOLOKA-BOT

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants