I am an idiot. I'm writing this post in case you're an idiot too. It concerns a nasty looking, but ultimately harmless error in Sitecore 8's Experience Analytics screen that caught me out more than once.
This led me to believe that my __CSRF session cookie did not correctly correspond with my application's machine key. I think the most likely cause of this was that I had left my browser open while I reset IIS. The cookie was still associated with the old machine key, but the application had a new one.
So embarrassingly the answer is ... uh ... close your browser.
Or at the very least clear your cookies for the affected site.
I'm sure there are many reasons why these error messages might display, but you might save yourself some time and effort if you try this solution out first. Don't worry, I won't tell anyone. We idiots need to stick together.
The Scenario
- You open up Experience Analytics from the Launchpad, and instead of being wowed by a screen full of impressive charts and tables, you get a list of error messages like:
The TopTenCampaignsByValue graph cannot be displayed due to a server error.
Contact your system administrator. - Your browser console contains a number of "403 (Forbidden)" responses.
The Solution
The answer became clear when I investigated the URL's associated the 403 responses. When I requested them directly I found they were "Anti forgery token" errors.This led me to believe that my __CSRF session cookie did not correctly correspond with my application's machine key. I think the most likely cause of this was that I had left my browser open while I reset IIS. The cookie was still associated with the old machine key, but the application had a new one.
So embarrassingly the answer is ... uh ... close your browser.
Or at the very least clear your cookies for the affected site.
I'm sure there are many reasons why these error messages might display, but you might save yourself some time and effort if you try this solution out first. Don't worry, I won't tell anyone. We idiots need to stick together.
Comments
Post a Comment