Legacy Knowledge Base
Published Jul. 2, 2025

On slow networks, the browser's console throws "A require() call has failed but no failure handler was provided" at frontend-js-spa-web@/liferay/init.es

Written By

Alfonso Crisci

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • Administrators may run their Liferay DEV instances on slow networks due to different reasons. In those cases, several issues will be observed:

    - Buttons unresponsive
    - Forms not showing data from the database
    - No pop-ups appearing
    etc ....

    The browser's console will print some error messages like the below:

    combo?browserId=othe…nt-mousewheel.js:45 liferay-amd-loader | 
    A require() call has failed but no failure handler was provided.
    Note that even if the call stack of this error trace looks like coming from the Liferay AMD Loader, it is not an error in the Loader what has caused it, but an error caused by the require() call.
    The reason why the Loader is in the stack trace is because it is printing the error so that it doesn't get lost.
    However, we recommend providing a failure handler in all require() calls to be able to recover from errors better and to avoid the appearance of this message.
    [...]
    Some information about the require() call follows:
    · Require call id: 0
    · Required modules:
    ["frontend-js-spa-web@3.0.18/liferay/init.es"]
    [...]
    liferay-amd-loader |
    A require() call has failed but no failure handler was provided.
    Note that even if the call stack of this error trace looks like coming from the Liferay AMD Loader, it is not an error in the Loader what has caused it, but an error caused by the require() call.
    The reason why the Loader is in the stack trace is because it is printing the error so that it doesn't get lost.
    However, we recommend providing a failure handler in all require() calls to be able to recover from errors better and to avoid the appearance of this message.
    [...]
    Some information about the require() call follows:
    · Require call id: 1
    · Required modules: Array(7)
    · Missing modules: Array(104)
    [...]
    Error: Load timeout for modules: frontend-js-spa-web@3.0.18/liferay/init.es

Environment

  • Liferay DXP 7.0+

Resolution

  • In the Control Panel > System Settings, increase the Infrastructure > JavaScript Loader > Module Definition Timeout (seconds) from the default 7 to a higher value, appropriate to your network speed.mceclip0.png
  • If the JavaScript loader settings are unavailable through the UI (for example, when using Internet Explorer with a bundle that does not have a high enough Module Definition Timeout to load this system setting page), an OSGi .config file with content such as the following (defaults shown) can be created and placed into the osgi/configs directory to modify these settings:

    applyVersioning="true"
    explainResolutions="false"
    exposeGlobal="false"
    logLevel="warn"
    waitTimeout="7"

    For 7.0 and 7.1, this file needs to be named com.liferay.frontend.js.loader.modules.extender.internal.Details.config ; whereas for 7.2+, it would instead be titled com.liferay.frontend.js.loader.modules.extender.internal.configuration.Details.config

Did this article resolve your issue ?

Legacy Knowledge Base