Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have seen a number of posts relating to ErrorCode.-2, but I could not find one that matches my case.
I have a mashup page that uses the Single API to show around 20 visualizations. Sometimes they will all load fine the first time I load the page, other times I get one or several ErrorCode.-2 messages but where the chart appears perfectly behind the message (see below). However, the next time I refresh the page, the visualization that had the ErrorCode.-2 will be fine, but another vis will show the same error (or on other occasions there are no errors at all). This leads me to conclude that this has nothing to do with the visualizations or the app, but is due to some internal Qlik bug, perhaps sequencing.
In the browser console, I can see a number of errors, such as the one shown below:
Does anyone have any ideas how to resolve the issue, or how to suppress the error message? I tried using the on(error,function()) method, but since I'm using the Single API, this isn't working.
Any help greatly appreciated.
p.s. I am not using any extensions.
@ErikWetterberg , any ideas?
I raised a support ticket with Qlik for this and had a discussion with one of the employees. It appears that we cannot trap the error being returned by the Single Integration API, and the error handling I included in the Capability API code to handle filtering associated with the drop-down list was never triggered. Therefore, I decided to remove the default filter from the iframe URLs and handle it all via the Capability API. This appears to have resolved the issue, so I assume that it was due to some sort of conflict between the two filtering methods.
Hi
We have seen this issues when third party extensions are involved, by any chance do you have any third party extensions ? if so could you remove them and verify if you have the issue after removing them ?
Hope it helps.
Hi @rbartley
Did you have the chance to verify if there are third party extensions? Other thing you could check is if there are methods in use that were deprecated.
Kind Regards.
Hi @NadiaB,
I confirm that there are no third party extensions and I am not using any deprecated methods (it's the Single API, e.g. http://<servername>/single/?appid=<appid>&obj=KDswCD&opt=ctxmenu,noselections&select=$::Member%20State%20Name,Belgium&select=$::EU27_FLAG,1 (where I have replaced the actual server name and appid)) so I'm not using any methods at all).
Regards,
Richard
Hi @NadiaB,
It seems that if I remove the second field selection then the error goes away. At first, I wondered whether this was due to the underscore in the field name and so tried to encode that, but I still received the error; I also replaced that field selection with a different selection one a one-word fieldname but that didn't work either. I even tried simplifying the selection to remove the $:: state selector, but no luck either. Finally, I tried to reduce the number of iframes on the page, but that didn't work either. The strange thing is that if I click on OK, the chart is fine, so it seems like a bug to me.
I would appreciate it if you could raise this with the technical team to find out if they have any ideas.
Hi @rbartley
If you have a copy of the app, a basic sample mashup and steps to reproduce the best path to follow will be to create a case.
By any chance have you raised a case before? If not I can help to create a case but we will need the items mentioned above.
Kind Regards.
It seems that this error is related to the field.selectValues() method that I was also using on the page linked to a country list. I was using the following call:
Thank you @rbartley for sharing the resolution of the issue!!
Unfortunately, it appears that this was wishful thinking, as the ErrorCode .-2 is back again. However, it is extremely difficult to identify under which circumstances it occurs and to debug as it is not limited to a particular embedded visualization and nor does it appear consistently. It makes me wonder whether it has something to do with a time out when trying to return a visualization. I am going to raise a support case to see if that leads to a solution.
Hello @rbartley
Look for this API and handle the error code accordingly.
I am sharing sample where I am suppressing any error except ERROR CODE= 5 or 16 which is section access - Access Denied and connection lost to server errors and I am calling different modal to let the users know of the same.