Troubleshoot Asset Compute extensibility

The following is an index of common issues and errors, along with the resolutions, that might be encountered when developing and deploying custom Asset Compute workers for AEM Assets.

Develop develop

Rendition is returned partially drawn/corrupted rendition-returned-partially-drawn-or-corrupt

  • Error: Rendition renders incompletely (when an image) or is corrupt and cannot be opened.

    Rendition is returned partially drawn

  • Cause: The worker’s renditionCallback function is exiting before the rendition can be completely written to rendition.path.

  • Resolution: Review the custom worker code and ensure all asynchronous calls are made synchronous using await.

Development Tool development-tool

Console.json file missing from Asset Compute project missing-console-json

  • Error: Error: Missing required files at validate (.../node_modules/@adobe/asset-compute-client/lib/integrationConfiguration.js:XX:YY) at async setupAssetCompute (.../node_modules/@adobe/asset-compute-devtool/src/assetComputeDevTool.js:XX:YY)

  • Cause: The console.json file is missing from the root of the Asset Compute project

  • Resolution: Download a new console.json form your Adobe I/O project

    1. In console.adobe.io, open the Adobe I/O project the Asset Compute project is configured to use
    2. Tap the Download button in the top right
    3. Save the downloaded file to the root of your Asset Compute project using the filename console.json

Incorrect YAML indentation in manifest.yml incorrect-yaml-indentation

  • Error: YAMLException: bad indentation of a mapping entry at line X, column Y:(via standard out from aio app run command)
  • Cause: Yaml files are white-spaced sensitive, it likely that your indentation is incorrect.
  • Resolution: Review your manifest.yml and ensure all indentation is correct.

memorySize limit is set too low memorysize-limit-is-set-too-low

  • Error: Local Dev Server OpenWhiskError: PUT https://adobeioruntime.net/api/v1/namespaces/xxx-xxx-xxx/actions/xxx-0.0.1/__secured_workeroverwrite=true Returned HTTP 400 (Bad Request) --> “The request content was malformed:requirement failed: memory 64 MB below allowed threshold of 134217728 B”
  • Cause: A memorySize limit for the worker in the manifest.yml was set below the minimum allowed threshold as reported by the error message in bytes.
  • Resolution: Review the memorySize limits in the manifest.yml and ensure they are all large than the minimum allowed threshold.

Development Tool cannot start due to missing private.key missing-private-key

  • Error: Local Dev ServerError: Missing required files at validatePrivateKeyFile… (via standard out from aio app run command)
  • Cause: The ASSET_COMPUTE_PRIVATE_KEY_FILE_PATH value in .env file, does not point to private.key or private.key is not read-able by the current user.
  • Resolution: Review the ASSET_COMPUTE_PRIVATE_KEY_FILE_PATH value in .env file, and ensure it contains the full, absolute path to the private.key on your file system.

Source files dropdown incorrect source-files-dropdown-incorrect

Asset Compute Development Tool may enter a state where it pulls stale data, and is most noticeable in the Source file dropdown displaying incorrect items.

  • Error: Source file dropdown displays incorrect items.
  • Cause: Stale cached browser state causes the
  • Resolution: In your browser completely clear the browser tab’s “application state”, the browser cache, local storage and service worker.

Missing or invalid devToolToken query parameter missing-or-invalid-devtooltoken-query-parameter

  • Error: “Unauthorized” notification in Asset Compute Development Tool
  • Cause: devToolToken is missing or invalid
  • Resolution: Close the Asset Compute Development Tool browser window, terminate any running Development Tool processes initiated via the aio app run command, and re-start Development Tool (using aio app run).

Unable to remove source files unable-to-remove-source-files

  • Error: There is no way to remove added source files from the Development Tools UI

  • Cause: This functionality has not been implemented

  • Resolution: Log into your cloud storage provider using the credentials defined in .env. Locate the container used by the Development Tools (also specified in .env), navigate into the source folder, and delete any source images. YOu may need to perform the steps outlined in Source files dropdown incorrect if the deleted source files continue to display in the dropdown as they may be cached locally in the Development Tools “application state”.

    Microsoft Azure Blob Storage

Test test

No rendition generated during test execution test-no-rendition-generated

  • Error: Failure: No rendition generated.

  • Cause: The worker failed to generate a rendition due to an unexpected error such as a JavaScript syntax error.

  • Resolution: Review the test execution’s test.log at /build/test-results/test-worker/test.log. Locate the section in this file corresponding to the failing test case, and review for errors.

    Troubleshooting - No rendition generated

Test generates incorrect rendition causing test to fail tests-generates-incorrect-rendition

  • Error: Failure: Rendition ‘rendition.xxx’ not as expected.

  • Cause: The worker output a rendition that was not the same as the rendition.<extension> provided in the test case.

    • If the expected rendition.<extension> file is not created in the exact same manner as the locally generated rendition in the test case, the test may fail as there may be some difference in the bits. For example, if the Asset Compute worker changes the contrast using APIs, and the expected result is created by adjusting the contrast in Adobe Photoshop CC, the files may appear the same, but minor variations in the bits may be different.
  • Resolution: Review rendition output from the test by navigating to /build/test-worker/<worker-name>/<test-run-timestamp>/<test-case>/rendition.<extension>, and compare it to the expected rendition file in the test case. To create an exact expected asset, either:

    • Use the Development Tool to generate a rendition, validate it is correct, and use that as the expected rendition file
    • Or, validate the test-generated file at /build/test-worker/<worker-name>/<test-run-timestamp>/<test-case>/rendition.<extension>, validate it is correct, and use tht as the expected rendition file

Debug

Debugger does not attach debugger-does-not-attach

Breakpoints not pausing breakpoints-no-pausing

  • Error: When running the Asset Compute worker from the debug-able Development Tool, VS Code does not pause at breakpoints.

VS Code debugger not attached vs-code-debugger-not-attached

  • Cause: The VS Code debugger was stopped/disconnected.
  • Resolution: Restart the VS Code debugger, and verify it attaches by watching the VS Code Debug Output console (View > Debug Console)

VS Code debugger attached after worker execution began vs-code-debugger-attached-after-worker-execution-began

  • Cause: The VS Code debugger did not attach prior to tapping Run in Development Tool.
  • Resolution: Ensure the debugger has attached by reviewing VS Code’s Debug Console (View > Debug Console), and then re-run the Asset Compute worker from Development Tool.

Worker times out while debugging worker-times-out-while-debugging

  • Error: Debug Console reports “Action will timeout in -XXX milliseconds” or Asset Compute Development Tool’s rendition preview spins indefinitely or
  • Cause: The worker timeout as defined in the manifest.yml is exceeded during debugging.
  • Resolution: Temporarily increase the worker’s timeout in the manifest.yml or accelerate debugging activities.

Cannot terminate debugger process cannot-terminate-debugger-process

  • Error: Ctrl-C on the command line does not terminate the debugger process (npx adobe-asset-compute devtool).

  • Cause: A bug in @adobe/aio-cli-plugin-asset-compute 1.3.x, results in Ctrl-C not being recognized as a terminating command.

  • Resolution: Update @adobe/aio-cli-plugin-asset-compute to version 1.4.1+

    code language-none
    $ aio update
    

    Troubleshooting - aio update

Deploy deploy

Custom rendition missing from asset in AEM custom-rendition-missing-from-asset

  • Error: New and re-processed assets process successfully, but are missing the custom rendition

Processing profile not applied to ancestor folder

  • Cause: The asset does not exist under a folder with the Processing Profile that uses the custom worker
  • Resolution: Apply the Processing Profile to an ancestor folder of the asset

Processing profile superseded by lower Processing Profile

  • Cause: The asset exists beneath a folder with the custom worker Processing Profile applied, however a different Processing Profile that does not use the customer worker has been applied between that folder and the asset.
  • Resolution: Combine, or otherwise reconcile, the two Processing Profiles and remove the intermediate Processing Profile

Asset processing fails in AEM asset-processing-fails

  • Error: Asset Processing Failed badge displayed on asset
  • Cause: An error occurred in the execution of the custom worker
  • Resolution: Follow the instructions on debugging Adobe I/O Runtime activations using aio app logs.
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69