WordPress.org

Ready to get started?Download WordPress

Forums

UpdraftPlus Bad Response for Google Drive (21 posts)

  1. SCO7TY
    Member
    Posted 1 year ago #

    Hi,

    I've installed Updraftplus, Ive entered all the correct details for Google drive, Client secret and Client ID both correct.

    When i click on the authorisation link and allow i get a red banner at the top of the plugin page saying 'Bad Response'

    Any ideas on how to fix this? Any help much appreciated...

    P.s i'm using version 1.3.15

  2. SCO7TY
    Member
    Posted 1 year ago #

  3. David Anderson
    Member
    Posted 1 year ago #

    Thanks... on the Google API entry corresponding to the client key, you have a JavaScript origin of example.com instead of your own website's domain name.

  4. SCO7TY
    Member
    Posted 1 year ago #

    Thanks for your reply, I'll go that now,

    For some reason wordpress generates this url - http://1050228110.test.prositehosting.co.uk

    should i use the one above or http://completemuscleandfitness.com

  5. David Anderson
    Member
    Posted 1 year ago #

    Use the one WordPress advises you.

    David

  6. SCO7TY
    Member
    Posted 1 year ago #

    I'm still getting bad response error....

  7. David Anderson
    Member
    Posted 1 year ago #

    Screenshot please! Of the error.

  8. SCO7TY
    Member
    Posted 1 year ago #

  9. David Anderson
    Member
    Posted 1 year ago #

    Try turning off any cacheing plugins that you've got, and clear your cache. Then try agani.

  10. SCO7TY
    Member
    Posted 1 year ago #

    Disabled W3 Total Cache and emptied page cache and still have the error...

  11. David Anderson
    Member
    Posted 1 year ago #

    Edit the plugin file updraftplus/methods/googledrive.php (WordPress has a built-in plugins editor which you can use).

    On line 83 is this:

    header('Location: '.admin_url('options-general.php?page=updraftplus&error=' . __( 'Bad response!', 'backup' ) ) );

    Change it to:

    header('Location: '.admin_url('options-general.php?page=updraftplus&error=' . __( 'Bad response!' . print_r($result, true), 'backup' ) ) );

    Then try again. You will now have some more garbage alongside the words "Bad response". Copy-and-paste that garbage for me.

  12. SCO7TY
    Member
    Posted 1 year ago #

    No 'Bad response' appeared but i got this error at the top of the page -

    Warning: Header may not contain more than a single header, new line detected. in E:\Domains\c\completemuscleandfitness.com\user\htdocs\wp-content\plugins\updraftplus\methods\googledrive.php on line 83

    http://www.screencast.com/t/WzeV0zcODVc

    It also says i have a backup but there is no backup in Google Drive.

  13. David Anderson
    Member
    Posted 1 year ago #

    Sorry - what I gave you didn't work. Remove that line, and instead add these ones:

    $add_to_url = "Bad response from Google: ";
    foreach ( $result->get_error_messages() as $message ) {
    	$this->log("Google Drive authentication error: ".$message);
    	$add_to_url .= "$message. ";
    }
    header('Location: '.admin_url('options-general.php?page=updraftplus&error='.urlencode($add_to_url)) );
  14. SCO7TY
    Member
    Posted 1 year ago #

    Ok, I'm going to be away from my PC for about 20 mins.

    When I get back ill change the file and post the results.

    Thanks again for your help

  15. SCO7TY
    Member
    Posted 1 year ago #

    I now get this -

    Fatal error: Using $this when not in object context in E:\Domains\c\completemuscleandfitness.com\user\htdocs\wp-content\plugins\updraftplus\methods\googledrive.php on line 85

  16. David Anderson
    Member
    Posted 1 year ago #

    Argh - I sent you more faulty code. Remove those lines that I sent before, and use these:

    $add_to_url = "Bad response from Google: ";
    foreach ( $result->get_error_messages() as $message ) {
    	global $updraftplus;
    	$updraftplus->log("Google Drive authentication error: ".$message);
    	$add_to_url .= "$message. ";
    }
    header('Location: '.admin_url('options-general.php?page=updraftplus&error='.urlencode($add_to_url)) );
  17. SCO7TY
    Member
    Posted 1 year ago #

    Ok, that seemed to have worked to get more error detail. this is what i get now -

    Bad response from Google: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed.

  18. David Anderson
    Member
    Posted 1 year ago #

    Phew!

    What that error message means is that your web hosting provider does not have SSL certificates properly installed. Those are needed to verify that you're really talking to Google, and not to a third-party who was interposed themselves. You'll need to raise a ticket with your web hosting provider to fix that. If they can't help, then I recommend Simba Hosting - http://www.simbahosting.co.uk.

    David

  19. SCO7TY
    Member
    Posted 1 year ago #

    Oh right, at least you managed to find the problem.

    Do SSL certificated usually have to be purchased do you know?

    Thanks for getting to the bottom of this, when i eventually get this working i will be sure to donate for your hard work.

  20. David Anderson
    Member
    Posted 1 year ago #

    Thank you... You won't have to pay them anything, no. The SSL certificate that's faulty is one of the "root" or "master" certificates installed in their PHP install which is used to verify the SSL certificates of remote sites. Every web browser and server has them all installed, and uses them to verify remote websites - but in this case, they are installed wrongly (or out-of-date).

    David

  21. SCO7TY
    Member
    Posted 1 year ago #

    Thanks, i'll get on to them now!

Topic Closed

This topic has been closed to new replies.

About this Topic