DashBoard Error - Cannot read properties of undefined (Dashboardviewer)

Dear Syncfusion:

  1. I have a web forms application from some time back I am maintaining , however my dashboards are not loading because of the error shown in the image below after I inspect my code: How can I solve the issue and have my dashboard up and running because the spinner just keeps rotating as you can see in the video I have attached. 


2. My dashboard service also has Initialize Controls at the end which is not my correct dashboard service path. The correct path is the one I wrote in the dashboard function as you can see in my code in the index  file. Could you please help me on correcting the dashboard service path to remove the error as shown in the image above.

3. I would also like to set my dashboard path to dynamically pick the dashboard from wherever it is placed. I do not want to hard code the path like I have done in my index file since the path always changes on each machine, how can I achieve this. 

I have attached a zipped folder with my dashboard file, the index file and a video showing what my system dashboard shows when I run it.

Thank You


Attachment: DashBoardError_87f2b596.rar

6 Replies

SK Sathish Kanniyappan September 27, 2021 03:50 PM UTC

Hi Ssekamatte, 
 
We are checking the reported issue from our end and will update you further details by 28th Sep 2021, we are expecting your patience until then. 
 
Regards, 
Sathish. K 



PS Prince Solomon Bala Subramani Syncfusion Team September 28, 2021 10:51 AM UTC

Hi Ssekamate, 

Please find the response for the queries below  
  
Queries 
Response 
I have a web forms application from some time back I am maintaining , however my dashboards are not loading because of the error shown in the image below after I inspect my code: How can I solve the issue and have my dashboard up and running because the spinner just keeps rotating as you can see in the video I have attached. 
We suspect that the issue is due to the Dashboard Service not running properly. Please follow the below link to restart the Dashboard Service 
 
 
To ensure your Dashboard Service is up and running, paste your dashboard service URL in the browser and click Enter, it will appear like below image if it is running properly  
 
 
 
Also as mentioned in the above UG link, “Dashboard Service as Windows service is not suggested for the production environment”. Please refer the below KB to know about how to host the Dashboard Service in IIS.  
 My dashboard service also has Initialize Controls at the end which is not my correct dashboard service path. The correct path is the one I wrote in the dashboard function as you can see in my code in the index  file. Could you please help me on correcting the dashboard service path to remove the error as shown in the image above. 
We have inspected the video you have shared with us and found that you given dashboard service path correctly. For our internal purpose we will add the Initialize Controls to the URL. So you don’t need to correct the dashboard service path.  
I would also like to set my dashboard path to dynamically pick the dashboard from wherever it is placed. I do not want to hard code the path like I have done in my index file since the path always changes on each machine, how can I achieve this.  
To achieve this we would suggest you to host the dashboard file as the downloadable link which is placed in the remote machine. 
 
$("#dashboard").ejDashboardViewer({ 
  dashboardPath: 'https://dashboardsdkdemo.syncfusion.com//Dashboards//Northwind Products and Suppliers.sydx'  // Public link, which should download the dashboard file at given Dashboard Service URL. 
}); 
 
 
Note: 
  1. Online dashboard path should be downloadable.
  2. Dashboard service should be able to access the dashboard path.

























































Regards 
Prince Solomon  



SJ Ssekamatte James September 30, 2021 08:28 PM UTC

Hello Prince,

Thank You for your response. however, my dashboard is still not running. I am getting the error

  • Access to XMLHttpRequest at 'http://localhost/DashBoardService/InitializeControls' from origin 'http://localhost:64900' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response. 

Even after adding these below in my config file


        <add name="Access-Control-Allow-Origin" value="*" />

        <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />

        <add name="Access-Control-Allow-Headers" value="*" />

     

The second error is:

http://localhost/DashBoardService/InitializeControls that link that happens to appear as the last in the screen shot have pasted down here. How can I go about these.


Note: My Dashboard service is running well under the default website in IIS. So the service seems okay


Thank You 



PS Prince Solomon Bala Subramani Syncfusion Team October 4, 2021 04:25 AM UTC

Hi Ssekamate,  

We suspect that you are using the lower version of the Syncfusion Dashboard Platform SDK, in that version we haven’t included the support to host the Dashboard Service as sub application under the default website. To resolve the  issue host the Dashboard Service as separate website  

Or 

If you still want to host the Dashboard Service as sub application under the default website follow the below steps  
       
  1. Upgrade the Syncfusion Dashboard Platform to the latest version v4.1.0.84
  2. Follow the steps mentioned in the below UG link to host the Dashboard Service as sub application

Regards 
Prince Solomon 




SJ Ssekamatte James October 4, 2021 06:58 AM UTC

Hi Solomon,

Thank you for your response, the steps explained in No.2 of your replies are exactly what I followed ; but my dashboards are not running.

And besides upgrading to v4.1.0.84, can't I still use my old dashboard service version to have my dashboards up and running. Because I notice when I go to download that version, I am automatically asked to download Bold BI dashboards which I have not purchased.


Thank You



PS Prince Solomon Bala Subramani Syncfusion Team October 4, 2021 03:55 PM UTC

Hi Ssekamate,  

We have created the incident #344275 for query. Please follow the further updates in that incident.  

Regards 
Prince Solomon 
  


Loader.
Up arrow icon