friendica / docker

Docker image for Friendica
https://friendi.ca
GNU Affero General Public License v3.0
44 stars 18 forks source link

ImagickException: Unable to set the image format #219

Closed MrPetovan closed 1 year ago

MrPetovan commented 1 year ago

Originally posted by @nupplaphil in https://github.com/friendica/friendica/issues/12486#issuecomment-1365983320

There are a lot of this kind of errors in all 3 my Friendica instances:

ImagickException: Unable to set the image format in /var/www/html/src/Object/Image.php:793
Stack trace:
#0 src/Object/Image.php(793): Imagick->newImage()
friendica/friendica#1 src/Module/Photo.php(160): Friendica\Object\Image->getFromBlurHash()
friendica/friendica#2 src/BaseModule.php(238): Friendica\Module\Photo->rawContent()
friendica/friendica#3 src/App.php(719): Friendica\BaseModule->run()
friendica/friendica#4 index.php(44): Friendica\App->runFrontend()
friendica/friendica#5 {main}

context:

2022-12-27T16:08:40+01:00 Friendica[1315]: index [ERROR]: Uncaught Exception ImagickException: "Unable to set the image format" at /var/www/html/src/Object/Image.php line 793 {"exception":"ImagickException: Unable to set the image format in /var/www/html/src/Object/Image.php:793\nStack trace:\n#0 /var/www/html/src/Object/Image.php(793): Imagick->newImage()\n#1 /var/www/html/src/Module/Photo.php(160): Friendica\\Object\\Image->getFromBlurHash()\n#2 /var/www/html/src/BaseModule.php(238): Friendica\\Module\\Photo->rawContent()\n#3 /var/www/html/src/App.php(719): Friendica\\BaseModule->run()\n#4 /var/www/html/index.php(44): Friendica\\App->runFrontend()\n#5 {main}"} - {"file":"ErrorHandler.php","line":236,"function":"handleException","request-id":"5e59d99ac4bd87d4877b183152a0d92b","uid":"408fd0"}

Example call structure: https://friendica.example.com/photo/preview/600/1138855

MrPetovan commented 1 year ago

Line 793: $this->image->newImage($scaled['width'], $scaled['height'], '', 'png');

The fourth parameter is described thus:

     * @param string $format [optional] <p>
     * Image format. This parameter was added in Imagick version 2.0.1.

Can you please verify the imagick version you're running?

MrPetovan commented 1 year ago

Additionally, can you show the imagick section of your phpinfo ?

nupplaphil commented 1 year ago

image

AlfredSK commented 1 year ago

Number of supported formats: 0 🤔

In my case it shows 225 supported formats.

MrPetovan commented 1 year ago

It looks like your ImageMagick or your imagick module installs are incomplete.

nupplaphil commented 1 year ago

Thanks for the hint! So it's a general docker issue :-/ ..