Back to Community

Fixing the '401 Unauthorized' and Infinite Loading Loop in Google Listings & Ads

35 threads Sep 28, 2025 PluginGoogle for woocommerce

Content

One of the most common and frustrating issues users encounter with the Google Listings & Ads plugin is an infinite loading screen on the plugin's main page, often accompanied by "401 Unauthorized" errors in the WooCommerce logs. This problem typically arises after changes are made to the connected Google account or Merchant Center.

Understanding the Problem

The core issue is an authorization mismatch. The plugin stores connection data for your Google account and Merchant Center. When you make a significant change on the Google side—such as deleting a Merchant Center account, switching the primary Google account, or revoking permissions—the plugin's stored data becomes outdated. It continues to try to connect using the old, invalid credentials, resulting in a 401 error from Google's API and an infinite loading loop in your WordPress admin.

Common triggers for this issue include:

  • Deleting the original Google Merchant Center account.
  • Connecting the plugin with a different Google account than the one originally used.
  • Changing the primary email address associated with your Google Merchant Center.
  • Revoking WooCommerce's access from your Google account security settings.

How to Resolve the Infinite Loading and 401 Errors

The most effective solution is a complete reset of the connection data. Since the plugin's interface may be inaccessible, this process involves using a dedicated troubleshooting tool or direct database actions.

Method 1: Use the Connection Test Admin Page (Recommended)

The 'Google for WooCommerce' team provides a hidden tool to manually disconnect all services. This is the safest first step.

  1. Navigate to the following URL in your WordPress admin, replacing yoursite.com with your domain:
    https://yoursite.com/wp-admin/admin.php?page=connection-test-admin-page
  2. On this page, you will see sections for Merchant Center, Google Account, and Jetpack.
  3. Click the "MC Disconnect" button under the Merchant Center section.
  4. Click the "Disconnect Google Account" button under the Google Account section.
  5. If you have Jetpack installed, also click "Disconnect Jetpack" for a full reset.
  6. Once all services are disconnected, go to Marketing > Google Listings & Ads and start the setup process again from scratch.

Method 2: Manual Reset via Database (Advanced Users)

If the connection test page is not available or does not work, you can clear the connection settings directly from the database. Always back up your database before proceeding.

  1. Access your database via phpMyAdmin or a similar tool.
  2. Navigate to the wp_options table (the prefix may be different on your site).
  3. Locate and delete the following option rows:
    • wc_connection_test_admin_page_viewed
    • wc_gla_reconnect
    • Any option starting with gla_ that relates to configuration or state (e.g., gla_state).
  4. After deleting these options, re-enter the Google Listings & Ads page to begin a fresh connection.

Method 3: Re-establishing Google Account Permissions

Before reconnecting, ensure WooCommerce has the proper permissions in your Google account.

  1. Go to your Google Account Security page.
  2. Under "Third-party apps with account access," locate and remove any existing WooCommerce or Google Listings & Ads connections.
  3. When you restart the setup in WordPress, you will be prompted to grant permissions again. Ensure you grant all requested permissions.

Preventing Future Issues

To avoid this problem in the future, always disconnect the plugin from within your WordPress admin before deleting or making major changes to your Google Merchant Center account. This allows the plugin to clean up its connection data properly.

If you continue to experience issues after trying these steps, it can be helpful to check the WooCommerce status logs for specific error messages and ensure that your WordPress and WooCommerce versions are compatible with the latest version of the Google Listings & Ads plugin.

Related Support Threads Support