title: Flutter Firebase Auth: Hangs in Android emulator, works everywhere else
body: <p>I'm running Flutter 1.22.4 on the stable channel on Mac OS X 10.15.7. I'm using Flutter Authentiction: <code>firebase_core: 0.5.2+1</code> and <code>firebase_auth: 0.18.3+1</code>.</p>
  <p>My Flutter application has a sign-in screen for an email address and password. Here's the code that uses Firebase Auth:</p>
  <pre><code>final _provider = FirebaseAuth.instance;
  ...
  SUtil.instance.logger.i('SAuthenticationAdapter.signIn: about to sign out, just in case');
  await this.signOut();
  SUtil.instance.logger.i('SAuthenticationAdapter.signIn: about to sign in');
  await _provider.signInWithEmailAndPassword(email: userName, password: password).then((authResult) {
    SUtil.instance.logger.i('SAuthenticationAdapter.signIn: signed in: $authResult');
  </code></pre>
  <p>This code works on iOS and Android devices and in the iOS simulator. But it does <strong>not</strong> work in the Android emulator. It used to work and took half a minute or one minute to sign in. But now it stopped working altogether. I went back to previous versions of <code>firebase_core</code> and <code>firebase_auth</code>, but no luck.</p>
  <p>Here's the output when I can sign in successfully on a real Android phone. It took 20 seconds for the call to complete. It usually runs faster.</p>
  <pre><code>I/flutter (18601): [I] TIME: 2020-11-30T12:10:04.320171 SAuthenticationAdapter.signIn: about to sign in
  I/BiChannelGoogleApi(18601): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzao@99fb698
  W/DynamiteModule(18601): Local module descriptor class for com.google.firebase.auth not found.
  I/FirebaseAuth(18601): [FirebaseAuth:] Preparing to create service connection to gms implementation
  D/FirebaseAuth(18601): Notifying id token listeners about user ( XXX ).
  D/FirebaseAuth(18601): Notifying auth state listeners about user ( XXX ).
  I/flutter (18601): [I] TIME: 2020-11-30T12:10:25.841102 AuthenticationAdapter._handleAuthenticationEvent: working: _signedIn=true, _firstCall=false, uid=XXX, user=User(...)
  I/flutter (18601): [I] TIME: 2020-11-30T12:10:25.841598 SAuthenticationManager._handleAuthenticationEvent: user is signed IN
  </code></pre>
  <p>Here's the output of running exactly the same code in the Android emulator &quot;Pixel 2 API 28 with Google Play Store&quot;. I included the output of the sign-out call to Firebase Auth right before that works just fine:</p>
  <pre><code>I/flutter ( 7073): [I] TIME: 2020-11-30T13:09:48.418336 SAuthenticationAdapter.signOut: about to sign out
  AuthenticationAdapter._handleAuthenticationEvent: User is signed OUT!
  I/flutter (16448): [I] TIME: 2020-11-30T12:15:34.480042 SAuthenticationAdapter.signIn: about to sign in
  I/BiChannelGoogleApi(16448): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzao@2586f12
  F/crash_dump32(18634): crash_dump.cpp:398] failed to get process threads: No such file or directory
  </code></pre>
  <p>It seems to crash after sitting there for a couple of minutes. I've got a spinner that launches on the sign-in screen with the start of the sign-in process. That spinner never goes away in the Android emulator.</p>
  <p>I implemented the <code>onError</code> and <code>catchError</code> in my call to <code>_provider.signInWithEmailAndPassword()</code>. I even surrounded that call with a <code>try ... catch</code> block. But none of these places output anything. I temporarily disabled <code>firebase_performance</code>, <code>firebase_crashlytics</code> and <code>firebase_analytics</code>, but that didn't help, either.</p>
  <p>How can I further debug this to find out why that call is hanging?</p>