I’ve noticed that after a while, I come back to a dashboard and none of the navigation buttons works, none of the page buttons work. The hover and click effects render ok but the OnClicks don’t seem to be firing.
A quick refresh of the page and it’s ok.
Sometimes I see a small modal “timeout, please refresh the page” - but not always?
I’m hosting PSU via IIS, perhaps there’s a setting/tweak I’ve missed in the app pool or something?
It sounds like your session is timing out - which I believe is expected behavior. I found that there is a user session timeout setting in AppSettings.json, but more likely I think you’re looking for this: (5th line item from the bottom) Changelog - PowerShell Universal
Thanks @rbleattler - It does seem like it’s timing out, but when it does it’s not always showing the “Refresh this page” modal; the dashboard still appears usable, button hovers work etc but nothing is “clickable”.
I tried the parameter -SessionTimeout on New-UDDashboard but it isn’t recognised (1.5.14, dashboard using framework latest)
I set the SessionTimeout in appsettings.json (to 1, for testing) and the dashboard does time out, it becomes unresponsive as expected - but no “refresh this page” modal.
Any idea if there’s a setting to force that modal to appear on every timeout?
There is another setting you can try tweaking and thats in the dashboards.ps1 file on New-PSUDashboard. There should be a -SessionTimeout parameter. By default it just uses the cookie timeout but you can try setting that lower than what is in appsettings.json to see if that has an effect.
[04-08-21 12:21:56 PM] Startup: A parameter cannot be found that matches parameter name 'SessionTimeout'.
[04-08-21 12:21:56 PM] Startup: at <ScriptBlock>, C:\ProgramData\UniversalAutomation\Repository\dashboard.ps1: line 363
at <ScriptBlock>, <No file>: line 1
(that’s with the framework set to either latest or 3.3.3)
DOH! Apologies @rbleattler and @adam - I was attempting to set -SessionTimeout on the New-UDDashboard cmdlet in my dashboard’s main .ps1 file, instead of on New-**PSU**Dashboard in the dashboards.ps1 file.
My mistake.
I’ve now:
set -SessionTimeout to ‘1’ within dashboards.ps1
recycled the app pool in IIS
restarted the dashboard from the admin console
browsed to the dashboard
let a minute pass
result = dashboard has timed out, no “refresh modal”, site not responsive
also:
set -SessionTimeout to ‘1’ within dashboards.ps1
set SessionTimeout to ‘1’ within appsettings.json
recycled the app pool in IIS
restarted the dashboard from the admin console
browsed to the dashboard
let a minute pass
result = dashboard has timed out, no “refresh modal”, site not responsive
Yeah I had the dev tools open, these were no messages added to the console.
Every now and then I’ll come back to a dashboard tab that I’d forgotten about, and the refresh modal is there because the dashboard had timed out. It’s just more often than not I’m not seeing that. Easily fixed with a quick page refresh but not a great user experience.
LOL, I just find it amusing that IIS is constantly a crux here. As someone whose background was as a SysAdmin, my exposure to IIS has been from a management perspective up until a few years ago - it seems to be so much more complicated than other web platforms.
This shouldn’t be happening. I tried to reproduce this today without success so we should open an issue to track and try to figure out what is causing this.
i got this issue more often as well but i have noticed it happens more when you open the admin page and open the dashboard from the view button. i think the admin page session time out issue has something to do with this.
I see this often too. If not every time. I’m not using IIS or the View-button in the admin-console.
I got a lot of Chrome-tabs open and all navigation links don’t work after timeout. Even if one tabs is refreshed the others still don’t work.
I’ve just tried in Edge and after a timeout I got this error in the browser when clicking a navigation link:
"Object reference not set to an instance of an object.
at UniversalDashboard.Execution.PowerShellExecutionService.ExecuteEndpoint(ExecutionContext context, AbstractEndpoint endpoint, List`1 nonTerminatingErrors) in D:\a\universal\universal\src\UniversalDashboard\Execution\PowerShellExecutionService.cs:line 170"
I spent a bunch of time on this today and noticed that I was seeing the timeout message reliably after creating a new repo/database. This was with a newly created dashboard too, with a ‘Url’ set as “/test”
As soon as I changed the ‘Url’ field from “/test” to just “/” (so the dashboard loads directly off the root url) it stopped displaying the timeout message again and the site would become unresponsive (after ~1:45 timeout). Then after changing the ‘Url’ back to anything, like “/test99” - refreshed - waited 1:45 and saw the timeout message as expected!
So I’m just wondering if anyone who is experiencing this (site times out but doesn’t show the timeout message) and has their site Url set to “/” could please try setting/changing the ‘Url’ property for their dashboard to something else like “/test” or “/home” or whatever - just to see if the timeout message then displays reliably or not.