Form submission fails during Document of Record generation with attachments in AEM Forms

Form submissions intermittently fail during Document of Record generation when users attach files to an Adaptive Form built with Core Components. The issue affects only submissions containing problematic attachments, while other submissions continue to process normally. The logs contain the error AMASNS00002 – Failed to execute the DDX. To fix this, reproduce the failure with the same files, identify the attachment that triggers the error, validate or replace it, and add attachment validation to the form.

Description description

Environment

  • Adobe Experience Manager Forms
  • Adaptive Forms built with Core Components
  • Forms with file attachment components
  • Document of Record generation

Issue/Symptoms

  • You intermittently receive an error when you submit a form with file attachments.
  • You see the error AMASNS00002 – Failed to execute the DDX in the logs.
  • You encounter the issue only when a submission includes a large, corrupted, malformed, or unsupported attachment.
  • You can submit the form successfully when it doesn’t contain the problematic attachment.
  • Other users can continue to submit the form unless their submissions contain similarly problematic attachments.

Cause

You encounter this issue because the Document of Record service can’t generate the document when the submission contains a malformed, corrupted, or unsupported file attachment. The attachment causes a DDX execution error, so your submission doesn’t complete successfully.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Attempt to reproduce the failure in a test or non-production environment by using the same attachment files that caused the failed submission.
  2. Record the submission time and capture the relevant logs from the publisher and Document of Record service during the test.
  3. If the submission fails, repeat the test while removing one attachment at a time to identify the file that triggers the error.
  4. Open the identified attachment in its native application and verify that the file isn’t corrupted or zero bytes in size.
  5. Confirm that the file type and extension are correct and supported by the form.
  6. Check the file size and filename for unsupported characters or unusual properties.
  7. Retry the submission with a corrected or replacement attachment. Submissions with valid attachments should process successfully.
  8. To prevent future occurrences, enforce file-type and size validation on the form.
  9. If the implementation supports it, add validation for filenames and file content.
  10. Submit the form with valid attachments and verify that the submission is processed successfully and the Document of Record is generated.
recommendation-more-help
experience-cloud-kcs-help-kbarticles