[IGN-6616] Inactivity timeout timing out on activity

Hi,

On one of my projects, the inactivity timer is set to 30 minutes. I got complaints the other day that the station was logging out every once in a while. After a little investigation, it seems like it is logging itself out every 30 minutes.

In fact, I have seen the logout message come up in the top right corner of the screen warning of impending logout. Before I was able to get to it, it timed out and logged the operator out.

I can’t say that the screen is physically touched in the half hour, but i can say that lots of scans were made with an HID scanner. I have set up a build where I can watch session.props.lastActivity, and sure enough it updates with every scan.

I can see in com.inductiveautomation.perspective\inactivity-properties\data.bin that the inactivity timer is set to


{
  "isIdleTimeoutEnabled": true,
  "idleMinutes": 30,
  "gracePeriod": 30,
  "gracePeriodMessage": "You will be logged out due to inactivity in {seconds} seconds",
  "timeoutAction": "UserLogout",
  "logoutUrl": "",
  "isCustomLogout": false
}

Any ideas as to what may be causing this?

Thanks

The session will only be kept alive if it registers keystrokes or mouse movement. Scanners are very hit-or-miss when it comes to whether or not the scanned data is supplied as keystrokes. Based on your experience, it seems very likely that your scanner is one of the ones which does not register scans as keystrokes in the session.

Do you have a Script setup as part of the Scan Event? You could always try sending a message to the session to move focus around the environment. That might cause the browser to register activity.

For clarification, the lastActivity monitors when the last time the session sent data back to the Gateway, but this does not mean the user interacted with the environment; the sending of data from the front-end session to the back-end Gateway is just a happenstance of user interaction in most instances.

Hmm, that’s interesting, it is a Zebra scanner set as HID output. Every other application I have used them with doesn’t differentiate between the scanner and keyboard. But based on the evidence, that does appear to be what is happening.

I can tell you that moving focus is a basic part of what this application does. The user has to scan two or more barcodes, and each scan has a script attached to it that processes the scan to make sure it is part of the job, then moves the focus to the next input, evaluates, then clears the text boxes and moves focus back to the first text box. So there is lots of focus movement going on.

If there is anything else I can do to fake it I have all the hooks to easily do it.

Thanks

Maybe a stupid and crude suggestion, what about a USB mouse jiggler.

I was thinking about that, but would have a problem because in many cases this is reached through a Citrix session, and I don’t think I can get the guys that set that up to put a mouse jiggler in

I opened up a feature ticket to see if its feasible to reset the inactivity timer when a barcode is scanned.

Thanks. It seems like anytime a change event happens with origin of Browser that would reset the inactivity timer. I would think it might make testing easier on your side as well, otherwise Selenium or equivalent would be getting logged out in the middle of scripts if the inactivity timer is active.

A major tenet of testing is to reduce the number of variables in your environment, so the only automated testing projects which contain an inactivity timeout are projects which are only used for testing inactivity timeouts. Regardless, however, Selenium click events and key presses all qualify as activity within the session.