The user registration process fails with a 500 Internal Server Error when generating Open Graph images. The issue is caused by MiniMagick failing to find the Courier font, resulting in an exception. This prevents the image generation and breaks the registration flow.
Steps to Reproduce:
Attempt to register a new user with the following details:
Email: dean+tempy@deanlofts.xyz
Password: [FILTERED]
Username: tempytemp
Observe the 500 error in the logs:
MiniMagick::Error (`mogrify -gravity North -font Courier -fill #BEF264 -pointsize 40 -draw text 0,479 'Tempy McTempface' -pointsize 28 -draw text 0,537.0 '@tempytemp' /tmp/mini_magick20240920-1-3rc0f9.png` failed with status: 1 and error:
mogrify-im6.q16: unable to read font `Courier'...
Expected Behavior: The registration should complete successfully, and the Open Graph image should be generated without errors.
Proposed Solution:
Install the Courier font on the server.
Update open_graph_image_generator.rb to use an available font or provide a fallback.
Handle MiniMagick exceptions gracefully to avoid breaking the registration flow.
Additional Context: Logs indicate multiple failures related to the missing Courier font during the mogrify command execution.
The user registration process fails with a 500 Internal Server Error when generating Open Graph images. The issue is caused by MiniMagick failing to find the
Courier
font, resulting in an exception. This prevents the image generation and breaks the registration flow.Steps to Reproduce:
Attempt to register a new user with the following details:
dean+tempy@deanlofts.xyz
[FILTERED]
tempytemp
Observe the 500 error in the logs:
Expected Behavior: The registration should complete successfully, and the Open Graph image should be generated without errors.
Proposed Solution:
Courier
font on the server.open_graph_image_generator.rb
to use an available font or provide a fallback.Additional Context: Logs indicate multiple failures related to the missing
Courier
font during themogrify
command execution.