
Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qlik Sense ErrorCode.16 in mashups
Last Update:
Jul 28, 2021 3:58:43 AM
Updated By:
Created date:
Feb 28, 2020 6:42:58 AM
The mashup page shows an extra element with error code 16.
The app list is fetched correctly but the following error is shown directly in the HTML:
ErrorDialog.Title
ErrorCode.16
Common.Refresh
Sample code:
<script src="https://qlikserver1.domain.local/resources/assets/external/requirejs/require.js"></script> <script type="text/javascript"> //Read server connection var config = { host: "qlikserver1.domain.local", prefix: "/", port: 443, isSecure: true }; //Start here. $(document).ready(function () { console.log("document ready -------------------"); setupRequire() }); function setupRequire() { require.config({ baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources" }); require(["js/qlik"], function (qlik) { try { qlik.getAppList(function(list){ console.log("received list"); }, config); } catch(error) { console.error(error); } }); } </script>
Environments:
Resolution:
In order to limit the number of WebSockets opened, Qlik Sense will close the WebSocket connection immediately after getting the app list, which is getting interpreted as an error.
Use app.global.getAppList(), which keeps the WebSocket open. app.global is intended to be used if there are several API calls that need to be done.
const global = qlik.getGlobal(...) [...thousand of lines later....] global.getAppList()
For the sample code mentioned above, it will look like this:
require(["js/qlik"], function (qlik) { try { qlik.getGlobal(config).getAppList(function(list){ console.log(list); }); } catch(error) { console.error(error); } });
2,724 Views