IBM Support

Issue in AIOps GUI when trying to view Overview tab of an Incident

Troubleshooting


Problem

When trying to view "Overview" page of an incident in AIOps 4.5 GUI, the page is crashing with an 'Unknown Error' message.

Symptom

Observed in the 'Overview' tab of an incident page. The issue is general, not related to a single incident.
Code: UNKNOWN_ERROR
Stack:
Unknown error: An unknown error occurred.
Caused by:
TypeError: s.indexOf is not a function

Cause

Development have observed a bug in client-side code that runs a function against the alert.type.classification property before ensuring that it is a string.

In the client's data set, alert.type.classifcation property is formed by a number. The client-side code incorrectly infers the implicit data type to be a number, rather than the expected string type.

The method - indexOf is an array function that checks whether an element exist within an array. This can be used on a string in JS as it can be treated as an array of characters.

Environment

CPWAIOps : 4.5, OCP Versions: 4.12.55

Diagnosing The Problem

The code checks whether a substring exists within a string and at which position it starts at.

As the property's value in the affected client's environment is a number, a type conversion is carried out through layers of code, making alert.type.classification a number. IndexOf function can't be called on a number data type, causing breaking error we see in the UI.

Resolving The Problem

Ensure that the data type for alert.type.classification at the time of function execution of 'indexOf' is a string rather than a number.

Workaround :

Until fix is delivered in 4.6 or a hotfix is provided as needed. We can side-step this issue by ensuring that the type conversion to a number for alert.type.classification does not occur. We can do this by suffixing or prefixing the the value of alert.type.classification with a character that would make the string alphanumeric such as 'A' or '-'.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSE9G0Q","label":"IBM Cloud Pak for AIOps"},"ARM Category":[{"code":"a8m3p000000PCIXAA4","label":"Watson AIOps-\u003EAI Manager-\u003EAlert Viewer-\u003EIncidents"}],"ARM Case Number":"TS015992364","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
03 May 2024

UID

ibm17149879