AEM Publish: resolve client library bundle 404 errors after Cloud Manager deployment

After a Cloud Manager deployment, client library bundles return 404 errors on AEM Publish, and site components fail to render. Clear the Dispatcher cache for the affected content directory to resolve the issue.

Description description

After deploying to Adobe Experience Manager (AEM) using Cloud Manager, you encounter a situation where client library bundles (clientlibs) return 404 errors on the Publish instance. This typically results in site components, such as React or other frontend modules, failing to render. The issue occurs when the HTML references a client library bundle with a specific hash (for example, <clientlib-path>/<clientlib-name>.min.<clientlib-hash>.js), but the file does not exist on the Publish instance. Flushing the Dispatcher cache and any external caches may not resolve the issue if the cached HTML still references an outdated client library hash.

Environment

  • Adobe Experience Manager (AEM), all versions
  • Deployments performed via Cloud Manager

Symptoms

  • 404 errors for client library bundles in browser console
  • Site components fail to render
  • Accessing the client library bundle URL directly returns a Not Found error
  • Issue persists after clearing Dispatcher and external caches

Cause

The Dispatcher cache contains an outdated version of the HTML page that references an old client library hash. After deployment, the new client library bundle is not present at the old hash, resulting in 404 errors. Clearing the specific content directory in the Dispatcher cache forces regeneration of the HTML with the correct, current hash.

Resolution resolution

Follow these steps to resolve the issue.

  1. Identify the affected pages that reference the missing client library bundle hash (for example, <affected-page.html>).
  2. On the Dispatcher server, clear the cache for the affected content directory (for example, <content-directory>). This action removes any cached HTML that references outdated client library hashes.
  3. Reload the affected pages in your browser.
  4. Verify that the HTML references the correct, existing client library hash, that site components render as expected, and that the 404 errors for client library bundles are resolved.

Invalidate Dispatcher cache for updated /etc.clientlibs resources in AEM as a Cloud Service

recommendation-more-help
experience-cloud-kcs-help-kbarticles