Can not connect – Android Studio

I'm trying to learn to work with a base of fire. So, I click on the button & # 39; connect to base of fire & # 39; in Android Studio and the browser opens the form & # 39; Android Studio wants to access your Google account & # 39 ;. After pressing the Allow button, redirects me to this: Unable to connect the page

The address bar is as follows: http: // localhost: 54367 / Callback? code = / googleapis.com/auth/appengine.admin%20https://www.googleapis.com/auth/cloud-platform%20https://www.googleapis.com/auth/firebase%20https://www.googleapis .com / auth / userinfo% 23email% 20https: //www.googleapis.com/auth/plus.me

I am at a loss in what to do I have tried to open both with Safari and with Firefox and both send me to the same page. The Android Studio version is 3.2.1. The operating system is High Sierra version 10.13.6. Any help is really appreciated.