Hello, I have an error in my app in production mod...
# support
s
Hello, I have an error in my app in production mode, when I set a new stock from the admin panel
admin/stock_items
I get
error 500, internal server error
in a flash message, but the stock get anyway correctly set to the new value In production log I have something like :
Copy code
2022-12-19 13:59:14.110053012 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/request.rb:77:in `block in handle_request'
2022-12-19 13:59:14.110060224 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
2022-12-19 13:59:14.110083807 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/server.rb:443:in `process_client'
2022-12-19 13:59:14.110082559 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/request.rb:76:in `handle_request'
2022-12-19 13:59:14.110084306 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] puma (5.6.5) lib/puma/thread_pool.rb:147:in `block in spawn_thread'
2022-12-19 13:59:14.108900764 +0100 CET [web-1] F, [2022-12-19T12:59:14.107379 #15] FATAL -- : [2b985f61-1517-4eb3-9a7f-a0f798397ff4]
2022-12-19 13:59:14.108946522 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] vendor/ruby-3.1.2/lib/ruby/3.1.0/tempfile.rb:238:in `size'
2022-12-19 13:59:14.108935168 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] Errno::ENOENT (No such file or directory @ rb_file_s_size - /tmp/image_processing20221219-15-8o2d5a.png):
2022-12-19 13:59:14.108947366 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] activestorage (7.0.4) lib/active_storage/service/s3_service.rb:30:in `block in upload'
2022-12-19 13:59:14.108947746 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] activesupport (7.0.4) lib/active_support/notifications.rb:206:in `block in instrument'
2022-12-19 13:59:14.108936005 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4]
2022-12-19 13:59:14.108964453 +0100 CET [web-1] [2b985f61-1517-4eb3-9a7f-a0f798397ff4] activesupport (7.0.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
k
Hey @Sabo!
when I set a new stock from the admin panel
What do you mean exactly? On which page are you seeing this error?
s
Hi, on https://myapp/admin/stock_items • When I set a new stock (from zero) I get flash message error in the bottom of the page "error 500, internal server error" • When I increment (+ or -) I get a green empty flash message But, in the two cases the stock is correctly set in the database
e
Looks related to images and ActiveStorage, one common issue is not having installed
libvips
on your system, or if you have already maybe that image was added before it was installed?
s
Ok thank you, I also thought it was a problem with some images.
libvips
seems to be well installed, I use a french heroku like with a buildpack Apt for the dependences and AWS S3. I will check further :)