0

I'm getting a peculiar error, something I haven't seen before, when I run test classes. All the failing tests were passing successfully earlier (a week ago).

System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 1 records: 07H7Y000000Cc1RUAS: []

The 07H prefix refers to ContentFolder.

I get this error on some test classes where I refer to some Content- object. If I run these tests individually, some of them pass while some won't even pass if run them on their own.

I have one Library, which is the standard Assets Library. The error happens when I call insert on a list of ContentVersion records. I'm running these tests as System Administrator on our sandbox org.

How would I go about debugging this error?

Thanks in advance.

2
  • failure occurs while running these tests in production or sandbox/scratch org?
    – cropredy
    Feb 15 at 18:25
  • Sorry forgot to mention: in my sandbox org Feb 16 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.