Make WordPress Core

Opened 6 years ago

Closed 3 years ago

#43110 closed defect (bug) (invalid)

Warning: WordPress could not establish a secure connection to WordPress.org

Reported by: subrataemfluence's profile subrataemfluence Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.2
Component: General Keywords: reporter-feedback close
Focuses: Cc:

Description

Not sure if this is a core bug, but since the message has WordPress.org in it I thought it might have a relation with core. I have updated to 4.9.2 just today and occasionally, specially when the site is idle for some time, I am getting the following message:

Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/wp-projects/multibase/wp-includes/update.php on line 348

However, if I refresh the page the message goes away and everything "seems" to be normal. I am on multisite setup and working at my localhost.

<?php
if ( $ssl && is_wp_error( $raw_response ) ) {
   trigger_error(
        sprintf(
        /* translators: %s: support forums URL */
        __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
        __( 'https://wordpress.org/support/' )
        ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ),
        headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE
   );
        $raw_response = wp_remote_post( $http_url, $options );
}

Change History (4)

#1 @dd32
6 years ago

  • Keywords reporter-feedback added

Hi @subrataemfluence,

Are you still experiencing this?

In general, this warning is shown when there's a slow network connection between you and WordPress.org, which results in the connection timing out.

The simplest way of finding out if this is the cause, is to run the following code:

var_dump( wp_remote_get( 'https://api.wordpress.org/core/stable-check/1.0/', array( 'timeout' => 1 ) ) );

If that doesn't succeed, try increasing the timeout to 10 (seconds) if that succeeds, the issue is down to the network speed.
We set a reasonably low timeout on the API requests as most servers are on much faster connections than most development servers (which i where the error will show up).

#2 @dirkbez
6 years ago

@dd32 Where would you insert that code string?

#3 @hellofromTonya
3 years ago

  • Keywords close added

Hello @subrataemfluence,

Following up: Did dd32's suggestions resolve the issue for you? Does it still persist today?

As it's been 3 years since marked for reporter feedback, marking this ticket for close. If the problem still exists today, please comment with more information including steps to reproduce and steps taken. These will help with further investigation.

#4 @hellofromTonya
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

It's been 5 months with no follow-up. Closing this ticket with the assumption the problem is resolved.

@subrataemfluence, if the problem persists, please re-open and provide more information including the steps to reproduce and steps taken. This extra information helps with further investigation.

Note: See TracTickets for help on using tickets.