site-kit-wp: An error occurred: invalid Analytics redirect URI during Site Kit setup

A number of users have recently reported encountering the below error message: An error occurred: invalid Analytics redirect URI This started occurring just over one month ago, with the follow users impacted:

This issue occurs during Site Kit setup, and not specifically when connecting the Analytics module.

Screenshots

Setup - Site Kit by Google 2020-12-24 06-44-30

Video demonstrating issue

Additional Context

  • Started occurring from Site Kit 1.23.0
  • Sites Impacted seem to have existing Analytics code added prior to setting up Site Kit
  • One user was able to proceed, although it may have involved their site being reset
  • Awaiting additional insights from impacted users

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

Visual Regression Changes

QA Brief

Changelog entry

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

@adamsilverstein No common occurrences unfortunately. One site previously had mismatching URLs, another site using an SSL Cert with Cloudflare, one with additional htaccess rules, no common plugins. Undetermined whether users had previously site setups before changing URLs.

I did raise a couple of questions with a couple of impacted users just now, asking if they had successfully setup Site Kit previously. Once the reset button is visible it would be interesting to know if they allows them to proceed.

Thanks @adamsilverstein and @jamesozzie. If we don’t get anything back from those users in the next week or two, let’s close this issue out. We can always reopen if it’s reported again.

We now have the SH information from 2 impacted users. Observations on these 2 site setups:

  • Different hosting providers
  • No matching plugins or theme
  • One impacted user has a connected “Domain type” Search Console property, the other no connected Search Console property
  • One user has additional .htaccess rules
  • Both PHP 7.4 upwards and cURL (7.71.1 & 7.68.0)

One user encounters the below in their SH overview (not included in the SH output)

The REST API request failed due to an error.
Error: cURL error 35: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error (http_request_failed)

Despite the above REST endpoints for this over are accessible on the front end