For Mi devices
for those who suffer from this, try what lironess mentions in a Github Comment
- enable developer mode – In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which
says you are a developer now.- Go back to Settings, Additional settings, Developer options and enable USB Debugging.
- Connect your phone to your PC/Mac and on the phone authorize your computer
- go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
- Try it now 🙂