Opened 3 years ago
Closed 2 years ago
#54547 closed defect (bug) (reported-upstream)
Fatal error when updating to 5.9 Beta 1 using WP-CLI on LocalWP
Reported by: | nielslange | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | blocker | Version: | |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
Steps to reproduce
- Create a fresh test site using [LocalWP](https://localwp.com/).
- Open site shell and run the command
wp core update --version=5.9-beta1
.
Expected behavior
No error should occur, and the WordPress should be updated to version 5.9 Beta 1.
Current behavior
The following fatal error occurs:
Fatal error: Uncaught Error: Class 'WpOrg\Requests\Iri' not found in /Users/nielslange/Local Sites/wp59/app/public/wp-includes/Requests/Requests.php on line 682
Error: Class 'WpOrg\Requests\Iri' not found in /Users/nielslange/Local Sites/wp59/app/public/wp-includes/Requests/Requests.php on line 682
This is the call stack:
# | Time | Memory | Function | Location |
1 | 0.0002 | 413128 | {main}( ) | .../plugins.php:0 |
2 | 0.0002 | 420008 | require_once( '/Users/nielslange/Local Sites/wp59/app/public/wp-admin/admin.php' ) | .../plugins.php:10 |
3 | 0.1128 | 3948296 | do_action( ) | .../admin.php:385 |
4 | 0.1128 | 3948672 | WP_Hook->do_action( ) | .../plugin.php:470 |
5 | 0.1128 | 3948672 | WP_Hook->apply_filters( ) | .../class-wp-hook.php:327 |
6 | 0.1128 | 3949800 | wp_update_plugins( ) | .../class-wp-hook.php:303 |
7 | 0.1169 | 4023152 | wp_remote_post( ) | .../update.php:404 |
8 | 0.1169 | 4023152 | WP_Http->post( ) | .../http.php:179 |
9 | 0.1169 | 4023528 | WP_Http->request( ) .../class-wp-http.php:614 | |
10 | 0.1170 | 4028984 | WpOrg\Requests\Requests::request( ) | .../class-wp-http.php:394 |
11 | 0.1170 | 4030440 | WpOrg\Requests\Requests::set_defaults( ) | .../Requests.php:452 |
Change History (10)
#1
@
3 years ago
- Summary changed from Fatal error when updating to 5.9 Beta 1 WP-CLI on LocalWP to Fatal error when updating to 5.9 Beta 1 using WP-CLI on LocalWP
#2
follow-up:
↓ 3
@
3 years ago
- Component changed from General to Upgrade/Install
- Milestone changed from Awaiting Review to 5.9
#3
in reply to:
↑ 2
@
3 years ago
Thanks for your reply, @SergeyBiryukov. The problem indeed only happens when using WP-CLI. When using the [WordPress Beta Tester](https://wordpress.org/plugins/wordpress-beta-tester/), I could update to 5.9 Beta 1, as expected.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#5
@
3 years ago
Test Report
Env:
- OS: macOS Big Sur
- Localhost: Local
- WP-CLI (through Local's site shell)
- Plugins: Core Rollback and Beta Tester
Steps:
- Open the site shell through Local
- Type:
wp core update --version=5.9-beta1
- Press enter/return key.
- After update, check error logs and ensure all Requests files are present.
Results:
- 59 files clean up
Updating to version 5.9-beta1 (en_US)... Downloading update from https://wordpress.org/wordpress-5.9-beta1.zip... Unpacking the update... Cleaning up files... File removed: wp-includes/Requests/Transport/fsockopen.php File removed: wp-includes/Requests/Transport/cURL.php File removed: wp-includes/Requests/Hooker.php File removed: wp-includes/Requests/IPv6.php File removed: wp-includes/Requests/Exception/Transport/cURL.php File removed: wp-includes/Requests/Exception/HTTP.php File removed: wp-includes/Requests/Exception/HTTP/502.php File removed: wp-includes/Requests/Exception/HTTP/Unknown.php File removed: wp-includes/Requests/Exception/HTTP/412.php File removed: wp-includes/Requests/Exception/HTTP/408.php File removed: wp-includes/Requests/Exception/HTTP/431.php File removed: wp-includes/Requests/Exception/HTTP/501.php File removed: wp-includes/Requests/Exception/HTTP/500.php File removed: wp-includes/Requests/Exception/HTTP/407.php File removed: wp-includes/Requests/Exception/HTTP/416.php File removed: wp-includes/Requests/Exception/HTTP/428.php File removed: wp-includes/Requests/Exception/HTTP/406.php File removed: wp-includes/Requests/Exception/HTTP/504.php File removed: wp-includes/Requests/Exception/HTTP/411.php File removed: wp-includes/Requests/Exception/HTTP/414.php File removed: wp-includes/Requests/Exception/HTTP/511.php File removed: wp-includes/Requests/Exception/HTTP/410.php File removed: wp-includes/Requests/Exception/HTTP/403.php File removed: wp-includes/Requests/Exception/HTTP/400.php File removed: wp-includes/Requests/Exception/HTTP/505.php File removed: wp-includes/Requests/Exception/HTTP/413.php File removed: wp-includes/Requests/Exception/HTTP/404.php File removed: wp-includes/Requests/Exception/HTTP/306.php File removed: wp-includes/Requests/Exception/HTTP/304.php File removed: wp-includes/Requests/Exception/HTTP/405.php File removed: wp-includes/Requests/Exception/HTTP/429.php File removed: wp-includes/Requests/Exception/HTTP/417.php File removed: wp-includes/Requests/Exception/HTTP/409.php File removed: wp-includes/Requests/Exception/HTTP/402.php File removed: wp-includes/Requests/Exception/HTTP/418.php File removed: wp-includes/Requests/Exception/HTTP/305.php File removed: wp-includes/Requests/Exception/HTTP/415.php File removed: wp-includes/Requests/Exception/HTTP/401.php File removed: wp-includes/Requests/Exception/HTTP/503.php File removed: wp-includes/Requests/IRI.php File removed: wp-includes/Requests/IDNAEncoder.php File removed: wp-includes/Requests/SSL.php File removed: wp-includes/Requests/Proxy/HTTP.php File removed: wp-includes/blocks/post-content/editor.min.css File removed: wp-includes/blocks/post-content/editor.css File removed: wp-includes/blocks/post-content/editor-rtl.css File removed: wp-includes/blocks/post-content/editor-rtl.min.css File removed: wp-includes/blocks/heading/editor.min.css File removed: wp-includes/blocks/heading/editor.css File removed: wp-includes/blocks/heading/editor-rtl.css File removed: wp-includes/blocks/heading/editor-rtl.min.css File removed: wp-includes/blocks/query-title/editor.min.css File removed: wp-includes/blocks/query-title/editor.css File removed: wp-includes/blocks/query-title/editor-rtl.css File removed: wp-includes/blocks/query-title/editor-rtl.min.css File removed: wp-includes/blocks/tag-cloud/editor.min.css File removed: wp-includes/blocks/tag-cloud/editor.css File removed: wp-includes/blocks/tag-cloud/editor-rtl.css File removed: wp-includes/blocks/tag-cloud/editor-rtl.min.css 59 files cleaned up.
- error log in Local's
logs/php/error.log
[01-Dec-2021 20:03:24 UTC] PHP Notice: Constant WP_ENVIRONMENT_TYPE already defined in phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1231) : eval()'d code on line 71 [01-Dec-2021 20:03:24 UTC] PHP Stack trace: [01-Dec-2021 20:03:24 UTC] PHP 1. {main}() /Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar:0 [01-Dec-2021 20:03:24 UTC] PHP 2. include() /Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar:4 [01-Dec-2021 20:03:24 UTC] PHP 3. include() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/php/boot-phar.php:11 [01-Dec-2021 20:03:24 UTC] PHP 4. WP_CLI\bootstrap() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php:27 [01-Dec-2021 20:03:24 UTC] PHP 5. WP_CLI\Bootstrap\LaunchRunner->process() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php:77 [01-Dec-2021 20:03:24 UTC] PHP 6. WP_CLI\Runner->start() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23 [01-Dec-2021 20:03:24 UTC] PHP 7. WP_CLI\Runner->load_wordpress() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1192 [01-Dec-2021 20:03:24 UTC] PHP 8. eval() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1231 [01-Dec-2021 20:03:24 UTC] PHP 9. define() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1231) : eval()'d code:71
- Go to a page in the admin area - Fatal error.
[01-Dec-2021 20:26:33 UTC] PHP Fatal error: Uncaught Error: Class 'WpOrg\Requests\Iri' not found in ../Local/test/app/public/wp-includes/Requests/Requests.php:682 Stack trace: #0 ../Local/test/app/public/wp-includes/Requests/Requests.php(452): WpOrg\Requests\Requests::set_defaults('https://api.wor...', Array, Array, 'POST', Array) #1 ../Local/test/app/public/wp-includes/class-wp-http.php(394): WpOrg\Requests\Requests::request('https://api.wor...', Array, Array, 'POST', Array) #2 ../Local/test/app/public/wp-includes/class-wp-http.php(614): WP_Http->request('https://api.wor...', Array) #3 ../Local/test/app/public/wp-includes/http.php(179): WP_Http->post('https://api.wor...', Array) #4 ../Local/test/app/public/wp-includes/update.php(404): wp_remote_post('https://api.wor...', Array) #5 ../Local/test/app/public/wp-includes/class-wp-hook.php(303): wp_update_plugins('') #6 ../Local/test/app/public/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(' in ../Local/test/app/public/wp-includes/Requests/Requests.php on line 682
- Looking at the filesystem in
wp-includes/Requests/
folder. Files are missing:wp-includes/Requests/IdnaEncoder.php
wp-includes/Requests/Ipv6.php
wp-includes/Requests/Iri.php
wp-includes/Requests/Ssl.php
wp-includes/Requests/Exception/Http.php
wp-includes/Requests/Proxy/Http.php
wp-includes/Requests/Transport/Curl.php
wp-includes/Requests/Transport/Fsockopen.php
This problem is not limited to Windows OS. It's also happening on macOS.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#7
@
3 years ago
- Milestone changed from 5.9 to 6.0
Decision was made to revert Requests 2.0.0 and punt it and all associated tickets to WordPress 6.0. Why? There are 2 issues in the upgrader process that need resolution. Though this ticket is for upstream WP-CLI, Core has the same problem detecting case-insensitive filesystems. Moving this ticket along with the others to 6.0 for investigation and thorough testing. Will keep this ticket open until the issue is resolved in WP-CLI.
#8
@
2 years ago
I believe this issue was fixed in WP-CLI 2.6.0, which happens to be included in latest LocalWP.
This ticket was mentioned in Slack in #core-auto-updates by afragen. View the logs.
2 years ago
#10
@
2 years ago
- Milestone 6.0 deleted
- Resolution set to reported-upstream
- Status changed from new to closed
Per this comment, I'm closing this ticket as reported-upstream
. The issue appears to be fixed in WP-CLI 2.6.0 which is included in the latest LocalWP.
Hi there, thanks for the ticket!
This appears to be an issue with WP-CLI incorrectly deleting files on case-insensitive filesystems when an update changes the case of a file, e.g. from
Requests\IRI.php
toRequests\Iri.php
.See #54504 and the upstream issue for more details: https://github.com/wp-cli/core-command/issues/195
Moving to the milestone for more visibility, though at this point the changes are required in WP-CLI and not in core.