Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alastairmcdonald
Partner - Contributor III
Partner - Contributor III

"Not Connected" popup in Mashup when reopening a closed app

I am working on a mashup that has navigation betwene two separate apps.

I load the first app and render my visualisations as necessary then on the user clicking a navigation button i close the first app and open a second before rendering. this works fine however when i try to navigate back to the first app and reopen the connection i get a not connected pop up.

Weirdly the app does open and all the visualisations are displayed correctly.

I read a post indicating that it could be related to not closing the models that are created when using the app.getObject method

so i tried doing the following when getting the objects:

app.getObject(portal.visualisations,portal.visualisations).then(function(model) {

models.push(model);

});

and before closing the app:

angular.forEach(models, function(value){

value.close();

});

but i still get the "Not Connected" message when reopening the previosuly closed app connection.

Does anyone have any idea what i may have missed?

Message was edited by: Alastair McDonald spelling punctuation and grammmar

1 Solution

Accepted Solutions
ErikWetterberg

Hi,

internally the selections bar is different from the other objects, so it might very well work differently. Why do you need to close it? Why not just keep it, and use the show method if you need it somewhere else. Or just keep it displayed all the time.

View solution in original post

14 Replies
ErikWetterberg

HI Alastair,

this sounds like a bug. I assume that you reopen by calling Qlik.openApp again, which should create a new web socket. You would then need to call getObject again using the new app. Try checking the web socket traffic and see where the error message comes from.

Erik Wetterberg

https://extendingqlik.upper88.com/

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

Hi Erik,

I am looking at the web socket traffic in chrome dev tools and I can still see the original web scoket is open even after calling close() on the app. the new connection is also listed as pending.

websockets.png

ErikWetterberg

Hi,

so that is a bug, according to the documentation app.close() should close the websocket:

https://help.qlik.com/en-US/sense-developer/September2018/Subsystems/APIs/Content/Sense_ClientAPIs/C...

You probably should report it. What Qlik Sense version are you using?

Erik Wetterberg

https://extendingqlik.upper88.com/

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

I'm using Qlik Sense Enterprise June 2018.

I'll have a word with technical support see if they can help.

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

on support.qlik.com it lists the following information

Description

What information is available on the compatibility of Qlik Sense with Angular?

Environments:
  • Qlik Sense Enterprise, all versions

Resolution

Qlik Sense APIs were developed in a particular version of Angular, which is discoverable from the Hub in About > Third-party software as described on the help site, Using AngularJS in your mashup.

Here are a few examples:
Qlik Sense VersionAngularJS Dependency
February 2018 Patch 11.5.0
June 20181.6.9

But when I log angular.version into the console i get the following:

  1. {full: "1.5.8", major: 1, minor: 5, dot: 8, codeName: "arbitrary-fallbacks"}
    1. codeName: "arbitrary-fallbacks"
    2. dot: 8
    3. full: "1.5.8"
    4. major: 1
    5. minor: 5
    6. __proto__: Object

Have i missed something or do I need to upgrade angular on my qlik server somehow?

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

checking the require.js files at ../assets/external/requirejs/require.js shows that it is in fact loading angular 1.5.8...

I'm running a repair on my Qlik Sense services while I wait for support to reply to my ticket.

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

I've upgraded to Septmber 2018 which does have 1.6.9 in its require.js but the error is still there so probably unrelated

ErikWetterberg

Hi,

Looks like your first and fourth web socket are connections to the same app. Are you sure that you close the first one before opening the second one? Also looks like you are using the identity parameter, do you use the same identity for all connections or different ones? What happens if you remove the identity parameter, do you still get the same error?

Also looks like you have a open global web socket. What do you need that for? You might not need it, since you can use app.global instead (which reuses the app web socket instead of opening a new one).

Erik Wetterberg

https://extendingqlik.upper88.com/

alastairmcdonald
Partner - Contributor III
Partner - Contributor III
Author

Hi Erik,

thanks for taking a look,  I am not using app.global but will amend the code to see if that makes any difference.

I believe i am closing the first web socket to the app before opening the second as i call the close method on the app and this is done asynchronously using promises.