Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

s29124141
Contributor II

Request aborted errors in mashup

We have mashup which does app.getObject and in the promise method we are calling field select using app.field('field').select([0], false). We see intermittent "request aborted" in the websocket response frames. Websocket request and response snapshot is below.


Qlik Sense Server Version : September 2017

Behavior : Intermittent

Request_aborted_Details.png

var elems = document.getElementsByClassName('qlik-embed');

var ix = 0;

for (; ix < elems.length; ++ix) {

     attach(elems[ix]);

}

function attach(elem) {

     var appid = elem.dataset.qlikAppid;

     var objid = elem.dataset.qlikObjid;

     if (!app) {

         app = qlik.openApp(appid, config);

     }

     app.getObject(elem, objid).then(function (obj) {

          console.log(obj);

          app.field(obj.layout.qListObject.qDimensionInfo.qGroupFieldDefs[0]).select([defIndex], false);

     });

}

Tagging few experts. Any help on this issue would be highly appreciated!

erik.wetterbergdigvijayjvs

1 Solution

Accepted Solutions
erik_wetterberg
Honored Contributor

Re: Request aborted errors in mashup

Yes, the select might abort the getLayout call used to get the data. To avoid this make the selection first, which might be difficult in your case, since you use the field name for the selection. You would need to refactor that.

On the other hand this should work. The framework should handle request aborted errors.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
4 Replies
erik_wetterberg
Honored Contributor

Re: Request aborted errors in mashup

Yes, the select might abort the getLayout call used to get the data. To avoid this make the selection first, which might be difficult in your case, since you use the field name for the selection. You would need to refactor that.

On the other hand this should work. The framework should handle request aborted errors.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
s29124141
Contributor II

Re: Request aborted errors in mashup

Thanks a lot erikwett‌ for your reply. I will try to add a retry mechanism for the aborted requests.

erik_wetterberg
Honored Contributor

Re: Request aborted errors in mashup

You should not need that, the framework should do it already. Do you actually get the wrong data in your objects?

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
m_ciesla
New Contributor

Re: Request aborted errors in mashup

Hello, I have similar problem and in face there is a border case when you are creating custom obj and this first request is aborted, so no object is created -> no layout to refresh -> no profit

Community Browser