You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similarly to this issue that is still open, we are using DO spaces and Imager X. However, that error seems to surround the existence of optimisers (which in our case are there and seem to be creating the transform files). However, we are getting the following error when generating the transforms:
2024-09-25 11:11:40 [queue.ERROR] [craft\queue\QueueLogBehavior::afterError] [2344] Optimizing images (optipng) (attempt: 1, pid: 113479) - Error (time: 0.105s): Found 1 error while validating the input provided for the PutObject operation: [Body] must be an fopen resource, a GuzzleHttp\Stream\StreamInterface object, or something that can be cast to a string. Found bool(false) {"memory":39171856}
The error seems to also happen with jpegtran as well. Below is the stack trace.
Stack Trace:
2024-09-25 11:11:40 [queue.ERROR] [InvalidArgumentException] Found 1 error while validating the input provided for the PutObject operation: [Body] must be an fopen resource, a GuzzleHttp\Stream\StreamInterface object, or something that can be cast to a string. Found bool(false) {"trace":["#0 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/Middleware.php(85): Aws\\Api\\Validator->validate()","
#1 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/S3/S3Client.php(631): Aws\\Middleware::Aws\\{closure}()","
#2 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/S3/S3Client.php(654): Aws\\S3\\S3Client::Aws\\S3\\{closure}()","
#3 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/S3/S3Client.php(588): Aws\\S3\\S3Client::Aws\\S3\\{closure}()","
#4 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/S3/S3Client.php(607): Aws\\S3\\S3Client::Aws\\S3\\{closure}()","
#5 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/Middleware.php(58): Aws\\S3\\S3Client::Aws\\S3\\{closure}()","
#6 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/S3/SSECMiddleware.php(59): Aws\\Middleware::Aws\\{closure}()","
#7 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/IdempotencyTokenMiddleware.php(77): Aws\\S3\\SSECMiddleware->__invoke()","
#8 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(64): Aws\\IdempotencyTokenMiddleware->__invoke()","
#9 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(58): Aws\\AwsClient->executeAsync()","
#10 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(86): Aws\\AwsClient->execute()","
#11 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/spacecatninja/imager-x-do-spaces-driver/src/externalstorage/DOSpacesStorage.php(78): Aws\\AwsClient->__call()","
#12 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/spacecatninja/imager-x/src/services/StorageService.php(52): spacecatninja\\imagerxdospacesdriver\\externalstorage\\DOSpacesStorage::upload()","
#13 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/spacecatninja/imager-x/src/jobs/OptimizeJob.php(69): spacecatninja\\imagerx\\services\\StorageService->store()","
#14 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2-queue/src/Queue.php(243): spacecatninja\\imagerx\\jobs\\OptimizeJob->execute()","
#15 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2-queue/src/cli/Queue.php(162): yii\\queue\\Queue->handleMessage()","
#16 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2-queue/src/cli/Command.php(146): yii\\queue\\cli\\Queue->execute()","
#17 [internal function]: yii\\queue\\cli\\Command->actionExec()","
#18 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","
#19 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()","
#20 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/console/Controller.php(180): yii\\base\\Controller->runAction()","
#21 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/craftcms/cms/src/console/ControllerTrait.php(89): yii\\console\\Controller->runAction()","
#22 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/base/Module.php(552): craft\\queue\\Command->runAction()","
#23 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/console/Application.php(180): yii\\base\\Module->runAction()","
#24 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/craftcms/cms/src/console/Application.php(91): yii\\console\\Application->runAction()","
#25 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/console/Application.php(147): craft\\console\\Application->runAction()","
#26 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/craftcms/cms/src/console/Application.php(122): yii\\console\\Application->handleRequest()","
#27 /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/yiisoft/yii2/base/Application.php(384): craft\\console\\Application->handleRequest()","
#28 /home/forge/ournameismud-staging.mudbank.uk/deploy/craft(13): yii\\base\\Application->run()","
#29 {main}"],"memory":39172072,"exception":"[object] (InvalidArgumentException(code: 0): Found 1 error while validating the input provided for the PutObject operation:\n[Body] must be an fopen resource, a GuzzleHttp\\Stream\\StreamInterface object, or something that can be cast to a string. Found bool(false) at /home/forge/ournameismud-staging.mudbank.uk/deploy/vendor/aws/aws-sdk-php/src/Api/Validator.php:65)"}
So, I have ensured the optimisers are installed correctly and they seem to work if used from the CLI. However, I still seem to be getting this error. I have tracked it down to the AWS S3 library which is being used by the DO adapter which is missing something.
Funnily enough however, if I switch the imager-x.php config to instead include optimizeType => 'runtime' It seems to completely fix the error (The error does not seem to show in the web log when doing this either). (Turns out is still still failing when using it under 'runtime' as well.)
The text was updated successfully, but these errors were encountered:
Similarly to this issue that is still open, we are using DO spaces and Imager X. However, that error seems to surround the existence of optimisers (which in our case are there and seem to be creating the transform files). However, we are getting the following error when generating the transforms:
2024-09-25 11:11:40 [queue.ERROR] [craft\queue\QueueLogBehavior::afterError] [2344] Optimizing images (optipng) (attempt: 1, pid: 113479) - Error (time: 0.105s): Found 1 error while validating the input provided for the PutObject operation: [Body] must be an fopen resource, a GuzzleHttp\Stream\StreamInterface object, or something that can be cast to a string. Found bool(false) {"memory":39171856}
The error seems to also happen with jpegtran as well. Below is the stack trace.
Stack Trace:
So, I have ensured the optimisers are installed correctly and they seem to work if used from the CLI. However, I still seem to be getting this error. I have tracked it down to the AWS S3 library which is being used by the DO adapter which is missing something.
Funnily enough however, if I switch the(Turns out is still still failing when using it under 'runtime' as well.)imager-x.php
config to instead includeoptimizeType => 'runtime'
It seems to completely fix the error (The error does not seem to show in the web log when doing this either).The text was updated successfully, but these errors were encountered: