AEMaaCS: Package Manager upload fails with “Uncaught SyntaxError: Unexpected token <” in ext-all-debug.js

This article addresses when a JavaScript error occurs when uploading packages via Package Manager in Adobe Experience Manager as a Cloud Service.

Description description

Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS) (all environments)
Issue/Symptoms
When attempting to upload a package using Package Manager, the upload fails and the browser console displays the following JavaScript error:

Uncaught SyntaxError: Unexpected token '<'
    at doDecode (ext-all-debug.js:11527:36)
    at Object.decode (ext-all-debug.js:11649:20)
    at Ext.form.Action.Submit.handleResponse (ext-all-debug.js:59055:20)
    at Ext.form.Action.Submit.processResponse (ext-all-debug.js:58876:28)
    at Ext.form.Action.Submit.success (ext-all-debug.js:59024:27)
    at runCallback (ext-all-debug.js:8652:24)
    at Ext.data.Connection.cb (ext-all-debug.js:8656:13)
    at HTMLIFrameElement.h (ext-all-debug.js:2463:16)
  • The issue occurs across multiple AEMaaCS environments, including UAT.
  • The error is observed in the browser developer console during the upload process.

Resolution resolution

Follow these steps to resolve the issue:

  1. Check for HTML Error Responses:

    • Open the browser’s developer tools, and inspect the network response for the failed package upload request.
    • If the response contains HTML (such as a login page or error page), this indicates the server didn’t return the expected JSON response.
  2. Verify Authentication and Session:

    • Ensure the user is logged in, and the session hasn’t expired.
    • If using SSO or an identity provider, confirm that authentication is valid and not timing out during the upload process.
  3. Check Package Size and Network Stability:

    • Large packages or unstable network connections can cause timeouts or incomplete uploads, resulting in unexpected server responses. For more information, see AEM User Guide: Package Manager.
    • Try uploading a smaller package to verify if the issue is related to package size.
  4. Review Server Logs:

    • Examine AEM error logs for any related errors during the upload attempt.
    • Look for HTTP 401 (Unauthorized), 403 (Forbidden), or 500 (Internal Server Error) responses.
  5. Clear Browser Cache and Cookies:

    • Clear the browser cache and cookies, then attempt the upload again.
  6. Test in Different Browsers:

    • Attempt the upload in another supported browser to rule out browser-specific issues.
  7. Contact Support with HAR File:

    • If the issue persists, capture a HAR file of the failing upload and provide it to Adobe Support for further analysis.

Cause

This error typically occurs when the server returns an HTML error page (such as a login prompt or error message) instead of the expected JSON response, often due to authentication issues, session timeouts, or server-side errors during the package upload process.

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