500 error (Guzzle/cURL) when trying to authenticate domain name

Created on 20 April 2023, about 1 year ago
Updated 2 June 2023, about 1 year ago

Problem/Motivation

I have a site that has been successfully using the API key method for about a year. I updated the module to 2.2.0 and followed the steps to use the oAuth configuration. When I go to the oAuth Settings tab and try to authenticate the domain, I get a 500 error on the ajax request. In the dblog list, there is this error message:

	GuzzleHttp\Exception\RequestException: cURL error 3: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in GuzzleHttp\Handler\CurlFactory::createRejection() (line 201 of /var/www/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php).

Steps to reproduce

1) Update the module to 2.2.0; 2) Configure the Mailchimp module according to the documentation; 3) On the oAuth Settings tab, open the browser's inspector tools; 5) Click the AUTHENTICATE button; 6) Note the 500 error in the inspector tools; 7) The dblog list should show a Guzzle error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.2

Component

General

Created by

πŸ‡ΊπŸ‡ΈUnited States jumpsuitgreen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jumpsuitgreen
  • πŸ‡ΊπŸ‡ΈUnited States jumpsuitgreen

    The MailchimpAdminOauthSettingsForm::getMiddlewareUrl() method is retrieving the 'mailchimp.settings' configuration and returning the 'oauth_middleware_url' key. When I look at the config in the database and the exported configuration file, there isn't a key for 'oauth_middleware_url'.

    The documentation doesn't detail how to set this value. Can you assist?

  • Status changed to Closed: works as designed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jumpsuitgreen

    Disregard,
    I figured it out. Somewhere in my process I failed to update the database drush updb after updating the module code.

  • πŸ‡³πŸ‡±Netherlands mhmhartman

    I ran into the same CURL error "cURL error 3"

    Somehow the latest Mailchimp update in mailchimp.install was never executed.

    As a quick fix I added the latest update to a custom module, after running this, the CURL error went away.

    If you have any problems make sure to check row "mailchimp.settings" in the "Config" table, as @jumpsuitgreen states, "oauth_middleware_url" must be present.

    Make sure to run below:

    function mailchimp_update_8004(&$sandbox) {
      $config = \Drupal::configFactory()->getEditable('mailchimp.settings');
      $config->set('oauth_middleware_url', 'https://drupal-mailchimp-oauth.uw.r.appspot.com');
      $config->save();
    }
Production build 0.69.0 2024