Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
s29124141
Partner - Creator II
Partner - Creator 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
ErikWetterberg

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

View solution in original post

4 Replies
ErikWetterberg

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

s29124141
Partner - Creator II
Partner - Creator II
Author

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

ErikWetterberg

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

Erik Wetterberg

Anonymous
Not applicable

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