legacy-knowledge-base
公開されました Jul. 2, 2025

低速のネットワークでは、ブラウザのコンソールが「require() 呼び出しに失敗しましたが、失敗ハンドラが提供されませんでした」というメッセージが frontend-js-spa-web@/liferay/init.es にスローされます。

投稿者

Alfonso Crisci

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 管理者は、さまざまな理由により、低速ネットワークで Liferay DEV インスタンスを実行する場合があります。 このような場合、いくつかの問題が観察されます:

    - ボタンが応答しない
    - フォームにデータベースからのデータが表示されない
    - ポップアップが表示されない
    など ....

    ブラウザのコンソールに次のようなエラー メッセージが出力されます。 :

    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+

解決策

  • Control Panel > System Settings で、Infrastructure > JavaScript Loader > Module Definition Timeout (seconds) デフォルトの 7 からネットワーク速度に適したより高い値に増やします。mceclip0.png
  • UI から JavaScript ローダー設定を使用できない場合 (たとえば、このシステム設定ページをロードするのに十分なモジュール定義タイムアウトを持たないバンドルで Internet Explorer を使用している場合)、次のようなコンテンツを含む OSGi .config ファイル 以下 (デフォルトを表示) を作成して osgi/configs ディレクトリに配置し、これらの設定を変更できます。

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

    7.0 および 7.1 の場合、このファイルの名前は com.liferay.frontend.js.loader.modules.extender.internal.Details.config にする必要があります。一方、7.2 以降では、代わりに com.liferay.frontend.js.loader.modules.extender.internal.configuration.Details.configというタイトルになります。

did-this-article-resolve-your-issue

legacy-knowledge-base