sapui5sap-fiori

sap.ui.comp.valuehelp.ValueHelpDialog - value for parameter 'aArgs' is not of type array


After upgrading UI5 from 1.108 to 1.119, we've started seeing the error below in our value help dialogs (sap.ui.comp.valuehelp.ValueHelpDialog). *sap/base/i18n/ResourceBundle: value for parameter 'aArgs' is not of type array - *

This can be reproduced with the following sample, by opening the dialog and switching to the Define Conditions tab: https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.valuehelpdialog.ValueHelpDialog/sample/sap.ui.comp.sample.valuehelpdialog.recommended

It seems like there was a change in the implementation of the _formatValue function in ResourceBundle, which now requires that aArgs be either undefined or an array.

In the example from the sample the number items is passed as a string, while the condition operators have null as a parameter for aArgs.

Similar issues were reported in the openUI5 GitHub, though the sap.ui.comp library is not part of openUI5.
https://github.com/SAP/openui5/issues/3924
https://github.com/SAP/openui5/issues/3890

As far as I have seen, this does not impact the usability of the dialog but it does flood the console with errors.


Solution

  • [...] the _formatValue function in ResourceBundle, which now requires that aArgs be either undefined or an array.

    The ResourceBundle#getText API has always been requiring the aArgs argument to be an array. It's the consuming code that misaligned with the API reference. Only the error log is new. The log itself is not a breaking change (at least not in UI5 1.x) since it's simply a console log rather than throwing a real Error.

    The issue should be already fixed by now in the affected sap.ui.comp library modules.

    If you need the fix to be downported to the maintained SAPUI5 releases, consider creating a customer ticket (component: CA-UI5-CMP).