I successfully had the firebase auth emulator working a few days ago, but it has mysteriously stopped working. I get a generic network error when trying to authenticate with any platform. I am using a physical device via USB. When I navigate to the emulator address and port on the device, I get the appropriate json response, so I think the connection should be fine. Authentication without emulator is working.
I have this in my application launch
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
Auth.auth().useEmulator(withHost:"192.168.0.10", port:9099)
let settings = Firestore.firestore().settings
settings.host = "192.168.0.10:9098"
settings.cacheSettings = MemoryCacheSettings()
settings.isSSLEnabled = false // required when pointing to emulator
Firestore.firestore().settings = settings
return true
}
I also have this firebase.json configuration
{
"firestore": {
"database": "(default)",
"location": "nam5",
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"emulators": {
"auth": {
"port": 9099,
"host": "0.0.0.0"
},
"firestore": {
"port": 9098,
"host": "0.0.0.0"
},
"ui": {
"enabled": true
},
"singleProjectMode": true
}
}
I tried adding this path as well
export FIREBASE_AUTH_EMULATOR_HOST="192.168.0.10:9099"
I have cleaned my build, deleted the app from my device, cleared derived data.
Thoughts on what else I should check?