Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rs77/53e5078365f6ed114b6817c6f37610fa to your computer and use it in GitHub Desktop.
Save rs77/53e5078365f6ed114b6817c6f37610fa to your computer and use it in GitHub Desktop.
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).

![](https://media.scripteverything.com/wp-content/uploads/2021/03/suitescript-referenceerror-bridge-xmlapi-1024x782.png) 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!

Summary

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment