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. -
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 titledcom.liferay.frontend.js.loader.modules.extender.internal.configuration.Details.config