Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rob Watkins 369 posts 701 karma points
    May 16, 2017 @ 09:32
    Rob Watkins
    0

    417 Missing token suddenly occurring on all our sites

    We have several Umbraco sites that have been working fine, then on Monday (15th May) clients on various sites starting reporting that they were seeing no content on login.

    Checking it out, it is returning 417 Missing Token on various services on login; an F5 will make everything work.

    It is consistent every time; log in, nothing works, F5, everything works.

    Seems to be a common error but with various causes; I have cleared cookies, restarted site, no dice. Reproducible every time.

    The initial login sends a UMB_UCONTEXT cookie (and my app cookie for site users).

    The F5 sends that + cookies XSRF-TOKEN and XSRF-V, and extra header X-XSRF-TOKEN.

    Replaying the requests in the object inspector will reliably give the same results, so clearly it is the headers that are causing the problem.

    Any ideas how to fix? And why it's suddenly started happening?

  • Rob Watkins 369 posts 701 karma points
    May 16, 2017 @ 15:21
    Rob Watkins
    0

    Update: 7.5 works; so we can upgrade if it is not patchable.

    I would prefer a fix however.

  • Craig Mayers 164 posts 508 karma points
    May 16, 2017 @ 15:41
    Craig Mayers
    0

    Hi Rob,

    I have seen this issue a few times...

    I would suggest just simply upgrading if it is feasible for you. If you manage to find a fix, please post it here for the rest of the community. ;)

    Good luck!

    Craig

  • Bob 38 posts 160 karma points
    May 16, 2017 @ 17:23
    Bob
    0

    Same issue.... I don't have the option to upgrade but I would prefer a fix?? Is this something Umbraco have done or something that had been caused by a change?

  • Ihor 11 posts 83 karma points
    May 16, 2017 @ 18:32
    Ihor
    0

    I have the same issue.... Please let community know if somebody find fix

  • Ihor 11 posts 83 karma points
    May 16, 2017 @ 20:52
    Ihor
    0

    Hi All,

    Looks like I found a workaround. I cannot upgrade Umbraco to the latest version so I had to find a solution. For now, I use version 7.2.8

    So I downloaded Umbraco sources from here: https://github.com/umbraco/Umbraco-CMS/releases/tag/release-7.2.8

    And made a small change in AuthenticationController from Umbraco.Web project

    1) Deleted SetAngularAntiForgeryTokens attribute from PostLogin method

    2) Added new private method (in fact just copied piece of code from SetAngularAntiForgeryTokensAttribute)

    private void ValidateCookies(HttpContextBase context) {
           if (context.Request.Cookies.Get(AngularAntiForgeryHelper.AngularCookieName) != null
                && context.Request.Cookies.Get(AngularAntiForgeryHelper.CsrfValidationCookieName) != null)
            {
                return;
            }
    
            string cookieToken, headerToken;
            AngularAntiForgeryHelper.GetTokens(out cookieToken, out headerToken);
    
            var angularCookie = new HttpCookie(AngularAntiForgeryHelper.AngularCookieName, headerToken)
            {
                Path = "/",
                //must be js readable
                HttpOnly = false,
                Secure = GlobalSettings.UseSSL
            };
    
            var validationCookie = new HttpCookie(AngularAntiForgeryHelper.CsrfValidationCookieName, cookieToken)
            {
                Path = "/",
                HttpOnly = true,
                Secure = GlobalSettings.UseSSL
            };
    
            context.Response.Cookies.Add(angularCookie);
            context.Response.Cookies.Add(validationCookie);
        }
    

    3) Use this method from PostLogin method (just before return)

         ...
         ValidateCookies(http.Result);
         return result;
    

    So it looks like something wrong with cookies when we set it from ActionFIlter. It simply does not return cookies in response.

    Briefly tested it on two different websites and it looks fine now. I can log in and there isn't broken token errors. Maybe it breaks something else so I will make more tests

    Please let me know if somebody find another solution.

    Thanks Ihor

  • Josh G 11 posts 52 karma points
    Jul 05, 2017 @ 21:03
    Josh G
    0

    Hi Ihor,

    Have you continued to use this fix without any issues?

    Are you able to provide the updated DLL files?

    Thanks

  • Ihor 11 posts 83 karma points
    Jul 19, 2017 @ 17:30
    Ihor
    0

    Hi Josh,

    Sorry for delay with answer. You can download umbraco.dll by this link umbraco dll

    Thanks

  • Bob 38 posts 160 karma points
    May 19, 2017 @ 18:42
    Bob
    0

    We still have this issue. Surprised no one from Umbraco had come forward to explain why this occurred in the first place

  • Rasmus Söderström 5 posts 75 karma points c-trib
    May 23, 2017 @ 09:02
    Rasmus Söderström
    0

    We also have this issue. Can confirm this occurs on multiple versions, up to 7.2.8. More details on our issue here: http://issues.umbraco.org/issue/U4-9873

    We think our issue first appeared when migrating to Windows Server 2016.

    Have you made any changes to the hosting environment?

  • Pradip 24 posts 116 karma points
    Jun 08, 2017 @ 11:16
    Pradip
    0

    Hello All,

    I am facing the same issue with Umbraco version 7.1.4 assembly: 1.0.5261.28127 from 15 th May.

    Not able to find the below files in umbraco folder :

    umbraco/backoffice/UmbracoApi/UpdateCheck/GetCheck Failed to load resource: the server responded with a status of 417 (Missing token)

    umbraco/backoffice/UmbracoApi/Section/GetSections Failed to load resource: the server responded with a status of 417 (Missing token)

    umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content Failed to load resource: the server responded with a status of 417 (Missing token)

    umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds Failed to load resource: the server responded with a status of 417 (Missing token)

    Also I don't have backoffice folder in the installed umbraco site folder.

    Help me its urgent.

    Thanks in advance. Pradip

  • Mohsin Bhatti 14 posts 92 karma points
    Jun 08, 2017 @ 12:21
    Mohsin Bhatti
    0

    Hello All,

    we have facing the same issue with Umbraco version 7.1.4 assembly: 1.0.5261.28127

    when we login to umbraco; get blank frames from left side. Left menu is completely empty because of error that show in console(please see the image).

    If we reload(press F5) the page it works fine.It is consistent every time; log in, nothing works, F5, everything works.

    we also try to clear cookies and caches of browser. But still issue remain same.

    Is this something Umbraco have done or something that had been caused by a change?

    we get the following errors in the backoffice.

    Failed to load resource: the server responded with a status of 417 /umbraco/backoffice/UmbracoApi/UpdateCheck/GetCheck

    Failed to load resource: the server responded with a status of 417 (Missing token) /umbraco/backoffice/UmbracoApi/Section/GetSections

    Failed to load resource: the server responded with a status of 417 (Missing token) /umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content

    Failed to load resource: the server responded with a status of 417 (Missing token) /umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds

    Failed to load resource: the server responded with a status of 417 (Missing token) angular.min.js:106 POST /umbraco/backoffice/UmbracoApi/Authentication/PostLogout 417 (Missing token)

    Anyone has an solution to this problem?enter image description here

  • Daniel Reagan 19 posts 71 karma points
    Jun 13, 2017 @ 13:06
    Daniel Reagan
    1

    Umbraco 7.2.8 -- Server 2012 sp1

    removing KB4014604 fixed the issue for us

  • Søren Kottal 702 posts 4497 karma points MVP 5x c-trib
    Jun 26, 2017 @ 09:12
    Søren Kottal
    0

    Can anyone confirm that this works in 7.5, with KB4014604 installed?

  • Søren Kottal 702 posts 4497 karma points MVP 5x c-trib
    Jun 28, 2017 @ 13:40
    Søren Kottal
    0

    An update on this:

    I have a solution on 7.3.1 that is not affected, also solutions on 7.4 and 7.5 without problems.

    So if you need to upgrade, you don't necessarily need to go all the way up :)

  • Dean Bullock 4 posts 106 karma points
    Jun 29, 2017 @ 05:57
    Dean Bullock
    1

    I had this issue on 7.6.3 when I changed the web.config to umbracouseSSL to true. I found clearing my cookies then logging back in fixed the issue.

  • Daniel Reagan 19 posts 71 karma points
    Sep 18, 2017 @ 19:51
    Daniel Reagan
    0

    Update: this happened again to us after installing Windows updates on Server 2012 R2. Our Umbraco 7.2.8 back office broke with the 417 errors again.

    I ended up using the recompiled umbraco.dll from above to fix the issue.

  • Jesse Andrews 191 posts 716 karma points c-trib
    Jan 11, 2018 @ 18:41
    Jesse Andrews
    0

    I encountered this issue after upgrading from 7.6.5 to 7.7.6 and signing in with chrome. I've tried deleting the cookies in the past without success, so I tried signing in with a different browser (Firefox in this case) and it worked there. When I came back to chrome and tried logging in again it worked. Haven't tested this thoroughly, as I don't run into this problem often, but might be a workaround for people encountering this issue.

  • Nurhak Kaya 53 posts 147 karma points MVP 2x c-trib
    Jan 11, 2019 @ 18:52
    Nurhak Kaya
    0

    Update: This was working fine on 7.5.7 but then I have upgraded it to 7.13.0 and sadly even though this is the latest release at the moment and was released only this week, I see this exact same problem.

    Is there anyone else experiencing the same problem? And any solution please? Thanks in advance.

    Update 2: I have created a new bug for this but unfortunately it has been closed almost straight away, saying "we're not able to reproduce on a clean install at the moment.", which basically means it is not Umbraco Developers' problem but it is your problem, even though problem occurs after an Umbraco upgrade. Very disappointing.

  • Steve Morgan 1345 posts 4452 karma points c-trib
    Mar 07, 2019 @ 12:01
    Steve Morgan
    0

    This happened to me after an upgrade. Check the umbracoUseSSL setting is true if you're on HTTPS. Delete your cache, TEMP and umbraco.config and restart the site then clear your session and cookies.

    Fixed it for me.

    UPDATE - No it didn't!

    I've isolated the issue to be something on the front end with sessions / cookies. If I open ONLY the backoffice it works perfectly. If I open the front end in another tab then the Umbraco tab instance starts throwing the 417.

    I'm looking at cookies and headers to see what's different.

    UPDATE2 - Found it to be a third party cookie tool on the front end killing the UMB-XSRF-TOKEN token cookie. https://github.com/umbraco/Umbraco-CMS/issues/4138

  • Simon Proctor 1 post 72 karma points
    May 12, 2019 @ 21:45
    Simon Proctor
    1

    I've had similar issues and have found its the missing ASP.NET session ID cookie. Going straight to the backend, that cookie isn't set and the other cookies don't appear.

    Anything relating to clearing cookies, cache etc don't work. Logging in only sets the affinity cookie (if you're on ucloud) and the umbcontext.

    Hit the front end, get the session cookie and then go straight to the back end (don't logout/login) and the cookies get set. If you've seen a white screen then it should disappear straight away.

  • Asbjørn 82 posts 195 karma points c-trib
    Jan 21, 2021 @ 11:21
    Asbjørn
    1

    Thank you for that fix, it worked for me with one of our clients as well.

    I filed an issue here: https://github.com/umbraco/Umbraco-CMS/issues/9696

    I'm planning to have look at doing a PR, but won't have time for a couple of weeks.

  • Michael Wetzel 5 posts 74 karma points
    Jan 21, 2021 @ 21:52
    Michael Wetzel
    0

    I have the same issue....thanks for this discussion.

  • Craig100 1136 posts 2523 karma points c-trib
    Feb 23, 2022 @ 11:38
    Craig100
    0

    I've just upgraded a large site from 7.15.3 to 7.15.7 and these issues remain.

    1. Selecting a node in the Content tree often results in the results pane showing the loading dots forever. If you do a full browser refresh, both panes load instantly.
    2. Make small change to a page, view the change in the FE, amend the change. When the save and publish is hit for the second time, it displays what my client describes as the "X of Doom" and doesn't update.

    In the Chrome console I see https://ww.mysite.com/umbraco/backoffice/UmbracoApi/Content/PostSave 417 and https://play.google.com/log?format=json&hasfast=true&authuser=0 401

    I will update if any of the solutions in this thread work.

    UPDATE This fixed it form me: https://github.com/umbraco/Umbraco-CMS/issues/4138#issuecomment-740489174

Please Sign in or register to post replies

Write your reply to:

Draft