Software bug after connecting earphones

After I plug in my earphones, the phone volume shoots up to full. Even when I decrease the volume manually, it still shoots up either instantaneoulsy or over a period of time. Also, the music is continuously paused and resumed automatically. Google assistant keeps on turning on automatically just randomly...
This discussion has been closed.
Comments
All these problems vanish when I unplug the earsets
Hi there, we'd request you to check the earphones, kindly use them with other device and check if working fine. You make try below steps:
1. Clear system cache.
2. Try the same under safe mode:
Hold the power button for 5 seconds => When the screen flashes with option => Press & hold power option => You will get an option to restart in safe mode
3. If still you face the issue factory reset your phone after taking a full backup.
Ok thanks! Will do!
Happening same with me.
Tried all possible recommendations.