Feature branch code changes not syncing to Author in AEM Cloud Service Universal Editor

This article explains how to investigate CSS or JavaScript changes pushed to a feature branch that appear immediately at the branch’s preview URL but don’t appear or are significantly delayed in the Author Universal Editor canvas in Adobe Experience Manager (AEM) as a Cloud Service. This disrupts workflows that require reviewing feature-branch changes in Author before merging them into main. To address this, check service-worker registration, the active Author session, authentication settings, and branch-specific configuration; contact Adobe Support if the issue persists.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service (all versions)
  • Edge Delivery Services with AEM Author and Universal Editor

Issue/Symptoms

  • CSS or JavaScript changes pushed to a feature branch appear in that branch’s preview URL but don’t appear or are significantly delayed in the Author Universal Editor canvas.
  • The issue occurs more often with feature branches cut from dev than with branches cut directly from main. Changes from branches cut directly from main appear in both Author and preview.
  • In some affected sessions, the Author browser console shows a Universal Editor service-worker registration error, including a 404 response for sw.js.
  • Some affected sessions display an AEM Sign In prompt.
  • This issue disrupts workflows that require reviewing feature-branch changes in Author before merging them into main.

Cause

The Author canvas fails to register the Universal Editor service worker for the affected feature-branch session. The browser’s 404 response for sw.js identifies a failed registration request but doesn’t identify why it failed. Authentication or session handling, environment provisioning, and branch-specific configuration are the investigation areas.

Resolution resolution

Follow the steps below to address the issue:

  1. Open the AEM Author environment in Google Chrome.
  2. Open Chrome DevTools by pressing F12. Select the Application tab, then select Service Workers.
  3. Check whether a cq-universal-editor service worker is registered and active. If no worker is active, record the registration error shown in DevTools.
  4. In the Author Universal Editor canvas, open the browser console. Record service-worker registration errors, including a 404 response for sw.js, and note whether an AEM Sign In prompt appears.
  5. Confirm that your browser session is signed in to the Author environment. If the AEM Sign In prompt appears, sign in and retry the affected feature branch.
  6. Review the environment’s authentication settings to determine whether they block or redirect the Universal Editor service-worker request for feature branches.
  7. Compare the relevant configuration files between the affected feature branch and the working branch, including head.html, aem.js, scripts.js, fstab.yaml, paths.yaml, and .aem.live/config. Check for differences that affect Universal Editor provisioning or service-worker routing. Confirm that Universal Editor is configured to use the feature branch being tested.
  8. After making a confirmed configuration change, refresh the Author Universal Editor canvas and verify that the feature-branch code changes appear.
  9. If the issue persists, contact Adobe Support. Provide screenshots of the service-worker registration state and console errors, the affected Author and preview URLs, the branch details, and recent authentication or environment-configuration changes.
recommendation-more-help
experience-cloud-kcs-help-kbarticles