Allow-listed client errors occurring in between ATF test steps cause "Uncaught TypeError: Cannot read property 'sys_id' of null"


As client errors are handled asynchronously, they can arrive at any time in the ATF client test runner. If a client error occurs at the exact moment between test steps, even if it is in the inclusion list, it will throw the error message "Uncaught TypeError: Cannot read property 'sys_id' of null" and cause the test to fail. The time between steps is usually very short, so this condition is difficult to reproduce, but it is more likely to occur on instances with slow query times or numerous client errors.

Steps to Reproduce

1. Add an ajax call to a form that makes an api call to an invalid URL (returning 4xx so a client error is generated).
2. Create an ATF test with several UI steps using that form.
3. Include the client error in the allow-list.
4. Add the test to a suite and/or add an artificial delay in pauseBetweenSteps and/or take other measures to slow down the instance.
5. Run the test repeatedly until the race condition occurs.

Observe the test fails with "Uncaught TypeError: Cannot read property 'sys_id' of null".


This problem was fixed. Review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

As a workaround, if tests are occasionally or frequently failing because of a client error that occurs between steps, fix or disable the underlying cause of the client error.

Related Problem: PRB1365609