XF 2.1 XF:FileCheck fails

ichpen

Well-known member
Recently I've been getting these daily after each file check.

I am able to run file check manually and it does complete.

Things that changed: Updated to PHP 7.4.12, reindex my thumbnail attachments and removed some addons that were uninstalled.


One of these every day.

[LIST] [*]InvalidArgumentException: Job XF:FileCheck: Attempted to convert NULL to integer [total_missing] [*]src/XF/Mvc/Entity/Entity.php:740 [*]Generated by: Unknown account [*]Nov 19, 2020 at 4:11 PM [/LIST] [HEADING=2]Stack trace[/HEADING] #0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType() #1 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set() #2 src/XF/Job/FileCheck.php(198): XF\Mvc\Entity\Entity->__set() #3 src/XF/Job/FileCheck.php(108): XF\Job\FileCheck->completeFileCheck() #4 src/XF/Job/Manager.php(253): XF\Job\FileCheck->run() #5 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal() #6 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry() #7 job.php(42): XF\Job\Manager->runQueue() #8 {main} ------------- Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:141 #0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType() #1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType() #2 src/XF/Mvc/Entity/Entity.php(548): XF\Mvc\Entity\Entity->set() #3 src/XF/Job/FileCheck.php(198): XF\Mvc\Entity\Entity->__set() #4 src/XF/Job/FileCheck.php(108): XF\Job\FileCheck->completeFileCheck() #5 src/XF/Job/Manager.php(253): XF\Job\FileCheck->run() #6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal() #7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry() #8 job.php(42): XF\Job\Manager->runQueue() #9 {main}

I receive 3 of these consistently:

[LIST] [*]ErrorException: [E_NOTICE] Undefined index: total_missing [*]src/XF/Job/FileCheck.php:198 [*]Generated by: Unknown account [*]Nov 19, 2020 at 4:11 PM [/LIST] [HEADING=2]Stack trace[/HEADING] #0 src/XF/Job/FileCheck.php(198): XF::handlePhpError() #1 src/XF/Job/FileCheck.php(108): XF\Job\FileCheck->completeFileCheck() #2 src/XF/Job/Manager.php(253): XF\Job\FileCheck->run() #3 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal() #4 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry() #5 job.php(42): XF\Job\Manager->runQueue() #6 {main} [HEADING=2]Request state[/HEADING] array(4) { ["url"] => string(8) "/job.php" ["referrer"] => string(51) "https://xxx.com/whats-new/posts/" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
 
We had one other report of this a while back, though it looks like that was a one off issue. I'm genuinely not sure how this could happen, particularly if running it manually works fine -- the relevant code is 100% identical.

Only the "Undefined index: total_missing" message is particularly relevant as the other errors follow from that. This seems to imply that the file check data isn't round tripping from the temporary internal data storage as expected. However, it does seem that we're getting back valid JSON when we read that file, as otherwise a different error would've been triggered.

If you go into cron entries and trigger the file health check cron there, do these errors get logged every time?
 
We had one other report of this a while back, though it looks like that was a one off issue. I'm genuinely not sure how this could happen, particularly if running it manually works fine -- the relevant code is 100% identical.

Only the "Undefined index: total_missing" message is particularly relevant as the other errors follow from that. This seems to imply that the file check data isn't round tripping from the temporary internal data storage as expected. However, it does seem that we're getting back valid JSON when we read that file, as otherwise a different error would've been triggered.

If you go into cron entries and trigger the file health check cron there, do these errors get logged every time?

Triggering via manual cron job does appear to be consistently causing these errors.

The only other noteworthy change is that i started using Chris' S3 Addon to offload attachments onto an s3 bucket.
 
Last edited:
Top Bottom