Skip to main content

Troubleshooting Guide: Resolving Application Runtime and Memory Exceptions

Distributor troubleshooting for Encompass runtime errors (TypeError: Cannot read properties of undefined) and System.OutOfMemoryException during AP closes or large exports. Requires v26.01+.

B
Written by Bailey Naas-Thornton

Minimum Version Required: 26.01

Pre-Conditions

  • Must be logged in with appropriate system privileges to execute the actions triggering the error (e.g., Administrator for system closes).

  • Requires access to application error logs or the browser console to identify the exact error signature.

  • Must have an active connection to the application environment experiencing the issue.

Steps

  • Identify the Error Signature: Determine if the system is throwing a frontend/runtime error (TypeError: Cannot read properties of undefined) or a data/localization error (System.OutOfMemoryException).

  • Troubleshoot TypeError (Frontend/Runtime):

    • Verify that you are not triggering actions before the page data has completely and asynchronously loaded.

    • Check if there have been recent custom schema changes, which could result in mismatched or misspelled field names.

    • Refresh the page to clear any potential race conditions in the asynchronous rendering lifecycles and attempt the action again.

  • Troubleshoot System.OutOfMemoryException (Data/Localization):

    • Identify if you are running a heavy process such as an Accounts Payable (AP) close, generating large shipment lists, or loading extensive production-order lists.

    • If processing a large file or dataset, attempt to break the operation into smaller batches to prevent accumulating big in-memory collections.

    • Check your environment limits, as high concurrency or low container memory (e.g., 32-bit worker pressure) can trigger this exception even on standard operations.

  • Contact Support: If the issue persists after attempting the above steps, please contact support immediately. To ensure efficient troubleshooting, you MUST gather and provide the following specific information:

    • Exact error messages or codes encountered (e.g., the full stack trace of the TypeError or OutOfMemoryException).

    • Screenshots or video recordings of the issue occurring.

    • Log files (Browser Console logs for frontend issues, or Server/Event logs for memory issues).

    • The exact steps taken by the customer that led to the issue.

    • The date and time the issue was first observed and any recurrence.

    • Any changes made to the system before the issue appeared (e.g., schema updates, data imports).

Fields And Definitions

  • TypeError: Cannot read properties of undefined: A frontend application error that occurs when the code attempts to access a value that does not exist, often due to API responses returning null unexpectedly, misspelled fields, or data loading delays.

  • System.OutOfMemoryException: A critical system error indicating that the application has exhausted available RAM.

  • AP Close: The Accounts Payable period-end closing process, which often materializes very large query result sets into memory.

  • SQL2Rs loops: An iterative process used to map SQL database results into application recordsets.

  • GROUP_CONCAT: A database function used for string aggregation that can spike memory usage if session lengths are maximized.

Best Practices

  • Batch Processing: Avoid running reports or generating HTML outputs for massive datasets (like comprehensive shipment lists) all at once. Utilize date filters or pagination to reduce the memory footprint.

  • Resource Monitoring: Monitor application pool and container memory limits, especially during peak operational hours or when executing large closes. Ensure your environment is scaled appropriately for your concurrency needs.

  • Wait for Page Loads: To prevent frontend race conditions, ensure the application interface has fully rendered and data has asynchronously loaded before initiating complex commands or data exports.

  • Schema Consistency: When making updates to your data schema, ensure all related application codes and API calls are updated simultaneously to prevent undefined property errors.

Did this answer your question?