Bug
When calling FirebaseAI.getInstance(FirebaseApp), any app will crash with a StackOverflowException because the method calls itself.
Offending code snippet: https://github.com/firebase/firebase-android-sdk/blob/main/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt#L223
Workaround
This can be avoided by simply calling FirebaseAI.getInstance(FirebaseApp, GenerativeBackend) and explicitly specifying the backend, or, if using the default app, FirebaseAI.instance/FirebaseAI.getInstance() will also work fine.
Bug
When calling
FirebaseAI.getInstance(FirebaseApp), any app will crash with aStackOverflowExceptionbecause the method calls itself.Offending code snippet: https://github.com/firebase/firebase-android-sdk/blob/main/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt#L223
Workaround
This can be avoided by simply calling
FirebaseAI.getInstance(FirebaseApp, GenerativeBackend)and explicitly specifying the backend, or, if using the default app,FirebaseAI.instance/FirebaseAI.getInstance()will also work fine.