You need to sign in to do that
Don't have an account?
Do you think SF Sites become undebuggable because of "Authorization Required " error page?
I'm starting to reach the point where I think SF Sites can become undebuggable because on certain errors you get only the "Authorization Required " error page.
I have a Sites application that has been working pretty well. Now in one sandbox, and one sandbox only, when I hit a certain point in the application, I always get the "Authorization Required " error page. But, I do not believe it is because of permissions. I believe that page is masking the real error.
The page works fine when I run the same scenario logged in and by starting with the .../apex/pageName URL.
Run via the external Sites URL, I get that error. Something is obviously running differently when run from the public sites user but I don't have any idea how to find out.
I put debug logs on for the sites guest user. Then I triggered the operation that causes the error. I see two new logs in the Debug Log list. The first log shows stutus success with a duration of 2,168 ms. So, it doesn't look like there's a permissions error. Then there's a second short log that just shows that the /apex/Unauthorized page has been served.
It might be that there's some sort of View State error or some other internal error but I have no way of figuring out what it is?
By the way, I did add {$Site.ErrorMessage} and {!$Site.ErrorDescription} to Unathorized.page.
All I get is --
Login is required to access this URL.
and--
Login is required to access this salesforce.com URL. Please contact your administrator if you feel this is an error.
I do not think it's a permission error. But I have no way of knowing what the real error was.
And, if it were a permssions error, how would I know to what?
I'm with you on this - I spent many hours trying to debug a sites problem that turned out to be a related test class that was failing, but I never found that out via the normal degug route you have described (and I also tried)
In the end this post helped me work it out using the 3rd approach:
When the page failed,I finally found out what the error actually was and could then fix it...
I checked that doc. All good ideas but none will be a slam-dunk on this issue--
I suspect it may be something like a fatal VF error, maybe View State size. I don't know that there is any way to detect that.