"Failed to set remote answer sdp: Called in wrong state: stable"

“Failed to set remote answer sdp: Called in wrong state: stable”

The app work fine if I initiate the offer from some other device like from my browser and the answer sdp is generated by from the phone after setting the remote description. But when I initiate the offer on my phone and then try to set remote description with the answer sdp generated from the browser it throughs the warning
Possible Unhandled Promise Rejection (id: 0):
“Failed to set remote answer sdp: Called in wrong state: stable”

I haven’t used any database for now offer and answer are both copy/pasted directly.

Hello anyone, I’m still looking for a solution.
Thanks