[GH-ISSUE #493] S3 not working #181

Closed
opened 2026-02-25 22:34:33 +03:00 by kerem · 15 comments
Owner

Originally created by @francescor on GitHub (Sep 8, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/493

Originally assigned to: @sadok-f on GitHub.

Describe the bug
unable to use s3: nothing arrive in the bucket

Environment setup:

Additional context
error logs

flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | Message: Error executing "PutObject" on "https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg"; AWS HTTP error: Client error: `PUT https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg` resulted in a `400 Bad Request` response:
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | <?xml version="1.0" encoding="UTF-8"?>
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    |  MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version="1.0" encoding="UTF-8"?>
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>WWSVPCVK9CM23J9Y</RequestId><HostId>NlwomroctkdCPAmjuCTXXI+/w9Jto1DNeN6LhYLPgZ/AtixvxWfRDo3j0Hc9OCLXrWBxIpaqm80=</HostId></Error> 
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | File: /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | Line: 196
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | Trace: #0 /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(97): Aws\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\Psr7\Request), Object(Aws\Command), Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #1 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(209): Aws\WrappedHttpHandler->Aws\{closure}(Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #2 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler(2, Array, NULL)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #3 /var/www/html/vendor/guzzlehttp/promises/src/RejectedPromise.php(49): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #4 /var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #5 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(163): GuzzleHttp\Promise\TaskQueue->run()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #6 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(189): GuzzleHttp\Handler\CurlMultiHandler->tick()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #7 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #8 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #9 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #10 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #11 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #12 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #13 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #14 /var/www/html/vendor/aws/aws-sdk-php/src/S3/S3ClientTrait.php(35): GuzzleHttp\Promise\Promise->wait()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #15 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(607): Aws\S3\S3Client->upload('static.flyimg.o...', '30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', 'private', Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #16 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(133): League\Flysystem\AwsS3v3\AwsS3Adapter->upload('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #17 /var/www/html/vendor/league/flysystem/src/Filesystem.php(70): League\Flysystem\AwsS3v3\AwsS3Adapter->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #18 /var/www/html/src/Core/Handler/ImageHandler.php(175): League\Flysystem\Filesystem->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...')
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #19 /var/www/html/src/Core/Handler/ImageHandler.php(108): Core\Handler\ImageHandler->processNewImage(Object(Core\Entity\Image\OutputImage))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #20 /var/www/html/src/Core/Controller/DefaultController.php(26): Core\Handler\ImageHandler->processImage('w_10', 'https://s3.eu-w...')
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Core\Controller\DefaultController->uploadAction('w_10', 'https://s3.eu-w...')
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #23 /var/www/html/vendor/silex/silex/src/Silex/Application.php(496): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #24 /var/www/html/vendor/silex/silex/src/Silex/Application.php(477): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #25 /var/www/html/web/index.php(4): Silex\Application->run()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #26 {main}
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | Message: Error executing "PutObject" on "https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg"; AWS HTTP error: Client error: `PUT https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg` resulted in a `400 Bad Request` response:
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | <?xml version="1.0" encoding="UTF-8"?>
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    |  MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version="1.0" encoding="UTF-8"?>
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>Z44N0RM1T8M96PCS</RequestId><HostId>zY46zajMiCe01XUr9QFSR7U/9TSTytT2Dc+XEVXuIn+hfNP2bu/hkhmJCMkb7h+5XhjhBlL9Gio=</HostId></Error> 
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | File: /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | Line: 196
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | Trace: #0 /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(97): Aws\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\Psr7\Request), Object(Aws\Command), Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #1 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(209): Aws\WrappedHttpHandler->Aws\{closure}(Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #2 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler(2, Array, NULL)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #3 /var/www/html/vendor/guzzlehttp/promises/src/RejectedPromise.php(49): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #4 /var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #5 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(163): GuzzleHttp\Promise\TaskQueue->run()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #6 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(189): GuzzleHttp\Handler\CurlMultiHandler->tick()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #7 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #8 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #9 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #10 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #11 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #12 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #13 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #14 /var/www/html/vendor/aws/aws-sdk-php/src/S3/S3ClientTrait.php(35): GuzzleHttp\Promise\Promise->wait()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #15 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(607): Aws\S3\S3Client->upload('static.flyimg.o...', '30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', 'private', Array)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #16 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(133): League\Flysystem\AwsS3v3\AwsS3Adapter->upload('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #17 /var/www/html/vendor/league/flysystem/src/Filesystem.php(70): League\Flysystem\AwsS3v3\AwsS3Adapter->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #18 /var/www/html/src/Core/Handler/ImageHandler.php(175): League\Flysystem\Filesystem->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...')
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #19 /var/www/html/src/Core/Handler/ImageHandler.php(108): Core\Handler\ImageHandler->processNewImage(Object(Core\Entity\Image\OutputImage))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #20 /var/www/html/src/Core/Controller/DefaultController.php(26): Core\Handler\ImageHandler->processImage('w_10', 'https://s3.eu-w...')
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Core\Controller\DefaultController->uploadAction('w_10', 'https://s3.eu-w...')
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #23 /var/www/html/vendor/silex/silex/src/Silex/Application.php(496): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #24 /var/www/html/vendor/silex/silex/src/Silex/Application.php(477): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request))
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #25 /var/www/html/web/index.php(4): Silex\Application->run()
flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1    | #26 {main}
Originally created by @francescor on GitHub (Sep 8, 2024). Original GitHub issue: https://github.com/flyimg/flyimg/issues/493 Originally assigned to: @sadok-f on GitHub. **Describe the bug** unable to use s3: nothing arrive in the bucket **Environment setup:** - Flyimg version: `image: flyimg/flyimg:1.4.7` - If possible Flyimg server URL: https://flyimg-test.boat.opencontent.io (but we may have changed its config in the meanwhile) **Additional context** error logs ``` flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | Message: Error executing "PutObject" on "https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg"; AWS HTTP error: Client error: `PUT https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg` resulted in a `400 Bad Request` response: flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | <?xml version="1.0" encoding="UTF-8"?> flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version="1.0" encoding="UTF-8"?> flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>WWSVPCVK9CM23J9Y</RequestId><HostId>NlwomroctkdCPAmjuCTXXI+/w9Jto1DNeN6LhYLPgZ/AtixvxWfRDo3j0Hc9OCLXrWBxIpaqm80=</HostId></Error> flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | File: /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | Line: 196 flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | Trace: #0 /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(97): Aws\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\Psr7\Request), Object(Aws\Command), Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #1 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(209): Aws\WrappedHttpHandler->Aws\{closure}(Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #2 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler(2, Array, NULL) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #3 /var/www/html/vendor/guzzlehttp/promises/src/RejectedPromise.php(49): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #4 /var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #5 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(163): GuzzleHttp\Promise\TaskQueue->run() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #6 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(189): GuzzleHttp\Handler\CurlMultiHandler->tick() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #7 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #8 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #9 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #10 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #11 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #12 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #13 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #14 /var/www/html/vendor/aws/aws-sdk-php/src/S3/S3ClientTrait.php(35): GuzzleHttp\Promise\Promise->wait() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #15 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(607): Aws\S3\S3Client->upload('static.flyimg.o...', '30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', 'private', Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #16 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(133): League\Flysystem\AwsS3v3\AwsS3Adapter->upload('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #17 /var/www/html/vendor/league/flysystem/src/Filesystem.php(70): League\Flysystem\AwsS3v3\AwsS3Adapter->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #18 /var/www/html/src/Core/Handler/ImageHandler.php(175): League\Flysystem\Filesystem->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...') flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #19 /var/www/html/src/Core/Handler/ImageHandler.php(108): Core\Handler\ImageHandler->processNewImage(Object(Core\Entity\Image\OutputImage)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #20 /var/www/html/src/Core/Controller/DefaultController.php(26): Core\Handler\ImageHandler->processImage('w_10', 'https://s3.eu-w...') flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Core\Controller\DefaultController->uploadAction('w_10', 'https://s3.eu-w...') flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #23 /var/www/html/vendor/silex/silex/src/Silex/Application.php(496): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #24 /var/www/html/vendor/silex/silex/src/Silex/Application.php(477): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #25 /var/www/html/web/index.php(4): Silex\Application->run() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #26 {main} flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | Message: Error executing "PutObject" on "https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg"; AWS HTTP error: Client error: `PUT https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg` resulted in a `400 Bad Request` response: flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | <?xml version="1.0" encoding="UTF-8"?> flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed (truncated...) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version="1.0" encoding="UTF-8"?> flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | <Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>Z44N0RM1T8M96PCS</RequestId><HostId>zY46zajMiCe01XUr9QFSR7U/9TSTytT2Dc+XEVXuIn+hfNP2bu/hkhmJCMkb7h+5XhjhBlL9Gio=</HostId></Error> flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | File: /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | Line: 196 flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | Trace: #0 /var/www/html/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(97): Aws\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\Psr7\Request), Object(Aws\Command), Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #1 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(209): Aws\WrappedHttpHandler->Aws\{closure}(Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #2 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler(2, Array, NULL) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #3 /var/www/html/vendor/guzzlehttp/promises/src/RejectedPromise.php(49): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #4 /var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #5 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(163): GuzzleHttp\Promise\TaskQueue->run() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #6 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(189): GuzzleHttp\Handler\CurlMultiHandler->tick() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #7 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #8 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #9 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #10 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #11 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #12 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #13 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #14 /var/www/html/vendor/aws/aws-sdk-php/src/S3/S3ClientTrait.php(35): GuzzleHttp\Promise\Promise->wait() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #15 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(607): Aws\S3\S3Client->upload('static.flyimg.o...', '30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', 'private', Array) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #16 /var/www/html/vendor/league/flysystem-aws-s3-v3/src/AwsS3Adapter.php(133): League\Flysystem\AwsS3v3\AwsS3Adapter->upload('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #17 /var/www/html/vendor/league/flysystem/src/Filesystem.php(70): League\Flysystem\AwsS3v3\AwsS3Adapter->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...', Object(League\Flysystem\Config)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #18 /var/www/html/src/Core/Handler/ImageHandler.php(175): League\Flysystem\Filesystem->write('30a3dda5a309334...', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x00\x00...') flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #19 /var/www/html/src/Core/Handler/ImageHandler.php(108): Core\Handler\ImageHandler->processNewImage(Object(Core\Entity\Image\OutputImage)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #20 /var/www/html/src/Core/Controller/DefaultController.php(26): Core\Handler\ImageHandler->processImage('w_10', 'https://s3.eu-w...') flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Core\Controller\DefaultController->uploadAction('w_10', 'https://s3.eu-w...') flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #23 /var/www/html/vendor/silex/silex/src/Silex/Application.php(496): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #24 /var/www/html/vendor/silex/silex/src/Silex/Application.php(477): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request)) flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #25 /var/www/html/web/index.php(4): Silex\Application->run() flyimg-test_phppm.1.zaa3t6tv3ucb@boat-worker-0ed1 | #26 {main} ```
kerem 2026-02-25 22:34:33 +03:00
Author
Owner

@sadok-f commented on GitHub (Sep 9, 2024):

Hi @francescor
thank you for opening this issue.
I didn't find any problem with the S3 storage, I've tested it several times and it's working as expected.
from your logs, I think you're missing the bucket_name:

PUT https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg` resulted in a `400 Bad Request` 

Can you share your parameters.yml s3 config section:

storage_system: s3

aws_s3:
  access_id: ''
  secret_key: ''
  region: 'eu-central-1'
  bucket_name: ''

Please remove the access_id and secret_key values.

thanks

<!-- gh-comment-id:2337617363 --> @sadok-f commented on GitHub (Sep 9, 2024): Hi @francescor thank you for opening this issue. I didn't find any problem with the S3 storage, I've tested it several times and it's working as expected. from your logs, I think you're missing the bucket_name: ``` PUT https://s3.eu-west-1.amazonaws.com/30a3dda5a3093340a34d0a3a2a22b918.jpg` resulted in a `400 Bad Request` ``` Can you share your parameters.yml s3 config section: ``` storage_system: s3 aws_s3: access_id: '' secret_key: '' region: 'eu-central-1' bucket_name: '' ``` Please remove the access_id and secret_key values. thanks
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

yes, I saw that, but the bucket name is there :)

storage_system: "s3"

aws_s3:
  access_id: "AKIAwwwwwwwwwwww"
  secret_key: "wwwwwwwwwwwwwwwwwwwwww"
  region: "eu-west-1"
  bucket_name: "static.flyimg.opencontent.it"

access key are fine since I see the access in the log

<!-- gh-comment-id:2337645101 --> @francescor commented on GitHub (Sep 9, 2024): yes, I saw that, but the bucket name is there :) ``` storage_system: "s3" aws_s3: access_id: "AKIAwwwwwwwwwwww" secret_key: "wwwwwwwwwwwwwwwwwwwwww" region: "eu-west-1" bucket_name: "static.flyimg.opencontent.it" ``` access key are fine since I see the access in the log
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

aws policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:PutObjectVersionAcl",
                "s3:ListBucket",
                "s3:DeleteObject",
                "s3:GetBucketLocation",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::static.flyimg.opencontent.it",
                "arn:aws:s3:::static.flyimg.opencontent.it/*"
            ]
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "*"
        }
    ]
}

with the above policy in my aws cli I can correcly list content of the bucket and add/remove items

<!-- gh-comment-id:2337655648 --> @francescor commented on GitHub (Sep 9, 2024): aws policy ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:PutObjectVersionAcl", "s3:ListBucket", "s3:DeleteObject", "s3:GetBucketLocation", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::static.flyimg.opencontent.it", "arn:aws:s3:::static.flyimg.opencontent.it/*" ] }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource": "*" } ] } ``` with the above policy in my aws cli I can correcly list content of the bucket and add/remove items
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

I replaced double quotes with single, just in case, no changes

You can test it yourself now https://flyimg-test.boat.opencontent.io/upload/w_300/https://raw.githubusercontent.com/flyimg/graphic-assets/master/logo/raster/flyimg-logo-rgb.png

another error with https://flyimg-test.boat.opencontent.io/upload/w_300/https://wallpapercave.com/wp/WY4oW5x.jpg

 <Error><Code>MaxMessageLengthExceeded</Code><Message>Your request was too big.</M (truncated...)
<!-- gh-comment-id:2337686492 --> @francescor commented on GitHub (Sep 9, 2024): I replaced double quotes with single, just in case, no changes You can test it yourself now https://flyimg-test.boat.opencontent.io/upload/w_300/https://raw.githubusercontent.com/flyimg/graphic-assets/master/logo/raster/flyimg-logo-rgb.png another error with https://flyimg-test.boat.opencontent.io/upload/w_300/https://wallpapercave.com/wp/WY4oW5x.jpg ``` <Error><Code>MaxMessageLengthExceeded</Code><Message>Your request was too big.</M (truncated...) ```
Author
Owner

@sadok-f commented on GitHub (Sep 9, 2024):

for my testing, even with a large image size I was able to store the images in s3 successfully.
@francescor do you have another server in front of Flyimg?
even with small image size, your test instance failed to save it in s3:

https://flyimg-test.boat.opencontent.io/upload/w_200,q_5,rf_1/https://wallpapercave.com/wp/WY4oW5x.jpg

<!-- gh-comment-id:2337768957 --> @sadok-f commented on GitHub (Sep 9, 2024): for my testing, even with a large image size I was able to store the images in s3 successfully. @francescor do you have another server in front of Flyimg? even with small image size, your test instance failed to save it in s3: https://flyimg-test.boat.opencontent.io/upload/w_200,q_5,rf_1/https://wallpapercave.com/wp/WY4oW5x.jpg
Author
Owner

@sadok-f commented on GitHub (Sep 9, 2024):

can you check your Cross-origin resource sharing (CORS) in your bucket permission section?

<!-- gh-comment-id:2337798438 --> @sadok-f commented on GitHub (Sep 9, 2024): can you check your Cross-origin resource sharing (CORS) in your bucket permission section?
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

I was exactly there :)

What are the requirement for the S3 bucket? it could be it was created correctly time ago when we first (unsuccessfully) tested s3, and then closed up for security

(the Cross-origin resource sharing (CORS) is empty)

<!-- gh-comment-id:2337819189 --> @francescor commented on GitHub (Sep 9, 2024): I was exactly there :) What are the requirement for the S3 bucket? it could be it was created correctly time ago when we first (unsuccessfully) tested s3, and then closed up for security (the ` Cross-origin resource sharing (CORS)` is empty)
Author
Owner

@sadok-f commented on GitHub (Sep 9, 2024):

There's no requirement for the S3 bucket, as I said I created a new bucket and tested a couple of images successfully without issue.

<!-- gh-comment-id:2337840182 --> @sadok-f commented on GitHub (Sep 9, 2024): There's no requirement for the S3 bucket, as I said I created a new bucket and tested a couple of images successfully without issue.
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

so the bucket does not need to be accessible by the public, only restricted access to it with the credentials, ok?

ah, there still was a CORS in our side active, sorry, you were right: I've removed it now

<!-- gh-comment-id:2337847481 --> @francescor commented on GitHub (Sep 9, 2024): so the bucket does not need to be accessible by the public, only restricted access to it with the credentials, ok? ah, there still was a CORS in our side active, sorry, you were right: I've removed it now
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

uh, I've created a new bucket, and not it works

<!-- gh-comment-id:2337886542 --> @francescor commented on GitHub (Sep 9, 2024): uh, I've created a new bucket, and not it works
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

found the bug: if the bucket name include dots (.) the error shows up

  • bucket name: cancellami works
  • bucket name: cancellami.flyimg.opencontent.it does not work
<!-- gh-comment-id:2337906324 --> @francescor commented on GitHub (Sep 9, 2024): found the bug: if the bucket name include dots (`.`) the error shows up * bucket name: `cancellami` works * bucket name: `cancellami.flyimg.opencontent.it` does not work
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

I've just double checked it, and that appears to be the issue

<!-- gh-comment-id:2337925660 --> @francescor commented on GitHub (Sep 9, 2024): I've just double checked it, and that appears to be the issue
Author
Owner

@sadok-f commented on GitHub (Sep 9, 2024):

I see, thanks let me investigate it then.

<!-- gh-comment-id:2337972867 --> @sadok-f commented on GitHub (Sep 9, 2024): I see, thanks let me investigate it then.
Author
Owner

@sadok-f commented on GitHub (Sep 9, 2024):

@francescor I think I found the issue with the S3 storage provider, please wait until the build of the new version is finished and give it a try (1.4.8)

<!-- gh-comment-id:2338899410 --> @sadok-f commented on GitHub (Sep 9, 2024): @francescor I think I found the issue with the S3 storage provider, please wait until the build of the new version is finished and give it a try (1.4.8)
Author
Owner

@francescor commented on GitHub (Sep 9, 2024):

yes, it works! thank you so much!
(page title works, too!)

<!-- gh-comment-id:2338914174 --> @francescor commented on GitHub (Sep 9, 2024): yes, it works! thank you so much! (page title works, too!)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#181
No description provided.