We sometimes receive screen shots from business users indicating they are seeing "Insufficient Privileges" errors. These errors come up in a variety of contexts, but they appear to mostly be associated with complex legacy Visualforce solutions (of which we have several).
What these issues seem to have in common is that they are:
- Sporadic, i.e. they can't be reliably reproduced. Even with careful attention to the user context, the records involved, and the actions attempted, we have seldom been able to reproduce the issue reported.
- Opaque -- even when we are lucky enough to reproduce the issue, the resulting debug logs provide no helpful information.
- Widespread, affecting users across many profiles, business areas, code-based solutions, etc.
- Increasing -- this is becoming a bigger and bigger paint point for the business.
A lot has been written about "Insufficient Privileges", but practically all of it assumes you have a reproducible problem. To reiterate: we don't.
Right now I'm toying with a theory having to do with
@future methods in the trigger logic for commonly-used standard objects causing deadlocks. The variability of the
@future method's execution time seems to have the potential to introduce conflicts that are sporadic and hard to reproduce. A deadlock might explain why the debug logs are so unhelpful. And the fact that we have these on core standard object triggers could explain why the problem is so widespread.
@future methods would be an undertaking, and I'm shaky at best on whether it would solve anything. Is there any way to confidently diagnose this? Is the above theory sound? What other theories should I be entertaining?