eDaddi
Active member
Since switching to Cloudflare's R2 buckets I'm getting hundreds of these 'File not found at path: attachments' error messages.
Using:
Resulted in:
So that data ID (388451) is found in a post and an XFMG album. It exists in the DB.
If I take the
When I add the Cloudflare-managed subdomain 'data' to the same URL the image pulls up fine. This is the case for all of these type errors.
Any thoughts on what would causing some attachments to error out like this and not others?
Server error log
- League\Flysystem\FileNotFoundException: File not found at path: attachments/388/388451-be3fcf044e00c8226086ca12ec7db791.data
- src/addons/DigitalPoint/Cloudflare/League/Flysystem/Adapter/R2.php:132
- Generated by: {redacted}
- Mar 18, 2024 at 9:01 PM
Stack trace
#0 src/addons/DigitalPoint/Cloudflare/League/Flysystem/Adapter/R2.php(108): DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2->read('attachments/388...')
#1 src/vendor/league/flysystem/src/Filesystem.php(196): DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2->readStream('attachments/388...')
#2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(430): League\Flysystem\Filesystem->readStream('attachments/388...', Array)
#3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('readStream', Array)
#4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array)
#5 src/vendor/league/flysystem/src/MountManager.php(345): League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('attachments/388...')
#6 src/XF/Pub/View/Attachment/View.php(25): League\Flysystem\MountManager->readStream('attachments/388...')
#7 src/XF/Mvc/Renderer/AbstractRenderer.php(91): XF\Pub\View\Attachment\View->renderRaw()
#8 src/XF/Mvc/Renderer/Raw.php(39): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('XF:Attachment\\V...', '', Array)
#9 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Raw->renderView('XF:Attachment\\V...', '', Array)
#10 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Raw), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Raw), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'raw')
#13 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 index.php(19): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
array(4) {
["url"] => string(44) "/attachments/img_20210701_015046-jpg.797178/"
["referrer"] => string(53) "https://{redacted}.com/threads/{redacted}.399816/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Using:
SQL:
SELECT * FROM xf_attachment WHERE data_id = 388451;
SELECT * FROM xf_attachment_data WHERE data_id = 388451;
SELECT * FROM xf_attachment_data WHERE file_hash = 'be3fcf044e00c8226086ca12ec7db791';
Resulted in:
So that data ID (388451) is found in a post and an XFMG album. It exists in the DB.
If I take the
portion of the error and change the '.data' to '.jpg' in the browser I get a 404 error as expected.attachments/388/388451-be3fcf044e00c8226086ca12ec7db791.data
When I add the Cloudflare-managed subdomain 'data' to the same URL the image pulls up fine. This is the case for all of these type errors.
Any thoughts on what would causing some attachments to error out like this and not others?