Now, this error happens due to blockage of communication between your app and firebase server. It means your app could not communicate with Firebase server.
There could be many reasons why you will get this error
Internet and VPN Connection
To solve this error, make sure your android emulator has internet connection. If no internet connect in the emulator it won’t communicate.
If you are in china or a country where google service is blocked, make sure you have VPN turned. Not only the VPN of your computer, you also have to install VPN inside your emulator.
You can verify if your emulator has internet connection or not by opening up the chrome browser and visit a website.
You also need to verify if you access Google from the emulator just simply by visiting youtube from your emulator in the browser.
Firebase Setup
If you failed to setup firebase, then you may get this error as well. Make sure you followed all the steps.
Google Playstore
Make sure your emulator has Goolge Playstore. Some emulator doesn’t support Google Playstore in them. In that case create a new emulator that supports Playstore.