Skip to content

Wordfence installation fatal error #4180

Description

@zaerl

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

Blueprint

{
  "steps": [
    {
      "step": "defineWpConfigConsts",
      "consts": {
        "WP_DEBUG": true,
        "WP_DEBUG_LOG": true,
        "WP_DEBUG_DISPLAY": true,
        "WP_DISABLE_FATAL_ERROR_HANDLER": true
      }
    },
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "wordfence"
      },
      "options": {
        "activate": true
      }
    }
  ],
  "$schema": "https://playground.wordpress.net/blueprint-schema.json"
}

Results:

Blueprint failed at step #3: Could not install plugin "wordfence".

PHP.run() failed with exit code 255.

=== Stdout ===

<br />

<b>Warning</b>: Trying to access array offset on null in <b>/wordpress/wp-content/plugins/wordfence/lib/wfDB.php</b> on line <b>162</b><br />

<br />

<b>Fatal error</b>: Uncaught Error: Call to undefined method WP_SQLite_Driver::prepare() in /wordpress/wp-content/plugins/wordfence/lib/wfConfig.php:898

Stack trace:

#0 /wordpress/wp-content/plugins/wordfence/models/scanner/wfScanner.php(1352): wfConfig::set_ser('allScansSchedul...', Array)

#1 /wordpress/wp-content/plugins/wordfence/models/scanner/wfScanner.php(1212): wfScanner-&gt;unscheduleAllScans()

#2 /wordpress/wp-content/plugins/wordfence/lib/wordfenceClass.php(1134): wfScanner-&gt;scheduleScans()

#3 /wordpress/wp-content/plugins/wordfence/lib/wordfenceClass.php(1215): wordfence::runInstall()

#4 /wordpress/wp-content/plugins/wordfence/wordfence.php(146): wordfence::install_actions()

#5 /wordpress/wp-admin/includes/plugin.php(2): include_once('/wordpress/wp-c...')

#6 /wordpress/wp-admin/includes/plugin.php(2): plugin_sandbox_scrape('wordfence/wordf...')

#7 /internal/eval.php(26): activate_plugin('wordfence/wordf...')

#8 {main}

thrown in <b>/wordpress/wp-content/plugins/wordfence/lib/wfConfig.php</b> on line <b>898</b><br />

=== Stderr ===
Step definition

{
  "step": "installPlugin",
  "pluginData": {
    "resource": "wordpress.org/plugins",
    "slug": "wordfence"
  },
  "options": {
    "activate": true
  }
}

Blueprint error details

BlueprintStepExecutionError

PHP.run() failed with exit code 255. 

=== Stdout ===
 <br />
<b>Warning</b>:  Trying to access array offset on null in <b>/wordpress/wp-content/plugins/wordfence/lib/wfDB.php</b> on line <b>162</b><br />
<br />
<b>Fatal error</b>:  Uncaught Error: Call to undefined method WP_SQLite_Driver::prepare() in /wordpress/wp-content/plugins/wordfence/lib/wfConfig.php:898
Stack trace:
#0 /wordpress/wp-content/plugins/wordfence/models/scanner/wfScanner.php(1352): wfConfig::set_ser('allScansSchedul...', Array)
#1 /wordpress/wp-content/plugins/wordfence/models/scanner/wfScanner.php(1212): wfScanner-&gt;unscheduleAllScans()
#2 /wordpress/wp-content/plugins/wordfence/lib/wordfenceClass.php(1134): wfScanner-&gt;scheduleScans()
#3 /wordpress/wp-content/plugins/wordfence/lib/wordfenceClass.php(1215): wordfence::runInstall()
#4 /wordpress/wp-content/plugins/wordfence/wordfence.php(146): wordfence::install_actions()
#5 /wordpress/wp-admin/includes/plugin.php(2): include_once('/wordpress/wp-c...')
#6 /wordpress/wp-admin/includes/plugin.php(2): plugin_sandbox_scrape('wordfence/wordf...')
#7 /internal/eval.php(26): activate_plugin('wordfence/wordf...')
#8 {main}
  thrown in <b>/wordpress/wp-content/plugins/wordfence/lib/wfConfig.php</b> on line <b>898</b><br />


=== Stderr ===
 

ET@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:1523:148324
run@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:1530:814
async*SG@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:1535:1615
bootPlayground@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2243:9381
async*Ry0@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2243:12282
async*TD/<@https://playground.wordpress.net/assets/main-CqaN0aXt.js:98:35442
Tx/</</<@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2315:17818
SH/<@https://playground.wordpress.net/assets/main-CqaN0aXt.js:104:1753
Af@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2284:24270
Ia@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2284:42398
AQ/<@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2284:40713
q@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2269:1558
B@https://playground.wordpress.net/assets/optional/blueprint-editor-IsBLkxkH.js:2269:1919

Expected behavior

To install the plugin

Actual behavior

I does not install it.

Steps to reproduce

Open the blueprint

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions