NavigateTo JSA causes session loss in hybrid app

Hi community, Here's my problem: In my hybrid app I use the javascript action NavigateTo from the NanoflowCommons module. This correctly opens up the device's navigation app with the desired From and To destinations, however when the user on his android tablet returns to the app the whole session is 'gone' (I think, could be something other than session), no data is present and every action results in an error. Closing and restarting the app solves the problem, until the next time the NavigateTo action is used. Anyone and idea what could cause this and/or how to solve it?   NB: Modeler version 8.12.2 (which is not selectable in Studio Version dropdown for some reason) and latest version of NanoflowCommons module
2 answers

A session is by development kept on the server. It’s server side of keeping things stored that are stored in a state Client side (browser,...), so temporatly.

A session also is something that is garbage collected when not in use anymore (user logs out, or the programmed time-out is reached).

In offline-first development a session as a hook for something is never a good idea, because the development is about offline-first, and since offline there is no session available (or shouldn’t be) you need to create something else as hook to keep data stored.

One of the best ideas i can come up to store data for 1 specific user, without the need of storing it on the server in the database, would be to store it in local storage (the storage in the device the user is using). if it should be available in other devices as well, then you need to create an entity as a hook, and make sure it gets synchronized.

I hope this can help you out a bit.


Hi David,
With session I meant ‘local’ session, like something a service worker would create: I don’t know the mx technical specifics that keeps me from having to log in every time I (re-)open the app, that’s why I chose the term :) The $Session is not available offline and there is no logic/entity tied to it, as you are right that this would be a bad idea: I’d also not do it in an online model but that’s a different story.

So unfortunately the answer does not help me any further, but thanks for answering!

FYI I’m pretty sure I’ve caught a platform (module) bug, a ticket has been submitted. I will add any updates to this question for future reference.