SuiteScript: ReferenceError Unable to Find Bridge [xmlAPI]

If you’re trying to debug a SuiteScript using the debug window within NetSuite and get the oblique error message:

ReferenceError: Unable to find bridge [xmlApi], with parent [N/error]: ReferenceError: xmlApi

Helpful SuiteScript system JS_EXCEPTION

Thankfully the solution is quite simple.

If you’re trying to run SuiteScript 2.1 code then it is highly likely you’re trying to Debug in version 2.0 (or less).

To solve this issue simply click on the API Version dropdown option found in the upper-left corner of the Script Debugger screen and change the drop-down selection to match the version of the script you’re trying to run (for example, if the option is set to 2.0 and you’re running 2.1 code, change this option to 2.1).

How to fix the ReferenceError “Unable to find bridge [xmlApi]” in SuiteScript Debugger

Once you have selected this option you can click on the Re-Run Script button, and this should launch a new tab allowing you to debug your script using the Chrome DevTools – which is amazing!


If you’re getting the oblique SuiteScript reference error “Unable to find bridge” in your script debug session then all you need do is switch the version of the debug window to match the script version you’re trying to debug.


Author of, Ryan has been dabbling in code since the late '90s when he cut his teeth by exploring VBA in Excel when trying to do something more. Having his eyes opened with the potential of automating repetitive tasks, he expanded to Python and then moved over to scripting languages such as HTML, CSS, Javascript and PHP. When he is not behind a screen, Ryan enjoys a good bush walk with the family during the cooler months, and going with them to the beach during the warmer months.

Recent Posts