0 Replies Latest reply on Jan 31, 2020 7:00 AM by Akshar Jamgaonkar

    onFirstInteractive & try / catch not working

    Akshar Jamgaonkar

      Hi All,


      We are using tableau js api to embed dashboards. There are a few cases when we see error popups like "Unknown server error" An unexpected error occurred. If you continue to receive this error please contact your Tableau Server Administrator.


      I am trying to catch such errors and display some notice to the users but the onFirstInteractive event is not getting triggered and nor the try / catch block is working.



            frameDiv = jQuery("[data-tableau-frame]");
            let url = frameDiv.data("tableau-url");
            if (frameDiv.length > 0) {
              tableauViz = new tableau.Viz(frameDiv[0], url, {
                highdpi: true,
                onFirstInteractive: function(){
                  console.log('hello world!');
                  tableauViz.addEventListener(tableau.TableauEventName.FILTER_CHANGE, onFilterChange);
                  tableauViz.addEventListener(tableau.TableauEventName.MARKS_SELECTION, onMarksSelection);
          } catch(e) {
            console.log('here is the exception object');
            console.log('here is the exception object');


      I have also checked the documentation but could not find anything in this regard, may be i am missing something. Any help in this would be really great.