humanmade / humanmade/S3-Uploads
Conflict with w3tc plugin after update
- Dominant language
- PHP
- Stars
- 2.2k
- Forks
- 404
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for the wonderful plugin. After updating the w3tc plugin I am having issues purging the Minify cache. Whenever I do this action, I am getting critical error. I see that S3 Uploads plugin is called.
Here are the logs.
PHP Fatal error: Uncaught TypeError: Aws\\Exception\\AwsException::__construct(): Argument #4 ($previous) must be of type ?Exception, Error given, called in /var/www/html/wp-content/plugins/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php on line 204 and defined in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Exception/AwsException.php:47
Stack trace:
#0 /var/www/html/wp-content/plugins/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(204): Aws\\Exception\\AwsException->__construct('Error executing...', Object(Aws\\Command), Array, Object(Error))
#1 /var/www/html/wp-content/plugins/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(97): Aws\\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\\Psr7\\Request), Object(Aws\\Command), Array)
#2 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(204): Aws\\WrappedHttpHandler->Aws\\{closure}(Array)
#3 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(169): GuzzleHttp\\Promise\\Promise::callHandler(2, Array, NULL)
#4 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/RejectedPromise.php(42): GuzzleHttp\\Promise\\Promise::GuzzleHttp\\Promise\\{closure}(Array)
#5 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\\Promise\\RejectedPromise::GuzzleHttp\\Promise\\{closure}()
#6 /var/www/html/wp-content/plugins/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(159): GuzzleHttp\\Promise\\TaskQueue->run()
#7 /var/www/html/wp-content/plugins/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(184): GuzzleHttp\\Handler\\CurlMultiHandler->tick()
#8 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\\Handler\\CurlMultiHandler->execute(true)
#9 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\\Promise\\Promise->invokeWaitFn()
#10 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\\Promise\\Promise->waitIfPending()
#11 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\\Promise\\Promise->invokeWaitList()
#12 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\\Promise\\Promise->waitIfPending()
#13 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\\Promise\\Promise->invokeWaitList()
#14 /var/www/html/wp-content/plugins/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\\Promise\\Promise->waitIfPending()
#15 /var/www/html/wp-content/plugins/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(58): GuzzleHttp\\Promise\\Promise->wait()
#16 /var/www/html/wp-content/plugins/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(86): Aws\\AwsClient->execute(Object(Aws\\Command))
#17 /var/www/html/wp-content/plugins/inc/class-stream-wrapper.php(448): Aws\\AwsClient->__call('headObject', Array)
#18 /var/www/html/wp-content/plugins/inc/class-stream-wrapper.php(1178): S3_Uploads\\Stream_Wrapper->S3_Uploads\\{closure}()
#19 /var/www/html/wp-content/plugins/inc/class-stream-wrapper.php(446): S3_Uploads\\Stream_Wrapper->boolCall(Object(Closure), 2)
#20 /var/www/html/wp-content/plugins/inc/class-stream-wrapper.php(412): S3_Uploads\\Stream_Wrapper->createStat('s3://act...', 2)
#21 [internal function]: S3_Uploads\\Stream_Wrapper->url_stat('s3://act...', 2)
#22 /var/www/html/wp-admin/includes/class-wp-filesystem-direct.php(431): is_file('s3://act...')
#23 /var/www/html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php(254): WP_Filesystem_Direct->is_file('s3://act...')
#24 /var/www/html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php(437): Automattic\\WooCommerce\\Internal\\Admin\\Logging\\FileV2\\File->is_writable()
#25 /var/www/html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php(135): Automattic\\WooCommerce\\Internal\\Admin\\Logging\\FileV2\\File->write('2025-04-08T10:3...')
#26 /var/www/html/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/LogHandlerFileV2.php(60): Automattic\\WooCommerce\\Internal\\Admin\\Logging\\FileV2\\FileController->write_to_file('fatal-errors', '2025-04-08T10:3...', 1744108354)
#27 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-logger.php(189): Automattic\\WooCommerce\\Internal\\Admin\\Logging\\LogHandlerFileV2->handle(1744108354, 'critical', 'Uncaught Error:...', Array)
#28 /var/www/html/wp-content/plugins/woocommerce/includes/class-wc-logger.php(236): WC_Logger->log('critical', 'Uncaught Error:...', Array)
#29 /var/www/html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(414): WC_Logger->critical('Uncaught Error:...', Array)
#30 [internal function]: WooCommerce->log_errors()
#31 {main} thrown in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Exception/AwsException.php on line 47
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with inc/class-stream-wrapper.php, especially the createStat and headObject path shown in the stack trace, and compare it with the AWS SDK error in vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php. Reproduce the failure while purging the W3 Total Cache Minify cache and trace the S3 stream access. Done means the purge no longer causes this critical TypeError when S3 Uploads is active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, php, wordpress
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100