7 Replies Latest reply on Nov 29, 2018 7:36 AM by Landon Conover

    Can't catch exception: "Cannot cast object to type tab.IJsApiMessageHandler"

    Raleigh Chen

      Has anyone encountered this exception before?  I'm embedding a Tableau dashboard in a 3rd Party platform (SAP Business Objects Design Studio, if you must know), and I encounter this exception on a semi-regular basis.  The visualizations are hosted on our private Tableau Server environment.  I can't figure out what's causing it, but I know it's occurring somewhere during the viz initialization: 


      var viz = new tableau.Viz(containerDiv, url, options);


      I've had it happen even when I'm not embedding through Design Studio (i.e. extremely simple javascript embed)... but not nearly as frequently (although that could be just because I haven't been looking at the console while using the basic embed could).  After the exception is thrown, nothing else goes wrong... everything continues to load fine, and it works fine after that, but I'd like to not have these random exceptions in the console if anyone else looks at the dashboard. 


      Exception text shown below:

      InvalidCastException$ {_message: "Cannot cast object to type tab.IJsApiMessageHandler", _innerException: null, _error: Error

          at InvalidCastException$.Exception$ (http://localhost:55767/aad/zen/mimes/sdk_include/com.…}