Fixing the '401 Unauthorized' and Infinite Loading Loop in Google Listings & Ads
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.
- Navigate to the following URL in your WordPress admin, replacing
yoursite.comwith your domain:
https://yoursite.com/wp-admin/admin.php?page=connection-test-admin-page - On this page, you will see sections for Merchant Center, Google Account, and Jetpack.
- Click the "MC Disconnect" button under the Merchant Center section.
- Click the "Disconnect Google Account" button under the Google Account section.
- If you have Jetpack installed, also click "Disconnect Jetpack" for a full reset.
- 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.
- Access your database via phpMyAdmin or a similar tool.
- Navigate to the
wp_optionstable (the prefix may be different on your site). - Locate and delete the following option rows:
wc_connection_test_admin_page_viewedwc_gla_reconnect- Any option starting with
gla_that relates to configuration or state (e.g.,gla_state).
- 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.
- Go to your Google Account Security page.
- Under "Third-party apps with account access," locate and remove any existing WooCommerce or Google Listings & Ads connections.
- 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
-
User does not have reporting manager access to accounthttps://wordpress.org/support/topic/user-does-not-have-reporting-manager-access-to-account/
-
Error Setting up Merchant Center accounthttps://wordpress.org/support/topic/error-setting-up-merchant-center-account-2/
-
Issue with merchant pluginhttps://wordpress.org/support/topic/issue-with-merchant-plugin/
-
Error Unauthorizedhttps://wordpress.org/support/topic/error-unauthorized/
-
GoogleListingsAndAdsMerchantCenterMerchantStatusehttps://wordpress.org/support/topic/googlelistingsandadsmerchantcentermerchantstatuse/
-
An error occurred while retrieving your product feed. Please try again later.https://wordpress.org/support/topic/an-error-occurred-while-retrieving-your-product-feed-please-try-again-later-4/
-
Site is not connected to Google account for google-mchttps://wordpress.org/support/topic/site-is-not-connected-to-google-account-for-google-mc/
-
Can’t connect Google Listings & Adshttps://wordpress.org/support/topic/cant-connect-google-listings-ads/
-
Error Setting up Merchant Center accounthttps://wordpress.org/support/topic/error-setting-up-merchant-center-account/
-
There was an error loading your merchant center setup status.https://wordpress.org/support/topic/there-was-an-error-loading-your-merchant-center-setup-status/
-
Infinite loading google listing ads woocomercehttps://wordpress.org/support/topic/infinite-loading-google-listing-ads-woocomerce/
-
Google Listing & Ads Infinite Loadinghttps://wordpress.org/support/topic/google-listing-ads-infinite-loading/
-
Site not connected with Google Listing pluginhttps://wordpress.org/support/topic/site-not-connected-with-google-listing-plugin/
-
Google Listings & Ads plugin not Working keep loadinghttps://wordpress.org/support/topic/google-listings-ads-plugin-not-working-keep-loading/
-
There was an error loading Google account info.https://wordpress.org/support/topic/there-was-an-error-loading-google-account-info-4/
-
Connection to merchant failshttps://wordpress.org/support/topic/connection-to-merchant-fails/
-
Google Listings and Ads Plugin Linked accounts section Keeps on Loadinghttps://wordpress.org/support/topic/google-listings-and-ads-plugin-linked-accounts-section-keeps-on-loading/
-
Owner of Merchant Center account, but unable to linkhttps://wordpress.org/support/topic/owner-of-merchant-center-account-but-unable-to-link-3/
-
Failed to load resource: the server responded with a status of 401 ()https://wordpress.org/support/topic/failed-to-load-resource-the-server-responded-with-a-status-of-401/
-
plugin not loadinghttps://wordpress.org/support/topic/plugin-not-loading-14/
-
Error on “google-listings-and-ads” already exists.https://wordpress.org/support/topic/error-on-google-listings-and-ads-already-exists/
-
Unable to close my Google merchant account or access woocommerce supporthttps://wordpress.org/support/topic/unable-to-close-my-google-merchant-account-or-access-woocommerce-support/
-
when try to get Merchant Center ID, error Please reconnect your Google account.https://wordpress.org/support/topic/when-try-to-get-merchant-center-id-error-please-reconnect-your-google-account/
-
Frustrating Issue Connectinghttps://wordpress.org/support/topic/frustrating-issue-connecting/
-
Plugin Not Workinghttps://wordpress.org/support/topic/plugin-not-working-1167/
-
Lost authorized Google accounthttps://wordpress.org/support/topic/80-285/
-
Fatal error: Asset handle already existshttps://wordpress.org/support/topic/fatal-error-asset-handle-already-exists/
-
401 error, Unauthorized, Invalid tokenhttps://wordpress.org/support/topic/401-error-unauthorized-invalid-token/
-
Lost connection with Google Merchant Center accounthttps://wordpress.org/support/topic/lost-connection-with-google-merchant-center-account/
-
A Google ID was not found in Merchant Center.https://wordpress.org/support/topic/a-google-id-was-not-found-in-merchant-center/
-
User is not an administrator of account ***https://wordpress.org/support/topic/user-is-not-an-administrator-of-account/
-
can’t connect to google ads accounthttps://wordpress.org/support/topic/cant-connect-to-google-ads-account/
-
The plugin’s page isn’t working; it keeps loading indefinitely.https://wordpress.org/support/topic/strona-wtyczki-nie-dziala-caly-czas-sie-laduje/
-
Issue with Plugin After Changing Google Merchant Accounthttps://wordpress.org/support/topic/issue-with-plugin-after-changing-google-merchant-account/
-
Fatal Error “Unable to retrieve Merchant Center account”https://wordpress.org/support/topic/fatal-error-unable-to-retrieve-merchant-center-account/