I am getting the error "Error loading data for this chart " when embedding one of my charts. The chart data loads fine when viewing it through mongodb Atlas dashboards. Is it possible to get more details as to why the data cannot be retrieved when embedding?
I am using the charts-embed-dom SDK and i am running an aggregation to filter the data before showing it in the chart. The chart IDs are as follows:
7e45fd46-b026-424a-93ce-96a631a071c3
638e4800-6b6e-4263-8bd2-43649d886979
5eeaf218-c8ca-45ba-b805-084be3b2c8e0
The same aggregation is also being used in a similar chart (638e4505-6b6e-491c-8f53-43649d83c00f) but the data is loading, which is why i was curious to see the errors as the other charts were also loading fine up till a few days ago.
My guess was that the only difference between them is the one that’s loading has to filter a lot less records, but there’s no way for me to confirm this as when loading through the charts dashboard itself, everything loads fine.
I am actually using authenticated access and it is enabled on both dashboard and the chart itself. The data was loading up till a few days ago and the settings have not changed
Oh right, sorry I forgot to check the dashboard settings. Is it possible to briefly enable unauthenticated embedding and see if that renders without the token? If so that would imply that issue is to do with the token verification (or if not it will give other clues).
That’s really strange. The aggregation stage is valid, and I just tested it on one of my embedded charts and it works fine. Can you email me at tom.hollander @ mongodb.com so we can troubleshoot further?
Just to close off the loop here. As discussed offline, in this particular case, the authenticated embedding uses App Service as authentication provider with the “Fetch data using Atlas App Services” enabled. When rules configured in App Services, it will only support aggregation stages/expressions supported by MongoDB 4.4 for user functions. $dateSubtract is an aggregation expression that has been added with MongoDB 5.0, hence the App Service raised an error which causes the “Cannot retrieve data” error in Charts.
Until the 5.0 aggregation expression is supported, the workaround for this issue is to disable the “Fetch data using Atlas App Services” option from the authentication provider setting.
@Paula_farrugia was this issue ever resolved? im having exactly same behavior for new users, they get the “Cannot retrieve data” message, even when they have same permissions as old users…
The embed-dom SDK is a JavaScript library that enables developers to embed interactive 3D models into webpages. It provides a simple API that allows developers to quickly and easily add 3D models to their webpages. The SDK also provides a range of features such as support for multiple 3Dhttps://latestgbapps.com/yowhatsapp-apk/