Lock Fails to Load and Generates Fetching Client Data Error
Last Updated:
Overview
When exporting tenant settings to a new tenant that uses a custom Login Page, Lock may not load correctly. In the browser console, the following error message is generated:
Uncaught Error: Error: An error occurred when fetching client data for Lock: https://cdn.<locality>.auth0.com/client/<CLIENT_ID>.js could not be loaded.
Applies To
-
Universal Login
-
Custom Login Page
-
Lock.js
Cause
This error occurs when using an outdated version of Lock.js on a custom Universal Login page, often after exporting settings from an older tenant.
In Lock v11.30.5, a change was introduced to use the domain value for client asset downloads instead of cdn.*.auth0.com. Newer tenant localities (e.g., PUS4, EU2) do not serve this information over the CDN by default and rely on the domain value. Using an outdated version of Lock that attempts to fetch assets from the CDN will fail in these localities.
When the customization toggle is enabled for the Universal Login page, Auth0 no longer automatically updates the page. The administrator is responsible for all maintenance, including updating version numbers for any included Auth0 Software Development Kits (SDKs) or widgets.
Solution
Update Lock to the latest version.