AEM Author custom servlet page stuck on loading spinner in Experience Cloud Shell
Learn how to resolve the issue when custom servlet pages in AEM Author remain stuck on a loading spinner when accessed via the Experience Cloud Shell iframe.
Description description
When accessing a custom servlet or HTML page from AEM Author, the page loads within an Experience Cloud Shell iframe. In this scenario, the page appears stuck on a loading spinner overlay, even though the HTML content is present within the iframe. This issue is reproducible across multiple users when Unified Shell is enabled, and there’s no recent changes to the servlet code. Additional URL parameters (such as _mr and shell_domain) are appended automatically. Opening the same servlet URL directly in a new browser tab (outside the Unified Shell context) renders the page correctly without the spinner. Disabling Unified Shell or accessing the servlet via the direct resource path also allows the page to render as expected.
Environment
- Adobe Experience Manager (AEM) Author
- AEM as a Cloud Service (AEMaaCS) and on-premise deployments
Symptoms
- Custom servlet page remains hidden behind a loading spinner overlay when accessed via the Experience Cloud Shell iframe.
- HTML content is present in the iframe, but not visible.
- Direct access to the servlet URL (outside the Shell) works as expected.
Cause
The Experience Cloud Unified Shell expects a content ready signal from loaded pages to dismiss the spinner overlay. Custom servlet responses that don’t load the standard AEM editor framework JavaScript don’t send this signal, causing the spinner to remain indefinitely. Accessing the servlet directly (outside the Shell) avoids this issue.
Resolution resolution
Follow the steps below to resolve the issue:
- Access the custom servlet via the Experience Cloud Shell route (For example:
/ui#/aem/your/servlet/path). - Observe if the page remains stuck on the loading spinner overlay, even though the HTML content is present in the iframe.
- Copy the full servlet URL (including any appended parameters) from the browser’s network tab.
- Open this URL directly in a new browser tab (outside the Unified Shell context).
- Confirm that the page renders successfully without the spinner.
- Update any links, bookmarks, or navigation paths to point directly to the servlet resource path (For example:
/content/your/site/servlet.html), bypassing the Unified Shell. - If Unified Shell is required for other parts of your AEM environment, restrict this workaround to the custom servlet workflow only. Ensure users access the servlet via a plain link or in a separate browser tab, not through AEM’s page/content tree navigation, which generates the Shell-wrapped route.
- (Optional) Review any client-side code in the servlet output that may depend on
window.top,window.parent, or similar constructs, as these may behave differently within the Unified Shell iframe.
After applying this workaround, users should be able to access the custom servlet page without encountering the stuck loading spinner.