Umbraco-CMS icon indicating copy to clipboard operation
Umbraco-CMS copied to clipboard

Backoffice Times Out Too Quickly

Open benehudson opened this issue 2 years ago • 4 comments

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

9.3 and 10.1 (really 9.0 and up)

Bug summary

I've set the timeout in appsettings.json to 08:00:00 However, I get abruptly logged out of the office sometimes after only a few (less than) 10 mins. Also, no amount of activity in the back office seems to extend the timeout. I know I'm not alone, I posted in the forum and others have mentioned they're experiencing the same timeout issue.

I've been using Umbraco since v6 days. This is an issue I haven't had in any version before v9.

https://our.umbraco.com/forum/using-umbraco-and-getting-started/109742-backoffice-timeout

Specifics

Any page in the back office. I'll be in the middle of making changes and it boots me to the login screen. Strangely if I hard refresh the login page, at this point, it'll take me back into the backoffice (without me logging in). But, when I click any button in the back office it'll boot me back to the login page again. Frustratingly any unsaved work is lost. This happens to me several times per day...sometimes multiple times per hour.

Steps to reproduce

From my experience every time I'm in the backoffice for a while I get uncerimoniously kicked out to the login screen.

Expected result / actual result

Expected: Would like to see the backoffice do two things. 1) Extend the timeout when I'm active in the backoffice (every time I send something to the server...extend the timeout). 2) The backoffice timeout to honor the appsettings.json

Actual: I get kicked out quicker than a drunk kid at a college bar.


This item has been added to our backlog AB#22569

benehudson avatar Sep 09 '22 14:09 benehudson

Hi there @benehudson!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

github-actions[bot] avatar Sep 09 '22 14:09 github-actions[bot]

This sounds very much like the issue fixed in #12029 (released in 9.4) I'd recommend upgrading to the latest minor 😀

nikolajlauridsen avatar Sep 09 '22 14:09 nikolajlauridsen

Thanks @nikolajlauridsen #12029 says it's fixed in v9. I have the same issue in v10+ If it was fixed in v9 shouldn't that mean the fix would already be in v10?

benehudson avatar Sep 09 '22 14:09 benehudson

Hmm indeed it should, so there might be something afoot. I double-checked the code on the v10/dev branch just to be sure, and the amends are there, so the fix is definitely there.

nikolajlauridsen avatar Sep 09 '22 15:09 nikolajlauridsen

Hey @benehudson I've had some time to take a look at this today, but unfortunately, I'm not able to reproduce this. When I set the TimeOut property in the global settings like so

"Global": {
        "DefaultUILanguage": "en-us",
        "HideTopLevelNodeFromPath": true,
        "UmbracoPath": "~/umbraco",
        "TimeOut": "08:00:00",
        "UseHttps": false,
        "Id": "5e8eebbd-d035-4b19-b797-39ec05ab273c"
      },

I don't get logged out prematurely, I've tried:

With the code in v10/dev: Hosting the site on windows, using both Chrome And Firefox Hosting the site on Manjaro Linux, using Firefox

I've also tried creating a site using the templates with the latest version (10.2.1), and with the same results, I don't get logged out of the backofffice prematurely.

All of these different configs were tested for well over an hour, with no errant behavior.

It seems that no matter what I do I can't seem to reproduce the issue, are you using some sort of custom setup I'm missing?

nikolajlauridsen avatar Oct 04 '22 13:10 nikolajlauridsen

Just as an idea, if this happens so often, maybe there's browser extensions doing something? Cookie extensions, adblocker extensions? I've only had this happen once while I was working on a blog post and it was exactly after I had not touched the backoffice for 20 minutes (luckily a quick login got me going again without losing my changes).

If it's not browser extensions then yes, please try to see if you have any custom configs and maybe inspect your cookies to see what expiry dates they get when you set the timeout to 8 hours.

nul800sebastiaan avatar Oct 05 '22 07:10 nul800sebastiaan

This has indeed been fixed 😄

  • With "TimeOut": "00:00:30" I am logged out almost instantly.
  • With "TimeOut": "00:01:00" I am logged out after approximately 30 seconds.
  • With "TimeOut": "00:02:00" I am logged out after approximately 1½ minutes.
  • With "TimeOut": "00:04:00" I am logged out after approximately 3½ minutes.

This makes sense because anything below 30 seconds of remaining logged-in time is considered as being logged out - see https://github.com/umbraco/Umbraco-CMS/blob/v11/contrib/src/Umbraco.Web.UI.Client/src/common/services/user.service.js#L64.

kjac avatar Dec 13 '22 09:12 kjac