Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

ExportDataFailed Error from Embed API

I have seen others post this issue with no response so here is hoping that this will increase the noise on this issue. It is extremely critical and urgent for us.

 

We have been using the visual.exportData method for a couple of years to export summary or underlying data from Power BI visuals. All of a sudden this is no longer working with a very ambiguous error message:

 

error = {message'ExportDataFailed'detailedMessage'Export visual data has failed'errorCodeundefinedlevel3technicalDetails:{
errorInfo: undefined
requestId: undefined
}}
 
The issue seems to only be affecting table and matrix visuals.
 
We are using the latest v2.18.7 javascript client version
 
Status: Accepted

Hi,

According to my research, a similar issue has been reported internally, so stay tuned.

 

Issue description: Unable to export Summarized data for the Matrix visual with an error

ICM: 275173415

 

I will update here once I get any information.

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

Comments
stevenamani
Advocate II

Please note that the issue also happens with other visuals and "underlying" data export. It is not limited to Matrix visuals

stevenamani
Advocate II

I can confirm that making the API call twice or thrice (immediately after it errors) is working. 

Anonymous
Not applicable

Has there been any update yet? Manually sending out all Excel files has been really painful every morning. Hopefully this will be solved before the weekend.

Sastry_Chirravu
Frequent Visitor

Visual Data export issues in Embedded Environment -

Case 1 : observed after 16-Dec-2021

First time ,When we try to export the data of the visual but not on the Report level. If we try to Second and third time it is working.

Case 2 : additional to thhe above issue , we have another issue with respect to Visual and Report level data too. Every time we export it is working for some visuals only which is very inconsistent.

Hope it will rectified ASAP.

JPW
New Member

As mentioned by @stevenamani , calling exportData multiple times does seem to work.  Here's a quick-and-dirty function you can call in your code that will do the retries (4 retries).  Just pass the visual you're wanting to export data from as parameter. 

 

  async function exportData(visual: VisualDescriptor): Promise<models.IExportDataResult> {
    // starting on 12/16/2021, exportData throws error.
    // If call exportData repeatedly a few times then it starts to work.
    // Implement pattern to try 4 times before throwing an error

    let tries = 0;
    let result: models.IExportDataResult;
    while (tries < 4) {
      try {
        result = await visual.exportData(models.ExportDataType.Summarized);
        break;
      } catch (err) {
        tries++;
        if (tries === 4) {
          throw err;
        }
      }
    }

    console.log(`exportData [tries]: ${tries}`);

    return result;
  }

 

 

And in your code where calling exportData currently throws an exception, replace 

 

const result: models.IExportDataResult = await visual.exportData(models.ExportDataType.Summarized);

 

  with

 

const result: models.IExportDataResult = await exportData(visual);

 

 

AmosHersch
Employee

The bug causing this issue was found and fixed in Power BI code. The fix will be available by the end of January.

Sastry_Chirravu
Frequent Visitor

Thanks for update @AmosHersch 

At starting of this issue the visual data loaded after the first or second call, but now it may not specifically loading the data even after multiple calls.

AmosHersch
Employee

@Sastry_Chirravu 

From our internal testing seems that retrying the operation solves the issue, and also the bug which was found in the code indicates that the second try should work. I can't tell why your 2nd try doesn't work without debugging it on your system.

The broken scenario which was fixed includes export summarized data to CSV. It happens when you export from Power BI portal, and also from a report embedded in an app when clicking the export data button or when calling the JavaScript API.

 

 

stevenamani
Advocate II

Thanks for the update @AmosHersch

Sastry_Chirravu
Frequent Visitor

This issue is still visible in the embedded environment and has raised the request again. There is no JavaScript API new version released after 13th January as per my information. Does anyone have information about the new release of the JavaScript API?