I keep receiving an error when running on flutter:
FirebaseAuthException ([firebase_auth/unknown] An internal error has occurred. [ Failed to connect to /10.0.2.2:9099)
I'm using a physical Android device, connected via cable, and I try to access the firebase emulator on the computer.
My flutter code:
String ip = kIsWeb ? 'localhost' : 'localhost'; // 10.0.2.2
FirebaseFirestore.instance
.useFirestoreEmulator(ip, 8080, sslEnabled: false);
await FirebaseAuth.instance.useAuthEmulator(ip, 9099);
I used adb reverse to tunnel the localhost ports to the computer, but it still doesn't work. It seems to ignore the localhost directive and attempts to connect to 10.0.2.2.