This error came up to day. “Need to start a transaction before commit”. That’s it, no other information available.
I knew that it came from a plugin, but I didn’t know which one. And there are numerous plugins in this project.
After some google and investigation I came to this post by Nishantrana.
Apparently, the plugin was executing AssociateRequest on a many-to-many relationship that already exists. This of course is not allowed in CRM and duplicate key error was thrown which causes plugin to no longer be in a transaction. This causes the exception above.
Cheers – Sy