Session Timeout no longer works in 2019.12 in Web Client

Forum to discuss the Web client version of Servoy.

Session Timeout no longer works in 2019.12 in Web Client

Postby pbdavis » Wed Apr 01, 2020 6:06 pm

I have a production server running Servoy 8.4 and the Page Expired appears to the users after the session expires in the default 30 minutes (.\application_server\server\conf\web.xml). Then the user much log in again to use the application.
We have upgraded and enhanced our application in Servoy 2019.12.1 on a test server and the web client page never expires. Tested leaving the web client/page open all night. The next day the application is still open (no Page Expired page shown). The session is still active and the application does not require you to log back in.
The only thing I can think of that I have changed in the application for 2019.12.1 related to the expired page is that I added a custom expired page (.\application_server\server\webapps\ROOT\servoy-webclient\templates\default\ServoyExpiredPage.html) and some custom branding in the SAS settings page.
Anyone have any ideas on why the session timeout stopped working and how to get it working again?
Thanks,
Paul Davis
Belcan Engineering Group, LLC
pbdavis
 
Posts: 60
Joined: Thu Nov 30, 2017 5:40 pm
Location: Florida, USA

Re: Session Timeout no longer works in 2019.12 in Web Client

Postby Andrei Costescu » Thu Apr 02, 2020 12:13 pm

Make sure you test this on the old and new server in the same way.
Same browser type, same tab left open, same comp. behavior (both times it doesn't or does enter sleep mode) and so on.

You might be looking for something like this Auto Logout Servoy Extension.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Session Timeout no longer works in 2019.12 in Web Client

Postby jcompagner » Thu Apr 02, 2020 12:33 pm

i dont get why they would get expired (on 8.4)
If you have a webclient open (so the browser tab is not closed) an the property "servoy.webclient.datanotify.frequency:" is just default or not null.
Then a webclient will never expire. because the poll for data changes will keep the session always alive.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Session Timeout no longer works in 2019.12 in Web Client

Postby pbdavis » Thu Apr 02, 2020 7:41 pm

This is a very confusing subject to me. I will have to do more testing as Andrei suggests.
I have a requirement for session timeouts, so thanks Andrei for the link.
If the web client can never timeout, why have an optional servoy.webclient.pageexpired.page defined on the wiki.servoy.com for the web client?
I think this should be explained in your wiki on how this works or I should say, doesn't work for the web client.
I looked in my servoy.properties file and I have no "servoy.webclient.datanotify.frequency:" set. Where is this defined and explained?
Maybe I'm seeing the Page Expired page because I'm logging into the application in another browser and the previous browser window throws up the Page Expired?
I know this happens in the developer when you start a new session.

Thanks for your help,
Paul Davis
Belcan Engineering Group, LLC
pbdavis
 
Posts: 60
Joined: Thu Nov 30, 2017 5:40 pm
Location: Florida, USA

Re: Session Timeout no longer works in 2019.12 in Web Client

Postby jcompagner » Fri Apr 03, 2020 9:16 am

that setting is just on the admin page.
And has an info box explaining what it does
The page expired is used, if clients are for example killed on the server (you can shutdown/exit)
But normally WebClients that are just open will not expire because of the constant small requests to look for new data.
Thats how servoy webclient works from the start.
I personally would be very annoyed if i keep my tab open and i constantly get an page expire and i need to relogin (for example gmail)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Session Timeout no longer works in 2019.12 in Web Client

Postby Andrei Costescu » Fri Apr 03, 2020 9:20 am

You can find servoy.webclient.datanotify.frequency in the main page admin. See screenshot; the info button next to it details what it means (nothing means 5 sec (default), 0 can be used to disable it, other values are interpreted as seconds).

web_client_check_for_updates_interval.png

If you disable it, data changes comming from outside the client (other clients and so on) will not be seen automatically in the browser - until user interacts with the page in a way that sends a request to the server.

If you use the default value of 5 sec, then the http session will not time out (if set to expire in 30 min so after more then 5 sec :D ) - as Johan said - because these requests that check for updates every 5 sec. keep it active.
But it can still time out if you navigate to another site in the same tab (so the datanotify req. is no longer sent) and then decide at some point to go back, or close the tab and restore it from history for example (or close the comp and then reopen it with browser set to restore tabs and so on). So the page expired that you can customize makes sense. It should also time out as expected if you set servoy.webclient.datanotify.frequency to 0.

I will make a case to add this info to the appropriate wiki page(s).

Ah I see Johan answered first :)
You do not have the required permissions to view the files attached to this post.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Session Timeout no longer works in 2019.12 in Web Client

Postby pbdavis » Fri Apr 03, 2020 6:36 pm

Darn, I looked for it there but I guess I overlooked it.
Thanks for explaining how this works. Now it makes perfect sense.
From my day of testing in a controlled environment I have not seen any Page Expired page by leaving a web client open.
So, I guess I'll be implementing something like what https://www.mindfiresolutions.com/ provides in an extension.
Thanks again for all your help.
Paul Davis
Belcan Engineering Group, LLC
pbdavis
 
Posts: 60
Joined: Thu Nov 30, 2017 5:40 pm
Location: Florida, USA


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 4 guests