Recent Android Studio cannot connect to firebase?

Viewed 1823

I tried creating multiple new projects and made sure that all codes in several files are correct. I'm quite new to this and have never encountered this problem previously. After using the assistant to connect to firebase, it opens up the browser, asks me to login and ask for permission. After clicking the accept, a new window opens up with "localhost:55842/" and what happens to Android Studio, it will be giving a response "Firebase: Received a request from an invalid host firebase". Is there any way I can fix this? I have tried using previous version of IDEs but the only difference is that the connection succeeds but it can't receive or save data into the firebase.

2 Answers

Please make sure you turn off any antivirus and firewall temporary to enable firebase assistant connect flow running.

Android Studio choose random listening port each time we try to connecto to firebase web console, so we can't simply just allow one port in firewall/antivirus for android studio, completely disable is the only option

In my case, Avira antivirus is the cause, disable real time scan and then firebase connect flow running as expected (tried on Android Studio 3.6.1)

Hi I am not sure if you have solved this problem. I was facing the same issue. So it's the problem with the JSON file since android studio stores everything in the build it might have few older files conflicting with new file so I went ahead and deleted the old build file and restarted my android studio with the project and everything was working fine after.

Related