Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
bortolotti_carl
Partner - Contributor III
Partner - Contributor III

exportImg from App API does not working on Qliksense June 2020 Patch 1

Hi,

After update customer's environment some mashups and/or extensions does not working when call method exportImg. The promise always returns "status: -1" (Image bellow). I ran the same mashup on previous version (November 2019) and it works perfect. Here is my code:

const renderImg = (qlikApp, htmlObjectId, qlikObjectId) => {
const imageContainer = $(`#${htmlObjectId}`);
return qlikApp.visualization.get(qlikObjectId)
.then((vis) => {
// const settings = { format: 'png', height: 768, width: 1366 };
const settings = { format: 'png', height: 100, width: 100 };
return vis.exportImg(settings)
.then((result) => {
return new Promise((resolve, reject) => {
imageContainer.onload = () => {
console.log(`Image loaded`); // AQUI
resolve(result);
}
imageContainer.onerror = () => {
console.error(`Image load error`);
reject(result);
}
$(imageContainer).attr("src", result);
});
}, error => alert(JSON.stringify(error)));
});
};

//callbacks -- inserted here --
//open apps -- inserted here --
app = qlik.openApp('1a6d14f8-64ff-4e4e-af22-452e5b13928c');

//get objects -- inserted here --
renderImg(app, "QV01I", "GBsMh");
renderImg(app, "QV02I", "ZvVmxmc");
renderImg(app, "QV03I", "LmUrUs");

 

bortolotti_carl_0-1600956267215.png

 

 

 

Labels (4)
6 Replies
Aiham_Azmeh
Employee
Employee

Hi @bortolotti_carl ,

This should have worked, any console errors or failing requests in the network tab? can you export the same visualization in Qlik Sense?

bortolotti_carl
Partner - Contributor III
Partner - Contributor III
Author

Hi @Aiham_Azmeh , no errors... how i mentionate above, the promise exportImg raise a reject with error object result "{ status: -1 }"... At the code "error => alert(JSON.stringify(error)))"... 

Aiham_Azmeh
Employee
Employee

🤔- we probably need to do a deeper investigation, pls contact support and report this issue so we can get priority on it.

bortolotti_carl
Partner - Contributor III
Partner - Contributor III
Author

i can´t make it, because i haven´t access to the partnher panel... do you have any idea how do i do that?

kishore3k
Partner - Contributor III
Partner - Contributor III

Hi Aaz, 

We are similar similar issue in export pdf,  

do we have any resolution? 

Version - QS June 2020 Patch 7.

Aiham_Azmeh
Employee
Employee

@kishore3k , @bortolotti_carl , I unfortunately have no item to track this in R&D - please contact support and report this issue.
I would have created an issue on my own, but I cannot reproduce it.