Scan stage failed reason?
-
Can Wordfence be updated to say WHY the scan stage failed? Surely there is some check that fails that causes it to stop scanning. It would be immensely helpful to log that. I recently switched hosting to Nexcess and before Wordfence used to be very reliable in scanning. Now it fails about 15% of the time with no discoverable pattern. All I get is:
[Sep 08 09:45:39:1694180739.570659:2:info] Scanned contents of 6611 additional files at 23.73 per second [Sep 08 09:45:38:1694180738.812135:2:info] Attempting to resume scan stage (1 attempt(s) remaining)... [Sep 08 09:43:46:1694180626.792340:2:info] Scanned contents of 6604 additional files at 39.81 per second
There should be some sort of error message there. I tried to dig into it a bit and found that in wordfenceClass.php ajax_activityLogUpdate_callback for SCAN_FAILED_CALLBACK_TEST_FAILED it deliberately skips populating the rawErrorHTML variable which contains the exception message. So I added that in via:
$scanFailedHTML = wfView::create('scanner/scan-failed', array( 'messageTitle' => __('Scan Stage Failed', 'wordfence'), 'messageHTML' => __('A scan stage has failed to start. This is often because the site either cannot make outbound requests or is blocked from connecting to itself.', 'wordfence') . $resumeMessage . ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_FAILED_START) . '" target="_blank" rel="noopener noreferrer">' . __('Click here for steps you can try.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>', 'rawErrorHTML' => esc_html(wfConfig::get('lastScanCompleted', '')), 'buttonTitle' => __('Close', 'wordfence'), ))->render();
And…. it just says ‘ok’. So an exception occurred, causing it to set the scan failed to wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED yet the exception message is just ‘ok’? What the heck is going on. How do i fix this?
- The topic ‘Scan stage failed reason?’ is closed to new replies.