MongoError : Transaction 2 has been commited , Code : 256 , codeName : 'TransactionCommitted'

I was just doing some transactions using session.startSession() and session.endSession() I got this error and nodejs server crashed after this even though i had a try catch block.
And this error happens randomly some times it happens and sometimes it doesn’t.
When i access the server by my mobile no problem , when i use my laptop there is this error that crashes the server