tableau / extensions-api

Extensions API sample code and developer docs.
http://tableau.github.io/extensions-api
MIT License
268 stars 251 forks source link

Extension api breaks when there is no data in sheet, Issue related to DataTableReader #525

Closed IamMiruto closed 8 months ago

IamMiruto commented 1 year ago

This issue occurs when the extension is trying to get data from the sheet with the new pagination option (dataTableReader) and the sheet is empty. This not only breaks the extension but the tableau extension API itself, so even if I try to load a new extension / restart the current one, the extension API does not respond.

When I tried the same in Tableau online, there was an error message in the console.

Screenshot 2023-05-03 at 16 31 54

However in tableau online the issue gets resolved on reload.

Steps to reproduce:

https://user-images.githubusercontent.com/96570758/235952145-2a660cd2-e172-4c1f-85b0-5dde87daab46.mov 1: Load and configure the extension with paginated data fetching (DataTableReader). 2: Apply a filter which removes all data from the datasheet. 3: Reload the extension to trigger data fetching.

What do we expect :

What we expect is an empty object as a return, or an option in the API to query and check if there is any data available in the sheet before fetching the data.

Here is a demo workbook with the above-mentioned issue.

APIIssue.zip

merlijnbuit commented 1 year ago

Any update here please?

This issue is crashing many customer dashboards.

bcantoni commented 1 year ago

Thanks for the report! We've captured this as internal work item W-13472503 and will investigate.

uidev15 commented 1 year ago

Any updates on this please?

I recently came across this error

image

This is the javaScript code

let vizActiveSheet = viz.workbook.activeSheet; if (vizActiveSheet.sheetType === "worksheet") { const dataTableReader = await vizActiveSheet.getSummaryDataReaderAsync(); ---> It breaks from this line when no data in sheet const dataTable = await dataTableReader.getAllPagesAsync(); await dataTableReader.releaseAsync(); }

Tableau version: 2023.1 Desktop & Server

bcantoni commented 1 year ago

Update: We have a team internally working on this issue now, so standby for further updates as we make progress on a fix.

bcantoni commented 1 year ago

Update: this bug has been fixed and it should be included in the next release (date TBD).

johnnyb25us commented 11 months ago

Hello. I see the status of this is still open and 2023.3 was released in October. Does this mean that this fix was not included in 2023.3? Will this definitely be in the first 2024 release? Regards.

jbrant commented 9 months ago

Has a date for the release that includes this bug fix yet been determined yet?

bcantoni commented 8 months ago

Thanks all for your patience on this one. This was fixed in Tableau Server 2023.3 and subsequently in Tableau Cloud as well. The fix was in the Tableau code, not this Extensions API.

merlijnbuit commented 8 months ago

What about backwards compatibility?