Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken blueprint #65

Merged
merged 8 commits into from
Oct 15, 2024
Merged

Fix broken blueprint #65

merged 8 commits into from
Oct 15, 2024

Conversation

alecgeatches
Copy link
Contributor

@alecgeatches alecgeatches commented Oct 15, 2024

Description

Currently when we launch our trunk plugin blueprint, it shows an error and crashes:

blueprint-error

This is the associated error:

[15-Oct-2024 14:58:58 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[15-Oct-2024 14:58:58 UTC] JavaScript Warn: The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.
[15-Oct-2024 14:59:02 UTC] JavaScript Warn: The "pluginZipFile" option is deprecated. Use "pluginData" instead.
[15-Oct-2024 14:59:02 UTC] JavaScript Error: PHP.run() failed with exit code 255 and the following output: 
PHPExecutionFailureError@https://playground.wordpress.net/worker-thread-c820afe3.js:38:432
run@https://playground.wordpress.net/worker-thread-c820afe3.js:53:1888

[15-Oct-2024 14:59:02 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  PHPExecutionFailureError@https://playground.wordpress.net/worker-thread-c820afe3.js:38:432
run@https://playground.wordpress.net/worker-thread-c820afe3.js:53:1888

[15-Oct-2024 14:59:02 UTC] JavaScript Error: Error when executing the blueprint step #0 ({"step":"installPlugin","pluginZipFile":{"resource":"url","url":"https://github-proxy.com/proxy/?repo=Automattic/vip-workflow-plugin"},"options":{"activate":true},"pluginData":{"resource":"url","url":"https://github-proxy.com/proxy/?repo=Automattic/vip-workflow-plugin"}}) : PHP.run() failed with exit code 255 and the following output: 
run@https://playground.wordpress.net/assets/config-241ba460.js:754:145826

The first fix was replacing the deprecated pluginZipFile with pluginData. This removed warnings but still did not solve the crash:

[15-Oct-2024 14:45:06 UTC] JavaScript Error: PHP.run() failed with exit code 255 and the following output: 
PHPExecutionFailureError@https://playground.wordpress.net/worker-thread-c820afe3.js:38:432
run@https://playground.wordpress.net/worker-thread-c820afe3.js:53:1888

[15-Oct-2024 14:45:06 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  PHPExecutionFailureError@https://playground.wordpress.net/worker-thread-c820afe3.js:38:432
run@https://playground.wordpress.net/worker-thread-c820afe3.js:53:1888

[15-Oct-2024 14:45:06 UTC] JavaScript Error: Error when executing the blueprint step #0 ({"step":"installPlugin","pluginData":{"resource":"url","url":"https://github-proxy.com/proxy/?repo=Automattic/vip-workflow-plugin&branch=fix/blueprint-install"},"options":{"activate":true}}) : PHP.run() failed with exit code 255 and the following output: 
run@https://playground.wordpress.net/assets/config-241ba460.js:754:145826

The next step was to add the WP_DEBUG constant to setup, which allowed the crash to report a specific PHP error:

[15-Oct-2024 15:28:48 UTC] PHP Fatal: PHP.run() failed with exit code 255 and the following output:  Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-c820afe3.js:53:1888)
    at async PlaygroundWorkerEndpoint.run (https://playground.wordpress.net/worker-thread-c820afe3.js:4:9449)
[15-Oct-2024 15:28:48 UTC] JavaScript Error: PHP.run() failed with exit code 255 and the following output: 
Error: PHP.run() failed with exit code 255 and the following output: 
    at PHP.run (https://playground.wordpress.net/worker-thread-c820afe3.js:53:1888)
    at async PlaygroundWorkerEndpoint.run (https://playground.wordpress.net/worker-thread-c820afe3.js:4:9449)
[15-Oct-2024 15:28:48 UTC] JavaScript Error: Error when executing the blueprint step #1 ({"step":"installPlugin","pluginData":{"resource":"url","url":"https://github-proxy.com/proxy/?repo=Automattic/vip-workflow-plugin&branch=fix/blueprint-install"},"options":{"activate":true,"targetFolderName":"vip-workflow-plugin"}}) : PHP.run() failed with exit code 255 and the following output: 
Error: Error when executing the blueprint step #1 ({"step":"installPlugin","pluginData":{"resource":"url","url":"https://github-proxy.com/proxy/?repo=Automattic/vip-workflow-plugin&branch=fix/blueprint-install"},"options":{"activate":true,"targetFolderName":"vip-workflow-plugin"}}) : PHP.run() failed with exit code 255 and the following output: 
    at Object.run (https://playground.wordpress.net/assets/config-241ba460.js:754:145826)
    at async cu (https://playground.wordpress.net/assets/config-241ba460.js:754:147345)
    at async Cu (https://playground.wordpress.net/assets/config-241ba460.js:758:6330)
    at async https://playground.wordpress.net/assets/main-ca70b827.js:176:2459
[15-Oct-2024 15:28:48 UTC] PHP Fatal error:  Uncaught Exception: <p><strong>Error:</strong> Current PHP version (8.0.30-dev) does not meet minimum requirements for WordPress VIP Workflow. The plugin requires PHP 8.1.</p><p><a href="https://wordpress.org/support/update-php/">Learn more about updating PHP</a>.</p> in /internal/eval.php:29
Stack trace:
#0 {main}
  thrown in /internal/eval.php on line 29

This made it possible to find the root cause of the error, a PHP version mismatch:

Current PHP version (8.0.30-dev) does not meet minimum requirements for WordPress VIP Workflow. The plugin requires PHP 8.1.

The PHP version for the blueprint has been bumped to 8.1 to match our plugin. Additionally, I'm going to leave in the WP_DEBUG constant because it's extremely useful for finding the root cause of blueprint issues.

@alecgeatches alecgeatches self-assigned this Oct 15, 2024
@alecgeatches alecgeatches marked this pull request as ready for review October 15, 2024 15:36
@alecgeatches alecgeatches requested a review from a team as a code owner October 15, 2024 15:36
@alecgeatches alecgeatches merged commit 47e4159 into trunk Oct 15, 2024
5 checks passed
@alecgeatches alecgeatches deleted the fix/blueprint-install branch October 15, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant