The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

I got the following error after the snapshot tried to post the commands to the distribution database
Replication-Replication Snapshot Subsystem: agent <>failed. The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

What could be the possible cause of the error? any remedy or setting to avoid the error?

Although the error disappears after we re - run the snapshot agent forcefully?