---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Identify and resolve client errors

# Identify and resolve client errors {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Identify client errors and resolve them in client-side scripts.

## Before you begin

Role required: admin

## About this task

When client errors occur, the Automated Test Framework fails the
test on the step that was executing when the error occurred. Even though client-side
scripts can fail silently on JavaScript errors while procedures are executing, the
error may still impact data, and the procedure being executed. The Automated Test
Framework considers these errors as validation failures.

## Procedure

1. Navigate to AllApplicationAutomated Test FrameworkTests and run an Automated Test Framework test that interacts with a form.
2. In the test results for this test, check for a step result with the following summary:  
   This step failed because the client error 'DETAILED ERROR MESSAGE' was detected on the page being tested. See failing Test Logs. To ignore these errors in the next test run, use 'Add all client errors to warning/ignored list' links.

   This step result appears only on a step that interacts with the UI.
3. To identify and resolve these script errors, open the developer tools browser console on the [Client Test Runner page](https://servicenow-prod.fluidtopics.net/W23zq0IdqARVOxVw~WErzQ "The Client Test Runner opens a browser window or tab for running manually-started client automated tests.").  
   Note:  
   For information about how to open the browser console, see the following article: <http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers>
4. If you can see the error, try to identify and troubleshoot the problematic client-side script, which may be on any of the following base system tables:  
   * ServiceNow Client Script
   * UI Action
   * UI Macro (HTML script)
   * UI Page (HTML script)
   * UI Policy
   * UI Script
   * Tables that extend the preceding base system tables
   {#identify-and-resolve-client-errors__ul_r4h_hn4_5cb}
5. Review the script for errors and once you've fixed them, run your test again.
{#identify-and-resolve-client-errors__steps_v5j_l4f_wcb}

## What to do next

Determine the source of the client error by reviewing the script version history. If you customized a base system script, it's possible that the script has new versions that were skipped during upgrade.

## Example client errors {#ariaid-title2}

There are several types of common client error.

### Client JavaScript errors {#example-client-errors__section_x54_jn4_5cb}

When a client script causes an error, the browser console displays an error similar to the
following example:  

    ***************************************************
    A script has encountered an error in render events
    TypeError: Cannot read property 'id' of undefined
    Script ends. Continuing happily
    ***************************************************
    [00:00:00.002] onLoad Modify Comments Label

In this example, the client script Modify Comments Label caused the error.

### Other client script errors {#example-client-errors__section_knn_gmn_ldb}

Any other type of script error reports directly to the browser console with any formatting
upon occurrence.

TypeError: callbacks(id) is undefined

### Script resource links by Sys ID {#example-client-errors__section_rps_sn4_5cb}

In some cases, the console error provides a link to the script resource file using its Sys
ID. Following this link may give context to which script had executed it.  

    Uncaught ReferenceError: myobj is not defined
        at incident.do?sys_id=12345678901234567890123456789012
    (anonymous) @ incident.do?sys_id=12345678901234567890123456789012  <---- LINK

### Script access permissions {#example-client-errors__section_qrq_144_5cb}

While identifying problematic scripts, be sure the script has permission to access data. Check:

* Access control rule permissions for tables and fields.
* Application access permissions if the script accesses applications in a private scope.
* Domain separation permissions if domain separation is configured.
{#example-client-errors__ul_n33_nct_pdb}
**Related concepts**   

* [Allowed client errors](https://servicenow-prod.fluidtopics.net/fivgAmsmFbvua00NZXhmWQ "Add known client errors to the allowed client errors list to allow tests and steps to continue running when a specific error occurs. Set the report level to specify what the Automated Test Framework does when the error occurs in future tests.")

*[\>]: and then


