Skip to content

Error: RuntimeException: Failed to get url when using wp core verify-checksums #93

@ghost

Description

Bug Report

Describe the current, buggy behavior

Running wp core verify-checksums fails when the .org API server times out and throws a RuntimeException . A timeout should be handled gracefully, and an error or warning thrown instead. Here is the exception error.

Error: RuntimeException: Failed to get url 'https://api.wordpress.org/core/checksums/1.0/?version=+%276.0&locale=en_US': cURL error 28: Operation timed out after 10000 milliseconds with 0 out of -1 bytes received. 

This was reported in the Slack #cli channel on June 30th. It was also noted the the URL version number contains extra characters but still returns the checksum payload.

Describe how other contributors can replicate this bug

NOTE: This will be difficult to replicate unless you can simulate the .org API server timing out because it works 99.99% of the time.

  • run wp core verify-checksums
  • inspect output for exception error

Describe what you would expect as the correct outcome

A warning (or error) should be returned instead of the command throwing an exception error.

Let us know what environment you are running this on

OS:	Linux 3.10.0-327.18.2.el7.centos.plus.x86_64 wp-cli/core-command#1 SMP Fri May 13 02:05:28 UTC 2016 x86_64 Shell:	/bin/bash PHP binary:	/usr/bin/php PHP version:	7.4.30 php.ini used:	/etc/php.ini MySQL binary:	/bin/mysql MySQL version:	mysql Ver 15.1 Distrib 10.1.48-MariaDB, for Linux (x86_64) using readline 5.1 SQL modes: WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli WP-CLI vendor dir:	phar://wp-cli.phar/vendor WP_CLI phar path:	/home/oowygruc6apk5l7u4dxvchhjz/public_html WP-CLI packages dir: WP-CLI global config: WP-CLI project config: WP-CLI version:	2.6.0 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions