XF 2.2 League\Flysystem\FileNotFoundException

Semper Fidelis

Active member
I've been getting this error inconsistently reported in my Server Logs. When I search for it, it seems like it's a resolved bug issue from the past so I don't know why I'm suddenly getting this report. I did move to a new server recently. Could it be ModSecrutiy rules being triggered?

If so, what's a good way to reproduce the issue?
Code:
League\Flysystem\FileNotFoundException: File not found at path: attachments/7/7519-00e342f70489c83212cadc276f138bfe.data src/vendor/league/flysystem/src/Filesystem.php:389
Generated by: Unknown account Sep 1, 2023 at 12:04 PM
Stack trace
#0 src/vendor/league/flysystem/src/Filesystem.php(194): League\Flysystem\Filesystem->assertPresent('attachments/7/7...')
#1 [internal function]: League\Flysystem\Filesystem->readStream('attachments/7/7...', Array)
#2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('League\\Flysyste...', 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/7/7...')
#6 src/XF/Pub/View/Attachment/View.php(25): League\Flysystem\MountManager->readStream('attachments/7/7...')
#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(20): XF::runApp('XF\\Pub\\App')
#16 {main}
 
Look at attachment #7519… looks to me like the underlying attachment data (the file itself) has gone missing in your filesystem. If it’s gone and not able to be restored from a backup, it probably makes sense to just delete that attachment since you don’t have the actual data for it.
 
Look at attachment #7519… looks to me like the underlying attachment data (the file itself) has gone missing in your filesystem. If it’s gone and not able to be restored from a backup, it probably makes sense to us it delete that attachment since you don’t have the actual data for it.
I think what happened is that I was disabling using S3 for my attachments. I think the attachment was made when I had it off and I need to go back and rebuild so that attachments get pushed to S3. Thanks for the help.
 
Look at attachment #7519… looks to me like the underlying attachment data (the file itself) has gone missing in your filesystem. If it’s gone and not able to be restored from a backup, it probably makes sense to just delete that attachment since you don’t have the actual data for it.
I've been trying to figure out how to follow this advice.

Is there a way to go through my attachment data and see where attachments have been deleted and clean up threads so there aren't dead links to attachments that are gone?
 
Back
Top Bottom